ambivalence
ambivalence

Reputation: 31

Why do I get "illegal operand" errors when compiling SPARC assembly with GCC (2 lines, cmp and bl instructions)?

GCC complains that:

A3.s: Assembler messages: A3.s:32: Error: Illegal operands A3.s:33: Error: Illegal operands

The offending lines (italicized) and surrounding code are:

b random_init_for_test
nop

random_init_for_test:
**set 0, i_s
cmp i_s, 40**
bl random_init_for
nop

I am a beginner at SPARC assembly and I've had no luck at fixing this. Can anyone see the problem?

Upvotes: 0

Views: 1397

Answers (1)

Jens Björnhager
Jens Björnhager

Reputation: 5649

Are you missing register prefices (%)?

Upvotes: 1

Related Questions