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
This commit is contained in:
Paul Brook 2004-05-04 11:33:56 +00:00 committed by Paul Brook
parent 92e838e281
commit 82c732f970
3 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,8 @@
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.

View File

@ -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

View File

@ -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__