[Efi332] Loading address in register on MPC555
David Eicher
sailors3
Sat Apr 16 15:18:43 UTC 2005
Hello list,
I'm still having trouble properly loading the address of a linker generated
symbol into a register (r1) in the 555. This is a GNU C environment. My code
so far looks like this:
UWord32 tmp;
tmp = &(__SP_INIT);
asm ("lis r1,%0" : : "g" ((tmp
>> 16) & 0xFFFF)); /* __SP_INIT is generated by linker */
asm ("ori r1, r1,%0" : : "g"
((tmp) & 0xFFFF));
I'm trying to load the "address of" __SP_INIT which is the top of the stack
into register GPR1 (or r1). But this code doesn't get it done, I'm not sure
what I'm doing wrong. The seems to be some little sutle point I'm missing.
Thanks for any insight you might be able to offer,
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.diy-efi.org/pipermail/efi332/attachments/20050416/5ba269e8/attachment.html
More information about the Efi332
mailing list