atj213x: obtain PC value in more elegant way
Change-Id: I2e6ffb3b58ddda0ea62ce5d4cd71ac5475b34495
This commit is contained in:
parent
9dbdec14f0
commit
062801e3ed
1 changed files with 6 additions and 7 deletions
|
@ -11,9 +11,13 @@
|
|||
|
||||
start:
|
||||
di # disable interrupts
|
||||
bal get_pc # v0 = PC + 8 actually
|
||||
bltzal zero, load_addr # ra = PC + 8, branch not taken
|
||||
nop
|
||||
addiu v0, -12 # calc real load address
|
||||
|
||||
load_addr:
|
||||
addiu v0, ra, -12 # calc real load address
|
||||
# account for branch delay slot
|
||||
# and very first 'di' instruction
|
||||
la t0, relocstart
|
||||
la t1, relocend
|
||||
beq t0, v0, entry_point # no relocation needed
|
||||
|
@ -31,11 +35,6 @@ entry_point_jump:
|
|||
jr t0
|
||||
nop
|
||||
|
||||
get_pc:
|
||||
move v0, ra
|
||||
jr ra
|
||||
nop
|
||||
|
||||
entry_point:
|
||||
# setup caches
|
||||
# 4-way, 256 sets, 16 bytes cacheline I/D
|
||||
|
|
Loading…
Reference in a new issue