Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
21 years ago

loading/storing a register

Hi!

again an assembler-related question:

look at this code

movhi r3, %hiadj(mylabel)

addi r3,r3, %lo(mylabel)

stw r2, 0(r3)

and now at this:

movhi r3, %hiadj(mylabel)

stw r2, %lo(mylabel)(r3)

excluding the fact that r3 at the end is loaded with two different values,

does the second piece of code store r2 in the address of mylabel?

Best Regards,

Paolo