Commit 82c732f9 by Paul Brook Committed by Paul Brook

crti.asm: Push an even number of registers.

	* config/arm/crti.asm: Push an even number of registers.
	* config/arm/crtn.asm: And restore them.  Load via sp.

From-SVN: r81473
parent 92e838e2
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.
......
......@@ -42,12 +42,12 @@
#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
......
......@@ -43,17 +43,19 @@
# 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__
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment