-
September 19th, 2006, 01:12 PM
#1
lwz not working properly?
Here is the scenario:
Register 9 = 0x10000000 (this is an address in memory)
Register 0 = 0x00000000 (this is an address in memory)
The address 0x10000000 contains the value 0x12345678
The assembly instruction is: lwz R0, 0x0(R9)
This instruction is supposed to copy the value contained inside of the address in Register 9 into Register 0. So, Register 0 is supposed to now contain 0x1234567. But in reality I get:
Register 0 = 0x69215678
Somehow it looks like it is only copying the second half of the value. Does anyone know why this might happen? I am using GNU compiler on Windows XP.
"My software doesn't have bugs, it just develops random features."
-
November 8th, 2006, 04:43 AM
#2
Re: lwz not working properly?
LWZ loads the value of size WORD, looks like you want to copy double word value.
Regards,
Ramkrishna Pawar
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|