Bug 1199719 part 5 - Move MacroAssembler::orPtr into the generic macro assembler. r=lth
☠☠ backed out by f11cf71a5cca ☠ ☠
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Thu, 10 Sep 2015 22:36:14 +0200
changeset 294470 da69d8d082af861eb8280c41dab94df9b4b039e4
parent 294469 e5ec584b2b69b67441323978746403c45bb53423
child 294471 26ea83669c9a644b421b7c536a45e125e3bfa2b7
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslth
bugs1199719
milestone43.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 1199719 part 5 - Move MacroAssembler::orPtr into the generic macro assembler. r=lth
js/src/jit/MacroAssembler.h
js/src/jit/arm/MacroAssembler-arm-inl.h
js/src/jit/arm/MacroAssembler-arm.cpp
js/src/jit/arm/MacroAssembler-arm.h
js/src/jit/arm64/MacroAssembler-arm64-inl.h
js/src/jit/arm64/MacroAssembler-arm64.h
js/src/jit/mips32/MacroAssembler-mips32-inl.h
js/src/jit/mips32/MacroAssembler-mips32.cpp
js/src/jit/mips32/MacroAssembler-mips32.h
js/src/jit/none/MacroAssembler-none.h
js/src/jit/x64/MacroAssembler-x64-inl.h
js/src/jit/x64/MacroAssembler-x64.h
js/src/jit/x86/MacroAssembler-x86-inl.h
js/src/jit/x86/MacroAssembler-x86.h
--- a/js/src/jit/MacroAssembler.h
+++ b/js/src/jit/MacroAssembler.h
@@ -677,16 +677,19 @@ class MacroAssembler : public MacroAssem
 
     inline void andPtr(Register src, Register dest) PER_ARCH;
     inline void andPtr(Imm32 imm, Register dest) PER_ARCH;
 
     inline void or32(Register src, Register dest) PER_SHARED_ARCH;
     inline void or32(Imm32 imm, Register dest) PER_SHARED_ARCH;
     inline void or32(Imm32 imm, const Address& dest) PER_SHARED_ARCH;
 
+    inline void orPtr(Register src, Register dest) PER_ARCH;
+    inline void orPtr(Imm32 imm, Register dest) PER_ARCH;
+
     //}}} check_macroassembler_style
   public:
 
     // Emits a test of a value against all types in a TypeSet. A scratch
     // register is required.
     template <typename Source>
     void guardTypeSet(const Source& address, const TypeSet* types, BarrierKind kind, Register scratch, Label* miss);
 
--- a/js/src/jit/arm/MacroAssembler-arm-inl.h
+++ b/js/src/jit/arm/MacroAssembler-arm-inl.h
@@ -73,16 +73,28 @@ void
 MacroAssembler::or32(Imm32 imm, const Address& dest)
 {
     ScratchRegisterScope scratch(*this);
     load32(dest, scratch);
     ma_orr(imm, scratch);
     store32(scratch, dest);
 }
 
