mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
Fix alignment of thumb functions defined in assembly (#431)
- [x] Changelog updated / no changelog update needed
This commit is contained in:
commit
2012f2ec35
|
@ -14,9 +14,9 @@
|
||||||
.include "src/agbabi/macros.inc"
|
.include "src/agbabi/macros.inc"
|
||||||
|
|
||||||
.arm
|
.arm
|
||||||
.align 2
|
|
||||||
|
|
||||||
.section .iwram.__aeabi_memcpy, "ax", %progbits
|
.section .iwram.__aeabi_memcpy, "ax", %progbits
|
||||||
|
.align 2
|
||||||
.global __agbabi_memcpy
|
.global __agbabi_memcpy
|
||||||
__agbabi_memcpy:
|
__agbabi_memcpy:
|
||||||
.global __aeabi_memcpy
|
.global __aeabi_memcpy
|
||||||
|
@ -115,6 +115,7 @@ __agbabi_memcpy1:
|
||||||
bx lr
|
bx lr
|
||||||
|
|
||||||
.section .iwram.memcpy, "ax", %progbits
|
.section .iwram.memcpy, "ax", %progbits
|
||||||
|
.align 2
|
||||||
.global memcpy
|
.global memcpy
|
||||||
memcpy:
|
memcpy:
|
||||||
push {r0, lr}
|
push {r0, lr}
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.arm
|
.arm
|
||||||
.align 2
|
|
||||||
|
|
||||||
.section .iwram.__aeabi_memset, "ax", %progbits
|
.section .iwram.__aeabi_memset, "ax", %progbits
|
||||||
|
.align 2
|
||||||
.global __aeabi_memclr
|
.global __aeabi_memclr
|
||||||
__aeabi_memclr:
|
__aeabi_memclr:
|
||||||
mov r2, #0
|
mov r2, #0
|
||||||
|
@ -109,6 +109,7 @@ __agbabi_wordset4:
|
||||||
bx lr
|
bx lr
|
||||||
|
|
||||||
.section .iwram.memset, "ax", %progbits
|
.section .iwram.memset, "ax", %progbits
|
||||||
|
.align 2
|
||||||
.global memset
|
.global memset
|
||||||
memset:
|
memset:
|
||||||
mov r3, r1
|
mov r3, r1
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
.macro agb_thumb_func functionName:req
|
.macro agb_thumb_func functionName:req
|
||||||
.section .iwram.\functionName, "ax", %progbits
|
.section .iwram.\functionName, "ax", %progbits
|
||||||
.thumb
|
.thumb
|
||||||
.align 2
|
.align 1
|
||||||
.global \functionName
|
.global \functionName
|
||||||
.type \functionName, %function
|
.type \functionName, %function
|
||||||
.func \functionName
|
.func \functionName
|
||||||
|
|
|
@ -31,7 +31,9 @@ agb_thumb_func agb_rs__WramVerifyBuf
|
||||||
@ Returns from the function successfully
|
@ Returns from the function successfully
|
||||||
movs r0, #1
|
movs r0, #1
|
||||||
0: @ Jumps to here return the function unsuccessfully, because r0 contains 0 at this point
|
0: @ Jumps to here return the function unsuccessfully, because r0 contains 0 at this point
|
||||||
pop {r4-r5, pc}
|
pop {r4-r5}
|
||||||
|
pop {r1}
|
||||||
|
bx r1
|
||||||
agb_thumb_end agb_rs__WramVerifyBuf
|
agb_thumb_end agb_rs__WramVerifyBuf
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue