
atul.sabharwal@exgate.tek.com wrote:
I am a newbie at PowerPC assembly. In my last patch, I submitted a series of test as part of my work in bringing up the memory controller.
[snip]
My first cut at it is here but it is complaining about GOT. Not enough experience with ld... Help/tips ??
__asm__ __volatile__( \ " lis r10, 0x0@h\n" \ " eieio\n" \ " lis r3, address@l\n" \ " ori r3, r3, address@h\n" \ " lis r4, fillpattern@l\n" \ " ori r4, r4, fillpattern@h\n" \ " lis r5, bytecount@l\n" \ " ori r5, r5, bytecount@h\n" \ " b 0x0\n" \ );
Thanks,
Atul
This has nothing to do with your current problems, but if you try to run the above code, it won't work. You are doing a "load shifted" of the _lower_ half of the word and then oring in the _upper_ half of the word. You need to switch your "@l" (low half) and "@h" (high half). What you have will give you a halfword-swapped value:
Want: 01234567 Oops: 45670123
gvb