+void
+MacroAssembler::orPtr(Register src, Register dest)
+{
+    ma_orr(src, dest);
+}
+
+void
+MacroAssembler::orPtr(Imm32 imm, Register dest)
+{
+    ma_orr(imm, dest);
+}
+
 //}}} check_macroassembler_style
 // ===============================================================
 
 void
 MacroAssemblerARMCompat::branchTest64(Condition cond, Register64 lhs, Register64 rhs, Register temp, Label* label)
 {
     if (cond == Assembler::Zero) {
         MOZ_ASSERT(lhs.low == rhs.low);
--- a/js/src/jit/arm/MacroAssembler-arm.cpp
+++ b/js/src/jit/arm/MacroAssembler-arm.cpp
@@ -1980,28 +1980,16 @@ MacroAssemblerARMCompat::xorPtr(Imm32 im
 
 void
 MacroAssemblerARMCompat::xorPtr(Register src, Register dest)
 {
     ma_eor(src, dest);
 }
 
 void
-MacroAssemblerARMCompat::orPtr(Imm32 imm, Register dest)
-{
-    ma_orr(imm, dest);
-}
-
-void
-MacroAssemblerARMCompat::orPtr(Register src, Register dest)
-{
-    ma_orr(src, dest);
-}
-
-void
 MacroAssemblerARMCompat::move32(Imm32 imm, Register dest)
 {
     ma_mov(imm, dest);
 }
 
 void
 MacroAssemblerARMCompat::move32(Register src, Register dest) {
     ma_mov(src, dest);
--- a/js/src/jit/arm/MacroAssembler-arm.h
+++ b/js/src/jit/arm/MacroAssembler-arm.h
@@ -1202,18 +1202,16 @@ class MacroAssemblerARMCompat : public M
         j(cond, label);
     }
     void xor32(Imm32 imm, Register dest);
 
     inline void and64(Imm64 imm, Register64 dest);
     inline void or64(Register64 src, Register64 dest);
     void xorPtr(Imm32 imm, Register dest);
     void xorPtr(Register src, Register dest);
-    void orPtr(Imm32 imm, Register dest);
-    void orPtr(Register src, Register dest);
     void addPtr(Register src, Register dest);
     void addPtr(const Address& src, Register dest);
     void add64(Imm32 imm, Register64 dest) {
         ma_add(imm, dest.low, SetCC);
         ma_adc(Imm32(0), dest.high, LeaveCC);
     }
     void not32(Register reg);
 
--- a/js/src/jit/arm64/MacroAssembler-arm64-inl.h
+++ b/js/src/jit/arm64/MacroAssembler-arm64-inl.h
@@ -85,28 +85,46 @@ MacroAssembler::or32(Imm32 imm, const Ad
     vixl::UseScratchRegisterScope temps(this);
     const ARMRegister scratch32 = temps.AcquireW();
     MOZ_ASSERT(scratch32.asUnsized() != dest.base);
     load32(dest, scratch32.asUnsized());
     Orr(scratch32, scratch32, Operand(imm.value));
     store32(scratch32.asUnsized(), dest);
 }
 
+void
+MacroAssembler::orPtr(Register src, Register dest)
+{
+    Orr(ARMRegister(dest, 64), ARMRegister(dest, 64), Operand(ARMRegister(src, 64)));
+}
+
+void
+MacroAssembler::orPtr(Imm32 imm, Register dest)
+{
+    Orr(ARMRegister(dest, 64), ARMRegister(dest, 64), Operand(imm.value));
+}
+
 //}}} check_macroassembler_style
 // ===============================================================
 
 void
 MacroAssemblerCompat::and64(Imm64 imm, Register64 dest)
 {
     vixl::UseScratchRegisterScope temps(this);
     const Register scratch = temps.AcquireX().asUnsized();
     mov(ImmWord(imm.value), scratch);
     asMasm().andPtr(scratch, dest.reg);
 }
 
+void
+MacroAssemblerCompat::or64(Register64 src, Register64 dest)
+{
+    asMasm().orPtr(src.reg, dest.reg);
+}
+
 template <typename T>
 void
 MacroAssemblerCompat::andToStackPtr(T t)
 {
     asMasm().andPtr(t, getStackPointer());
     syncStackPtr();
 }
 
--- a/js/src/jit/arm64/MacroAssembler-arm64.h
+++ b/js/src/jit/arm64/MacroAssembler-arm64.h
@@ -1096,29 +1096,18 @@ class MacroAssemblerCompat : public vixl
     }
     void xor32(Imm32 imm, Register dest) {
         Eor(ARMRegister(dest, 32), ARMRegister(dest, 32), Operand(imm.value));
     }
 
     void xorPtr(Register src, Register dest) {
         Eor(ARMRegister(dest, 64), ARMRegister(dest, 64), Operand(ARMRegister(src, 64)));
     }
-    void orPtr(ImmWord imm, Register dest) {
-        Orr(ARMRegister(dest, 64), ARMRegister(dest, 64), Operand(imm.value));
-    }
-    void orPtr(Imm32 imm, Register dest) {
-        Orr(ARMRegister(dest, 64), ARMRegister(dest, 64), Operand(imm.value));
-    }
-    void orPtr(Register src, Register dest) {
-        Orr(ARMRegister(dest, 64), ARMRegister(dest, 64), Operand(ARMRegister(src, 64)));
-    }
-    void or64(Register64 src, Register64 dest) {
-        orPtr(src.reg, dest.reg);
-    }
     inline void and64(Imm64 imm, Register64 dest);
+    inline void or64(Register64 src, Register64 dest);
 
     void testPtr(Register lhs, Register rhs) {
         Tst(ARMRegister(lhs, 64), Operand(ARMRegister(rhs, 64)));
     }
     void test32(Register lhs, Register rhs) {
         Tst(ARMRegister(lhs, 32), Operand(ARMRegister(rhs, 32)));
     }
     void test32(const Address& addr, Imm32 imm) {
--- a/js/src/jit/mips32/MacroAssembler-mips32-inl.h
+++ b/js/src/jit/mips32/MacroAssembler-mips32-inl.h
@@ -70,16 +70,28 @@ MacroAssembler::or32(Imm32 imm, Register
 void
 MacroAssembler::or32(Imm32 imm, const Address& dest)
 {
     load32(dest, SecondScratchReg);
     ma_or(SecondScratchReg, imm);
     store32(SecondScratchReg, dest);
 }
 
+void
+MacroAssembler::orPtr(Register src, Register dest)
+{
+    ma_or(dest, src);
+}
+
+void
+MacroAssembler::orPtr(Imm32 imm, Register dest)
+{
+    ma_or(dest, imm);
+}
+
 //}}} check_macroassembler_style
 // ===============================================================
 
 void
 MacroAssemblerMIPSCompat::and64(Imm64 imm, Register64 dest)
 {
     asMasm().and32(Imm32(imm.value & LOW_32_MASK), dest.low);
     asMasm().and32(Imm32((imm.value >> 32) & LOW_32_MASK), dest.high);
--- a/js/src/jit/mips32/MacroAssembler-mips32.cpp
+++ b/js/src/jit/mips32/MacroAssembler-mips32.cpp
@@ -1644,28 +1644,16 @@ MacroAssemblerMIPSCompat::xorPtr(Imm32 i
 
 void
 MacroAssemblerMIPSCompat::xorPtr(Register src, Register dest)
 {
     ma_xor(dest, src);
 }
 
 void
-MacroAssemblerMIPSCompat::orPtr(Imm32 imm, Register dest)
-{
-    ma_or(dest, imm);
-}
-
-void
-MacroAssemblerMIPSCompat::orPtr(Register src, Register dest)
-{
-    ma_or(dest, src);
-}
-
-void
 MacroAssemblerMIPSCompat::move32(Imm32 imm, Register dest)
 {
     ma_li(dest, imm);
 }
 
 void
 MacroAssemblerMIPSCompat::move32(Register src, Register dest)
 {
--- a/js/src/jit/mips32/MacroAssembler-mips32.h
+++ b/js/src/jit/mips32/MacroAssembler-mips32.h
@@ -1151,18 +1151,16 @@ public:
         }
     }
 
     inline void and64(Imm64 imm, Register64 dest);
     inline void or64(Register64 src, Register64 dest);
     void xor32(Imm32 imm, Register dest);
     void xorPtr(Imm32 imm, Register dest);
     void xorPtr(Register src, Register dest);
-    void orPtr(Imm32 imm, Register dest);
-    void orPtr(Register src, Register dest);
     void addPtr(Register src, Register dest);
     void subPtr(Register src, Register dest);
     void addPtr(const Address& src, Register dest);
     void not32(Register reg);
 
     void move32(Imm32 imm, Register dest);
     void move32(Register src, Register dest);
     void move64(Register64 src, Register64 dest) {
--- a/js/src/jit/none/MacroAssembler-none.h
+++ b/js/src/jit/none/MacroAssembler-none.h
@@ -422,17 +422,16 @@ class MacroAssemblerNone : public Assemb
     template <typename T> void storeUnboxedValue(ConstantOrRegister, MIRType, T, MIRType) { MOZ_CRASH(); }
     template <typename T> void storeUnboxedPayload(ValueOperand value, T, size_t) { MOZ_CRASH(); }
 
     void rshiftPtr(Imm32, Register) { MOZ_CRASH(); }
     void rshiftPtrArithmetic(Imm32, Register) { MOZ_CRASH(); }
     void lshiftPtr(Imm32, Register) { MOZ_CRASH(); }
     template <typename T, typename S> void xorPtr(T, S) { MOZ_CRASH(); }
     template <typename T, typename S> void xor32(T, S) { MOZ_CRASH(); }
-    template <typename T, typename S> void orPtr(T, S) { MOZ_CRASH(); }
     template <typename T> void not32(T) { MOZ_CRASH(); }
     void convertUInt32ToDouble(Register, FloatRegister) { MOZ_CRASH(); }
     void convertUInt32ToFloat32(Register, FloatRegister) { MOZ_CRASH(); }
     void inc64(AbsoluteAddress) { MOZ_CRASH(); }
     void incrementInt32Value(Address) { MOZ_CRASH(); }
     void ensureDouble(ValueOperand, FloatRegister, Label*) { MOZ_CRASH(); }
     void handleFailureWithHandlerTail(void*) { MOZ_CRASH(); }
 
--- a/js/src/jit/x64/MacroAssembler-x64-inl.h
+++ b/js/src/jit/x64/MacroAssembler-x64-inl.h
@@ -24,15 +24,27 @@ MacroAssembler::andPtr(Register src, Reg
 }
 
 void
 MacroAssembler::andPtr(Imm32 imm, Register dest)
 {
     andq(imm, dest);
 }
 
+void
+MacroAssembler::orPtr(Register src, Register dest)
+{
+    orq(src, dest);
+}
+
+void
+MacroAssembler::orPtr(Imm32 imm, Register dest)
+{
+    orq(imm, dest);
+}
+
 //}}} check_macroassembler_style
 // ===============================================================
 
 } // namespace jit
 } // namespace js
 
 #endif /* jit_x64_MacroAssembler_x64_inl_h */
--- a/js/src/jit/x64/MacroAssembler-x64.h
+++ b/js/src/jit/x64/MacroAssembler-x64.h
@@ -873,22 +873,16 @@ class MacroAssemblerX64 : public MacroAs
         shlq(imm, dest.reg);
     }
     void xorPtr(Imm32 imm, Register dest) {
         xorq(imm, dest);
     }
     void xorPtr(Register src, Register dest) {
         xorq(src, dest);
     }
-    void orPtr(Imm32 imm, Register dest) {
-        orq(imm, dest);
-    }
-    void orPtr(Register src, Register dest) {
-        orq(src, dest);
-    }
     void or64(Register64 src, Register64 dest) {
         orq(src.reg, dest.reg);
     }
     void and64(Imm64 imm, Register64 dest) {
         movq(ImmWord(uintptr_t(imm.value)), ScratchReg);
         andq(ScratchReg, dest.reg);
     }
 
--- a/js/src/jit/x86/MacroAssembler-x86-inl.h
+++ b/js/src/jit/x86/MacroAssembler-x86-inl.h
@@ -24,15 +24,27 @@ MacroAssembler::andPtr(Register src, Reg
 }
 
 void
 MacroAssembler::andPtr(Imm32 imm, Register dest)
 {
     andl(imm, dest);
 }
 
+void
+MacroAssembler::orPtr(Register src, Register dest)
+{
+    orl(src, dest);
+}
+
+void
+MacroAssembler::orPtr(Imm32 imm, Register dest)
+{
+    orl(imm, dest);
+}
+
 //}}} check_macroassembler_style
 // ===============================================================
 
 } // namespace jit
 } // namespace js
 
 #endif /* jit_x86_MacroAssembler_x86_inl_h */
--- a/js/src/jit/x86/MacroAssembler-x86.h
+++ b/js/src/jit/x86/MacroAssembler-x86.h
@@ -1140,22 +1140,16 @@ class MacroAssemblerX86 : public MacroAs
         shll(imm, dest.low);
     }
     void xorPtr(Imm32 imm, Register dest) {
         xorl(imm, dest);
     }
     void xorPtr(Register src, Register dest) {
         xorl(src, dest);
     }
-    void orPtr(Imm32 imm, Register dest) {
-        orl(imm, dest);
-    }
-    void orPtr(Register src, Register dest) {
-        orl(src, dest);
-    }
     void or64(Register64 src, Register64 dest) {
         orl(src.low, dest.low);
         orl(src.high, dest.high);
     }
     void and64(Imm64 imm, Register64 dest) {
         andl(Imm32(imm.value & 0xFFFFFFFFL), dest.low);
         andl(Imm32((imm.value >> 32) & 0xFFFFFFFFL), dest.high);
     }