Invalid Operands with Inline assembly

Robert Floyd robert.floyd@inet.com
Wed Nov 1 13:56:00 GMT 2000


> It looks as if you are branching to the address pmain, which contains a 32
> bit value equivalent to _main and is executing that as code, what happens
> depends on the actual value of _main but is not likely to get you back with
> the PC equal to _main either. You want to branch to the value that is at the
> address pmain (assuming _main is too far away to go directly there) probably
> want to do something like:
>         mov.l  pmain, r4
>         bra    @r4

Since _main is a global function defined in another file, I do notice
that it does link up the right address.  I checked the srec again and
can see it is correct.  It's just odd how it does not ever seem to get
there to the compiled 'C' portion when I burn a prom for the SH1.

I tried your example above but I get the error 'bad expression' when
using 'bra @r4'. The expression:

jmp @r4 

does compile ok, however.  I'll give it go again when I get to my prom
burner.  Thanks for your help.

Robert

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list