PowerPC For Dummies: A simplified guide to understanding the PowerPC Instruction Set
#25
It's called the Effective Address and that's how store and load instructions work.

Examples~

stw r0, VALUE (r3) #Effective Address aka EA (where store occurs) is VALUE+r3
lbz r5, VALUE (r10) #EA = VALUE+r10

These calculations are signed because all store and load instructions are signed. Meaning VALUE can be negative. If it is, do the sum accordingly.

Example~

lhzu r11, 0xFFFFFFFC (r9) #EA = -4 + r9, or easier to write it as r9 - 4 = EA.

Final Example (using lwxz)~

r5 = 0xFFFFFFF0 (aka -16 or -0x10)
r6 = 0x80001000

lwxz r4, r5, r6

EA = r5+r6 (0x80001000 minus 0x10)
Thus EA = 0x80000FF0

So the lwzx instruction will load the word located at 0x80000FF0 into r4.
Reply


Messages In This Thread
RE: PowerPC For Dummies: A simplified guide to understanding the PowerPC Instruction Set - by Vega - 07-04-2021, 12:28 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)