#define WHOLE(reg) _REGFORM(reg, r)
// Stack management and unwinding.
-.macro setfp fp, offset=0
+.macro setfp fp=R_bp(r), offset=0
.if \offset == 0
mov \fp, R_sp(r)
#if __ELF__
#define QQ(qlo, qhi) D0(qlo)-D1(qhi)
// Stack management and unwinding.
-.macro setfp fp, offset=0
+.macro setfp fp=r11, offset=0
.if \offset == 0
mov \fp, sp
.setfp \fp, sp
.endm
// Stack management and unwinding.
-.macro setfp fp, offset=0
+.macro setfp fp=x29, offset=0
// If you're just going through the motions with a fixed-size stack frame,
// then you want to say `add x29, sp, #OFFSET' directly, which will avoid
// pointlessly restoring sp later.
.cfi_adjust_cfa_offset -\n
.endm
-.macro pushreg x, y=
- .ifeqs "\y", ""
+.macro pushreg x, y=nil
+ .ifeqs "\y", "nil"
str \x, [sp, #-16]!
.cfi_adjust_cfa_offset +16
.cfi_rel_offset \x, 0
.endif
.endm
-.macro popreg x, y=
- .ifeqs "\y", ""
+.macro popreg x, y=nil
+ .ifeqs "\y", "nil"
ldr \x, [sp], #16
.cfi_restore \x
.cfi_adjust_cfa_offset -16
.endif
.endm
-.macro savereg x, y, z=
- .ifeqs "\z", ""
- str \x, [sp, #\y]
+.macro savereg x, y, z=nil
+ .ifeqs "\z", "nil"
+ str \x, [sp, \y]
.cfi_rel_offset \x, \y
.else
stp \x, \y, [sp, #\z]
.endif
.endm
-.macro rstrreg x, y, z=
- .ifeqs "\z", ""
- ldr \x, [sp, #\y]
+.macro rstrreg x, y, z=nil
+ .ifeqs "\z", "nil"
+ ldr \x, [sp, \y]
.cfi_restore \x
.else
ldp \x, \y, [sp, #\z]