mirror of
https://github.com/italicsjenga/gba.git
synced 2024-12-23 19:01:30 +11:00
Merge #81
81: Two small tweaks to crt0.s r=Lokathor a=ketsuban * The use of r3 in the block which copies the .data section into IWRAM is unnecessary. * The return label in the IRQ handler doesn't need to be global. Co-authored-by: Thomas Winwood <twwinwood@gmail.com>
This commit is contained in:
commit
738301d47c
8
crt0.s
8
crt0.s
|
@ -24,8 +24,8 @@ __start:
|
||||||
@ copy .data section to IWRAM
|
@ copy .data section to IWRAM
|
||||||
ldr r0, =__data_lma @ source address
|
ldr r0, =__data_lma @ source address
|
||||||
ldr r1, =__data_start @ destination address
|
ldr r1, =__data_start @ destination address
|
||||||
ldr r3, =__data_end
|
ldr r2, =__data_end
|
||||||
sub r2, r3, r1
|
sub r2, r2, r1
|
||||||
beq .Lskip @ don't try to copy an empty .data section
|
beq .Lskip @ don't try to copy an empty .data section
|
||||||
add r2, #3
|
add r2, #3
|
||||||
mov r2, r2, asr #2 @ length (in words)
|
mov r2, r2, asr #2 @ length (in words)
|
||||||
|
@ -69,9 +69,9 @@ MainIrqHandler:
|
||||||
ldr r2, =__IRQ_HANDLER
|
ldr r2, =__IRQ_HANDLER
|
||||||
ldr r1, [r2]
|
ldr r1, [r2]
|
||||||
stmdb sp!, {lr}
|
stmdb sp!, {lr}
|
||||||
adr lr, MainIrqHandler_Return
|
adr lr, .Lreturn
|
||||||
bx r1
|
bx r1
|
||||||
MainIrqHandler_Return:
|
.Lreturn:
|
||||||
ldmia sp!, {lr}
|
ldmia sp!, {lr}
|
||||||
|
|
||||||
@ Switch to IRQ mode
|
@ Switch to IRQ mode
|
||||||
|
|
Loading…
Reference in a new issue