Welcome! Log In Create A New Profile Wiibrew Wiki HackMii Blog

Advanced

[Resolved] Position dependent or not?

Posted by arasium 
[Resolved] Position dependent or not?
May 02, 2011 02:42PM
Re: Position dependent or not?
May 02, 2011 08:19PM
I will answer to my question :)

My first exemple then ue BX. The second one use BL.

BX isn't a position relative branch (ie the target is specified by the instruction), whereas BL is. I mean, when BL is called, the target is calculated with the current PC value and the BL argument. It'sjust an offset to the current position:

The offset for branch instructions is calculated by the assembler:
• By taking the difference between the branch instruction and the
target address minus 8 (to allow for the pipeline).
• This gives a 26 bit offset which is right shifted 2 bits (as the
bottom two bits are always zero as instructions are word –
aligned) and stored into the instruction encoding.
• This gives a range of +/- 32 Mbytes.
Re: [Resolved] Position dependent or not?
May 03, 2011 08:12AM
Re: [Resolved] Position dependent or not?
May 03, 2011 08:30AM
Indeed, i was aware of that. But i didn't write anything about that because it wasn't the problem here :)
But thank you for this precision, if someone read this, it can help him.
Sorry, only registered users may post in this forum.

Click here to login