Using ARM Unified Assembler Language

Change-Id: Iae32a8ba8eff6087330e458fafc912a12fee4509
This commit is contained in:
Chris Chua 2023-03-19 06:22:08 +11:00 committed by Aidan MacDonald
parent a64cad847e
commit 86429dbf1e
23 changed files with 139 additions and 127 deletions

View file

@ -1006,13 +1006,14 @@ Lyre prototype 1 */
#endif
#if defined(CPU_ARM) && defined(__ASSEMBLER__)
.syntax unified
/* ARMv4T doesn't switch the T bit when popping pc directly, we must use BX */
.macro ldmpc cond="", order="ia", regs
#if ARM_ARCH == 4 && defined(USE_THUMB)
ldm\cond\order sp!, { \regs, lr }
ldm\order\cond sp!, { \regs, lr }
bx\cond lr
#else
ldm\cond\order sp!, { \regs, pc }
ldm\order\cond sp!, { \regs, pc }
#endif
.endm
.macro ldrpc cond=""