Bug 518227 - TM: spilled quads are passed incorrectly when calling a function [ARM, nanojit] r=graydon
authorAndreas Gal :gal <gal@uci.edu>
Tue, 06 Oct 2009 14:31:44 -0700
changeset 33518 eb366cb6f05c67df18f69c1e133f077cf7ce67d1
parent 33517 21ca51ccd2a9ce51c343f4942527fcc1b0993688
child 33519 15f6b7d23ada281a6aeb6d9ed551c2ad5a33864a
push id9569
push userbcrowder@mozilla.com
push dateTue, 06 Oct 2009 21:32:24 +0000
treeherdermozilla-central@eb366cb6f05c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgraydon
bugs518227
milestone1.9.3a1pre
Bug 518227 - TM: spilled quads are passed incorrectly when calling a function [ARM, nanojit] r=graydon
js/src/nanojit/NativeARM.cpp
js/src/nanojit/NativeARM.h
--- a/js/src/nanojit/NativeARM.cpp
+++ b/js/src/nanojit/NativeARM.cpp
@@ -790,19 +790,19 @@ Assembler::asm_stkarg(LInsp arg, int stk
                 LDR(IP, FP, d);
             }
         } else {
 #ifdef NJ_ARM_EABI
             // EABI requires that 64-bit arguments are 64-bit aligned.
             NanoAssert((stkd & 7) == 0);
 #endif
 
-            STR_preindex(IP, SP, stkd+4);
+            STR(IP, SP, stkd+4);
             LDR(IP, FP, d+4);
-            STR_preindex(IP, SP, stkd);
+            STR(IP, SP, stkd);
             LDR(IP, FP, d);
         }
     }
 }
 
 void
 Assembler::asm_call(LInsp ins)
 {
--- a/js/src/nanojit/NativeARM.h
+++ b/js/src/nanojit/NativeARM.h
@@ -597,36 +597,16 @@ enum {
         NanoAssert(IsGpReg(_d) && IsGpReg(_n));                         \
         NanoAssert(isS12(_off));                                        \
         underrunProtect(4);                                             \
         if ((_off)<0)   *(--_nIns) = (NIns)( COND_AL | (0x50<<20) | ((_n)<<16) | ((_d)<<12) | ((-(_off))&0xFFF) ); \
         else            *(--_nIns) = (NIns)( COND_AL | (0x58<<20) | ((_n)<<16) | ((_d)<<12) | ((_off)&0xFFF) ); \
         asm_output("str %s, [%s, #%d]", gpn(_d), gpn(_n), (_off)); \
     } while(0)
 
-// Rd += _off; [Rd] = Rn
-#define STR_preindex(_d,_n,_off) do {                                   \
-        NanoAssert(IsGpReg(_d) && IsGpReg(_n));                         \
-        NanoAssert(isS12(_off));                                        \
-        underrunProtect(4);                                             \
-        if ((_off)<0)   *(--_nIns) = (NIns)( COND_AL | (0x52<<20) | ((_n)<<16) | ((_d)<<12) | ((-(_off))&0xFFF) ); \
-        else            *(--_nIns) = (NIns)( COND_AL | (0x5A<<20) | ((_n)<<16) | ((_d)<<12) | ((_off)&0xFFF) ); \
-        asm_output("str %s, [%s, #%d]!", gpn(_d), gpn(_n), (_off));     \
-    } while(0)
-
-// [Rd] = Rn ; Rd += _off
-#define STR_postindex(_d,_n,_off) do {                                  \
-        NanoAssert(IsGpReg(_d) && IsGpReg(_n));                         \
-        NanoAssert(isS12(_off));                                        \
-        underrunProtect(4);                                             \
-        if ((_off)<0)   *(--_nIns) = (NIns)( COND_AL | (0x40<<20) | ((_n)<<16) | ((_d)<<12) | ((-(_off))&0xFFF) ); \
-        else            *(--_nIns) = (NIns)( COND_AL | (0x48<<20) | ((_n)<<16) | ((_d)<<12) | ((_off)&0xFFF) ); \
-        asm_output("str %s, [%s]!, %d", gpn(_d), gpn(_n), (_off));      \
-    } while(0)
-
 // Encode a breakpoint. The ID is not important and is ignored by the
 // processor, but it can be useful as a marker when debugging emitted code.
 #define BKPT_insn       ((NIns)( COND_AL | (0x12<<20) | (0x7<<4) ))
 #define BKPTi_insn(id)  ((NIns)(BKPT_insn | ((id << 4) & 0xfff00) | (id & 0xf)));
 
 #define BKPT_nochk()    BKPTi_nochk(0)
 #define BKPTi_nochk(id) do {                                \
         NanoAssert((id & 0xffff) == id);                    \