crtn.asm: Don't use __mips16 to determine the return-address offset.
* config/mips/crtn.asm: Don't use __mips16 to determine the return-address offset. Define RA to a suitable temporary register for the return address. From-SVN: r55903
This commit is contained in:
parent
ead0c1d554
commit
302359da86
|
@ -1,3 +1,9 @@
|
||||||
|
2002-07-31 Richard Sandiford <rsandifo@redhat.com>
|
||||||
|
|
||||||
|
* config/mips/crtn.asm: Don't use __mips16 to determine the
|
||||||
|
return-address offset. Define RA to a suitable temporary
|
||||||
|
register for the return address.
|
||||||
|
|
||||||
2002-07-31 Richard Sandiford <rsandifo@redhat.com>
|
2002-07-31 Richard Sandiford <rsandifo@redhat.com>
|
||||||
|
|
||||||
* config/mips/mips.md (eh_set_lr_si, eh_set_lr_di): Change
|
* config/mips/mips.md (eh_set_lr_si, eh_set_lr_di): Change
|
||||||
|
|
|
@ -1,39 +1,29 @@
|
||||||
/* 4 slots for argument spill area. 1 for cpreturn, 1 for stack.
|
/* 4 slots for argument spill area. 1 for cpreturn, 1 for stack.
|
||||||
Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */
|
Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */
|
||||||
|
|
||||||
.section .init,"ax",@progbits
|
|
||||||
#ifdef __mips16
|
#ifdef __mips16
|
||||||
/* The mips16 uses $7 for a return address. We use that here too. */
|
#define RA $7
|
||||||
lw $7,20($sp)
|
|
||||||
addu $sp,$sp,32
|
|
||||||
|
|
||||||
j $7
|
|
||||||
#else
|
#else
|
||||||
|
#define RA $31
|
||||||
|
#endif
|
||||||
|
|
||||||
|
.section .init,"ax",@progbits
|
||||||
#ifdef __mips64
|
#ifdef __mips64
|
||||||
ld $31,40($sp)
|
ld RA,40($sp)
|
||||||
daddu $sp,$sp,48
|
daddu $sp,$sp,48
|
||||||
#else
|
#else
|
||||||
lw $31,20($sp)
|
lw RA,20($sp)
|
||||||
addu $sp,$sp,32
|
addu $sp,$sp,32
|
||||||
#endif
|
#endif
|
||||||
j $31
|
j RA
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
.section .fini,"ax",@progbits
|
.section .fini,"ax",@progbits
|
||||||
#ifdef __mips16
|
|
||||||
/* The mips16 uses $7 for a return address. We use that here too. */
|
|
||||||
lw $7,20($sp)
|
|
||||||
addu $sp,$sp,32
|
|
||||||
|
|
||||||
j $7
|
|
||||||
#else
|
|
||||||
#ifdef __mips64
|
#ifdef __mips64
|
||||||
ld $31,40($sp)
|
ld RA,40($sp)
|
||||||
daddu $sp,$sp,48
|
daddu $sp,$sp,48
|
||||||
#else
|
#else
|
||||||
lw $31,20($sp)
|
lw RA,20($sp)
|
||||||
addu $sp,$sp,32
|
addu $sp,$sp,32
|
||||||
#endif
|
#endif
|
||||||
j $31
|
j RA
|
||||||
#endif
|
|
||||||
|
|
Loading…
Reference in New Issue