user3371785
user3371785

Reputation: 91

What is this series of PowerPC instructions doing?

I'm an amateur at PowerPC and this is the first time I've ever come along something like this.

lis r10, loc_13462@h
addi r10, r10, loc_13462@l
stw r10, 0xE0+var_80(r1)

It's really weird. My only guess is that it's possibly executing it and instead of r3 being the return, it's using r10 and then storing it in stack, but that doesn't make sense because it can be done in the same amount of instructions. Is this correct? If not, please explain what it's doing as I'm terribly lost.

Upvotes: 2

Views: 198

Answers (1)

Jester
Jester

Reputation: 58762

Not sure what you are confused about. It is loading an address into r10 and then storing that in a local variable presumably. The lis/addi pair is normal idiom to load an immediate word.

it can be done in the same amount of instructions

Next time you could show us those instructions. Also if it's the same amount, why do you think that version would be better?

Upvotes: 2

Related Questions