diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-31 08:55:57 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-31 08:55:57 +0000 |
commit | 0841f0573afda8f504176f71d33486e2afd69134 (patch) | |
tree | f656347de36eddfa0f4267e90c1335be4eb3069d /gcc/config/mips/crtn.asm | |
parent | e7611f1a3b36a9d0ae32ddbea909b6ce6c3abf44 (diff) | |
download | gcc-0841f0573afda8f504176f71d33486e2afd69134.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55903 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mips/crtn.asm')
-rw-r--r-- | gcc/config/mips/crtn.asm | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/gcc/config/mips/crtn.asm b/gcc/config/mips/crtn.asm index 54ab2a5099d..5d41d3d7ecb 100644 --- a/gcc/config/mips/crtn.asm +++ b/gcc/config/mips/crtn.asm @@ -1,39 +1,29 @@ /* 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. */ - .section .init,"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 +#define RA $7 #else +#define RA $31 +#endif + + .section .init,"ax",@progbits #ifdef __mips64 - ld $31,40($sp) + ld RA,40($sp) daddu $sp,$sp,48 #else - lw $31,20($sp) + lw RA,20($sp) addu $sp,$sp,32 #endif - j $31 - -#endif + j RA .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 - ld $31,40($sp) + ld RA,40($sp) daddu $sp,$sp,48 #else - lw $31,20($sp) + lw RA,20($sp) addu $sp,$sp,32 #endif - j $31 -#endif + j RA + |