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

1.3k views Asked by At

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?

1

There are 1 answers

0
Jens Björnhager On

Are you missing register prefices (%)?