bug 837347: re-enable typed arrays in JM on ARM (very necessary for mandreel) (r=jbramley)
authorMarty Rosenberg <mrosenberg@mozilla.com>
Thu, 14 Feb 2013 10:02:00 -0500
changeset 131787 e4448a24543bcd556b1ecb14c6578ffac5815de1
parent 131786 03024ad0a985de1633ded02ce432ba201855a957
child 131788 e524829ba4b7266d9df6a29c50e4313ae85c2d67
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjbramley
bugs837347
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 837347: re-enable typed arrays in JM on ARM (very necessary for mandreel) (r=jbramley)
js/src/assembler/assembler/MacroAssemblerARM.h
js/src/configure.in
toolkit/crashreporter/google-breakpad/src/tools/solaris/dump_syms/testdata/dump_syms_regtest.o
--- a/js/src/assembler/assembler/MacroAssemblerARM.h
+++ b/js/src/assembler/assembler/MacroAssemblerARM.h
@@ -505,17 +505,17 @@ public:
             JS_ASSERT("What are you trying to do with 16 bits of a pointer?");
         else
             m_assembler.moveImm(imm.m_value, ARMRegisters::S1);
         m_assembler.mem_imm_off(false, false, 16, true, ARMRegisters::S1, ARMRegisters::S0, 0);
     }
 
     void store8(RegisterID src, ImplicitAddress address)
     {
-        m_assembler.dataTransferN(false, false, 16,  src, address.base, address.offset);
+        m_assembler.dataTransferN(false, false, 8,  src, address.base, address.offset);
     }
 
     void store8(RegisterID src, BaseIndex address)
     {
         m_assembler.baseIndexTransferN(false, false, 8, src, address.base, address.index, static_cast<int>(address.scale), address.offset);
     }
 
     void store8(TrustedImm32 imm, BaseIndex address)
@@ -1152,35 +1152,36 @@ public:
     }
 
     void fastLoadDouble(RegisterID lo, RegisterID hi, FPRegisterID fpReg) {
         m_assembler.vmov64(false, true, lo, hi, fpReg);
     }
 
     void loadFloat(ImplicitAddress address, FPRegisterID dest)
     {
+        ASSERT((address.offset & 0x3) == 0);
         // as long as this is a sane mapping, (*2) should just work
-        dest = (FPRegisterID) (dest * 2);
-        ASSERT((address.offset & 0x3) == 0);
-        m_assembler.floatTransfer(true, dest, address.base, address.offset);
-        m_assembler.vcvt(m_assembler.FloatReg32, m_assembler.FloatReg64, (FPRegisterID)(dest*2), dest);
+        m_assembler.floatTransfer(true, floatShadow(dest), address.base, address.offset);
+        m_assembler.vcvt(m_assembler.FloatReg32, m_assembler.FloatReg64, floatShadow(dest), dest);
     }
     void loadFloat(BaseIndex address, FPRegisterID dest)
     {
-        m_assembler.baseIndexFloatTransfer(true, false, (FPRegisterID)(dest*2),
+        FPRegisterID dest_s = floatShadow(dest);
+        m_assembler.baseIndexFloatTransfer(true, false, dest_s,
                                            address.base, address.index,
                                            address.scale, address.offset);
-        m_assembler.vcvt(m_assembler.FloatReg32, m_assembler.FloatReg64, (FPRegisterID)(dest*2), dest);
+        m_assembler.vcvt(m_assembler.FloatReg32, m_assembler.FloatReg64, dest_s, dest);
     }
 
     DataLabelPtr loadFloat(const void* address, FPRegisterID dest)
     {
+        FPRegisterID dest_s = floatShadow(dest);
         DataLabelPtr label = moveWithPatch(ImmPtr(address), ARMRegisters::S0);
-        m_assembler.fmem_imm_off(true, false, true, (FPRegisterID)(dest*2), ARMRegisters::S0, 0);
-        m_assembler.vcvt(m_assembler.FloatReg32, m_assembler.FloatReg64, (FPRegisterID)(dest*2), dest);
+        m_assembler.fmem_imm_off(true, false, true, dest_s, ARMRegisters::S0, 0);
+        m_assembler.vcvt(m_assembler.FloatReg32, m_assembler.FloatReg64, dest_s, dest);
         return label;
     }
  
     void storeDouble(FPRegisterID src, ImplicitAddress address)
     {
         // Store a double at base+offset.
         m_assembler.doubleTransfer(false, src, address.base, address.offset);
     }
@@ -1203,24 +1204,26 @@ public:
         store32(Imm32(imm.u.s.lsb), address);
         store32(Imm32(imm.u.s.msb),
                 BaseIndex(address.base, address.index, address.scale, address.offset + 4));
     }
     void fastStoreDouble(FPRegisterID fpReg, RegisterID lo, RegisterID hi) {
         m_assembler.vmov64(true, true, lo, hi, fpReg);
     }
 
+    // the StoreFloat functions take an FPRegisterID that is really of the corresponding Double register.
+    // but the double has already been converted into a float
     void storeFloat(FPRegisterID src, ImplicitAddress address)
     {
-        m_assembler.floatTransfer(false, src, address.base, address.offset);
+        m_assembler.floatTransfer(false, floatShadow(src), address.base, address.offset);
     }
 
     void storeFloat(FPRegisterID src, BaseIndex address)
     {
-        m_assembler.baseIndexFloatTransfer(false, false, src,
+        m_assembler.baseIndexFloatTransfer(false, false, floatShadow(src),
                                            address.base, address.index,
                                            address.scale, address.offset);
     }
     void storeFloat(ImmDouble imm, Address address)
     {
         union {
             float f;
             uint32_t u32;
@@ -1324,17 +1327,17 @@ public:
         // flds does not worth the effort here
         m_assembler.ldr_un_imm(ARMRegisters::S1, (ARMWord)src.m_ptr);
         m_assembler.dtr_u(true, ARMRegisters::S1, ARMRegisters::S1, 0);
         convertInt32ToDouble(ARMRegisters::S1, dest);
     }
 
     void convertDoubleToFloat(FPRegisterID src, FPRegisterID dest)
     {
-        m_assembler.vcvt(m_assembler.FloatReg64, m_assembler.FloatReg32, src, dest);
+        m_assembler.vcvt(m_assembler.FloatReg64, m_assembler.FloatReg32, src, floatShadow(dest));
     }
 
     Jump branchDouble(DoubleCondition cond, FPRegisterID left, FPRegisterID right)
     {
         m_assembler.fcmpd_r(left, right);
         m_assembler.fmstat();
         if (cond & DoubleConditionBitSpecial)
             m_assembler.cmp_r(ARMRegisters::S0, ARMRegisters::S0, ARMAssembler::VS);
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -2086,17 +2086,17 @@ x86_64*-*)
     AC_DEFINE(JS_CPU_X64)
     AC_DEFINE(JS_PUNBOX64)
     ;;
 arm*-*)
     ENABLE_METHODJIT=1
     ENABLE_ION=1
     ENABLE_MONOIC=1
     ENABLE_POLYIC=1
-    ENABLE_POLYIC_TYPED_ARRAY=1
+    ENABLE_METHODJIT_TYPED_ARRAY=1
     AC_DEFINE(JS_CPU_ARM)
     AC_DEFINE(JS_NUNBOX32)
     ;;
 sparc*-*)
     if test ! "$HAVE_64BIT_OS" ; then
     ENABLE_METHODJIT=1
     ENABLE_MONOIC=1
     ENABLE_POLYIC=1
deleted file mode 100644
index a1c61b2dfd09c52168660fdf5b060b969a72006d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001