]> oss.titaniummirror.com Git - msp430-gcc.git/blobdiff - gcc/config/mips/crtn.asm
Imported gcc-4.4.3
[msp430-gcc.git] / gcc / config / mips / crtn.asm
index 54ab2a5099d45b90093ea996cf2f304747edaeab..5d41d3d7ecb84f409640915b5a9305e278b55f4f 100644 (file)
@@ -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
+