And use the default in the obvious places.
#define WHOLE(reg) _REGFORM(reg, r)
// Stack management and unwinding.
#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__
.if \offset == 0
mov \fp, R_sp(r)
#if __ELF__
#define QQ(qlo, qhi) D0(qlo)-D1(qhi)
// Stack management and unwinding.
#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
.if \offset == 0
mov \fp, sp
.setfp \fp, sp
.endm
// Stack management and unwinding.
.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.
// 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.
pushreg ebx
pushreg esi
pushreg edi
pushreg ebx
pushreg esi
pushreg edi
and esp, ~15
sub esp, 32
endprologue
and esp, ~15
sub esp, 32
endprologue
pushreg ebx
pushreg esi
pushreg edi
pushreg ebx
pushreg esi
pushreg edi
and esp, ~15
sub esp, 112
endprologue
and esp, ~15
sub esp, 112
endprologue
pushreg ebx
pushreg esi
pushreg edi
pushreg ebx
pushreg esi
pushreg edi
and esp, ~15
sub esp, 76
endprologue
and esp, ~15
sub esp, 76
endprologue
pushreg ebx
pushreg esi
pushreg edi
pushreg ebx
pushreg esi
pushreg edi
and esp, ~15
sub esp, 3*32 + 4*4
endprologue
and esp, ~15
sub esp, 3*32 + 4*4
endprologue
# define SAVE3 [esp]
pushreg ebp
# define SAVE3 [esp]
pushreg ebp
sub esp, 16
mov IN, [ebp + 12]
mov OUT, [ebp + 16]
sub esp, 16
mov IN, [ebp + 12]
mov OUT, [ebp + 16]
# define SAVE3 [esp + 16]
pushreg ebp
# define SAVE3 [esp + 16]
pushreg ebp
sub esp, 32
mov IN, [ebp + 12]
mov OUT, [ebp + 16]
sub esp, 32
mov IN, [ebp + 12]
mov OUT, [ebp + 16]