* config/arm/crti.asm: Push an even number of registers.
* config/arm/crtn.asm: And restore them. Load via sp.
From-SVN: r81473
+2004-05-04 Paul Brook <paul@codesourcery.com>
+
+ * config/arm/crti.asm: Push an even number of registers.
+ * config/arm/crtn.asm: And restore them. Load via sp.
+
2004-05-04 Paolo Bonzini <bonzini@gnu.org>
* ggc-zone.c (ggc_alloc_zone_1): Add MEM_STAT_DECL parameter.
#ifdef __thumb__
.thumb
- push {r4, r5, r6, r7, lr}
+ push {r3, r4, r5, r6, r7, lr}
#else
.arm
# Create a stack frame and save any call-preserved registers
mov ip, sp
- stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, ip, lr, pc}
+ stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, ip, lr, pc}
sub fp, ip, #4
#endif
.endm
# sequences here, it is just not worth it. Instead keep things
# simple. Restore all the save resgisters, including the link
# register and then perform the correct function return instruction.
+ # We also save/restore r3 to ensure stack alignment.
.macro FUNC_END
#ifdef __thumb__
.thumb
- pop {r4, r5, r6, r7}
+ pop {r3, r4, r5, r6, r7}
pop {r3}
mov lr, r3
#else
.arm
- ldmdb fp, {r4, r5, r6, r7, r8, r9, sl, fp, sp, lr}
+ sub sp, fp, #40
+ ldmfd sp, {r4, r5, r6, r7, r8, r9, sl, fp, sp, lr}
#endif
#if defined __THUMB_INTERWORK__ || defined __thumb__