Bug 1199719 part 8 - Move MacroAssembler::not32 into the generic macro assembler. r=h4writer
☠☠ backed out by f11cf71a5cca ☠ ☠
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Thu, 10 Sep 2015 22:36:16 +0200
changeset 294473 54ddccf4ddc0a00f7d2c52e2a4745e635170d4ef
parent 294472 2521189eba907c1d48f1c5f0d5d2e59d7e64e4f0
child 294474 f11cf71a5ccad575161d0208044aef25199c7823
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)
reviewersh4writer
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 8 - Move MacroAssembler::not32 into the generic macro assembler. r=h4writer
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/x86-shared/MacroAssembler-x86-shared-inl.h
js/src/jit/x86-shared/MacroAssembler-x86-shared.h
--- a/js/src/jit/MacroAssembler.h
+++ b/js/src/jit/MacroAssembler.h
@@ -664,16 +664,18 @@ class MacroAssembler : public MacroAssem
     // we want to store the JitCode on the stack in order to mark it during a GC.
     // This is a reference to a patch location where the JitCode* will be written.
     CodeOffsetLabel selfReferencePatch_;
 
   public:
     // ===============================================================
     // Logical instructions
 
+    inline void not32(Register reg) PER_SHARED_ARCH;
+
     inline void and32(Register src, Register dest) PER_SHARED_ARCH;
     inline void and32(Imm32 imm, Register dest) PER_SHARED_ARCH;
     inline void and32(Imm32 imm, Register src, Register dest) DEFINED_ON(arm64);
     inline void and32(Imm32 imm, const Address& dest) PER_SHARED_ARCH;
     inline void and32(const Address& src, Register dest) PER_SHARED_ARCH;
 
     inline void andPtr(Register src, Register dest) PER_ARCH;
     inline void andPtr(Imm32 imm, Register dest) PER_ARCH;
--- a/js/src/jit/arm/MacroAssembler-arm-inl.h
+++ b/js/src/jit/arm/MacroAssembler-arm-inl.h
@@ -12,16 +12,22 @@
 namespace js {
 namespace jit {
 
 //{{{ check_macroassembler_style
 // ===============================================================
 // Logical instructions
 
 void
+MacroAssembler::not32(Register reg)
+{
+    ma_mvn(reg, reg);
+}
+
+void
 MacroAssembler::and32(Register src, Register dest)
 {
     ma_and(src, dest, SetCC);
 }
 
 void
 MacroAssembler::and32(Imm32 imm, Register dest)
 {
--- a/js/src/jit/arm/MacroAssembler-arm.cpp
+++ b/js/src/jit/arm/MacroAssembler-arm.cpp
@@ -1956,22 +1956,16 @@ void
 MacroAssemblerARMCompat::addPtr(const Address& src, Register dest)
 {
     ScratchRegisterScope scratch(asMasm());
     load32(src, scratch);
     ma_add(scratch, dest, SetCC);
 }
 
 void
-MacroAssemblerARMCompat::not32(Register reg)
-{
-    ma_mvn(reg, reg);
-}
-
-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
@@ -1205,17 +1205,16 @@ class MacroAssemblerARMCompat : public M
     inline void and64(Imm64 imm, Register64 dest);
     inline void or64(Register64 src, Register64 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);
 
     void move32(Imm32 imm, Register dest);
     void move32(Register src, Register dest);
 
     void movePtr(Register src, Register dest);
     void movePtr(ImmWord imm, Register dest);
     void movePtr(ImmPtr imm, Register dest);
     void movePtr(AsmJSImmPtr imm, Register dest);
--- a/js/src/jit/arm64/MacroAssembler-arm64-inl.h
+++ b/js/src/jit/arm64/MacroAssembler-arm64-inl.h
@@ -12,16 +12,22 @@
 namespace js {
 namespace jit {
 
 //{{{ check_macroassembler_style
 // ===============================================================
 // Logical instructions
 
 void
+MacroAssembler::not32(Register reg)
+{
+    Orn(ARMRegister(reg, 32), vixl::wzr, ARMRegister(reg, 32));
+}
+
+void
 MacroAssembler::and32(Register src, Register dest)
 {
     And(ARMRegister(dest, 32), ARMRegister(dest, 32), Operand(ARMRegister(src, 32)));
 }
 
 void
 MacroAssembler::and32(Imm32 imm, Register dest)
 {
--- a/js/src/jit/arm64/MacroAssembler-arm64.h
+++ b/js/src/jit/arm64/MacroAssembler-arm64.h
@@ -809,19 +809,16 @@ class MacroAssemblerCompat : public vixl
     }
 
     // Move a pointer using a literal pool, so that the pointer
     // may be easily patched or traced.
     // Returns the BufferOffset of the load instruction emitted.
     BufferOffset movePatchablePtr(ImmWord ptr, Register dest);
     BufferOffset movePatchablePtr(ImmPtr ptr, Register dest);
 
-    void not32(Register reg) {
-        Orn(ARMRegister(reg, 32), vixl::wzr, ARMRegister(reg, 32));
-    }
     void neg32(Register reg) {
         Negs(ARMRegister(reg, 32), Operand(ARMRegister(reg, 32)));
     }
 
     void loadPtr(AsmJSAbsoluteAddress address, Register dest) {
         vixl::UseScratchRegisterScope temps(this);
         const ARMRegister scratch = temps.AcquireX();
         movePtr(AsmJSImmPtr(address.kind()), scratch.asUnsized());
--- a/js/src/jit/mips32/MacroAssembler-mips32-inl.h
+++ b/js/src/jit/mips32/MacroAssembler-mips32-inl.h
@@ -12,16 +12,22 @@
 namespace js {
 namespace jit {
 
 //{{{ check_macroassembler_style
 // ===============================================================
 // Logical instructions
 
 void
+MacroAssembler::not32(Register reg)
+{
+    ma_not(reg, reg);
+}
+
+void
 MacroAssembler::and32(Register src, Register dest)
 {
     ma_and(dest, dest, src);
 }
 
 void
 MacroAssembler::and32(Imm32 imm, Register dest)
 {
--- a/js/src/jit/mips32/MacroAssembler-mips32.cpp
+++ b/js/src/jit/mips32/MacroAssembler-mips32.cpp
@@ -1619,23 +1619,16 @@ MacroAssemblerMIPSCompat::addPtr(const A
 
 void
 MacroAssemblerMIPSCompat::subPtr(Register src, Register dest)
 {
     ma_subu(dest, dest, src);
 }
 
 void
-MacroAssemblerMIPSCompat::not32(Register reg)
-{
-    ma_not(reg, reg);
-}
-
-// Logical operations
-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,17 +1151,16 @@ public:
         }
     }
 
     inline void and64(Imm64 imm, Register64 dest);
     inline void or64(Register64 src, Register64 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) {
         move32(src.low, dest.low);
         move32(src.high, dest.high);
     }
 
--- a/js/src/jit/none/MacroAssembler-none.h
+++ b/js/src/jit/none/MacroAssembler-none.h
@@ -420,17 +420,16 @@ class MacroAssemblerNone : public Assemb
 
     template <typename T> void loadUnboxedValue(T, MIRType, AnyRegister) { MOZ_CRASH(); }
     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> 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(); }
 
     void branchPtrInNurseryRange(Condition, Register, Register, Label*) { MOZ_CRASH(); }
--- a/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h
+++ b/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h
@@ -12,16 +12,22 @@
 namespace js {
 namespace jit {
 
 //{{{ check_macroassembler_style
 // ===============================================================
 // Logical instructions
 
 void
+MacroAssembler::not32(Register reg)
+{
+    notl(reg);
+}
+
+void
 MacroAssembler::and32(Register src, Register dest)
 {
     andl(src, dest);
 }
 
 void
 MacroAssembler::and32(Imm32 imm, Register dest)
 {
--- a/js/src/jit/x86-shared/MacroAssembler-x86-shared.h
+++ b/js/src/jit/x86-shared/MacroAssembler-x86-shared.h
@@ -185,19 +185,16 @@ class MacroAssemblerX86Shared : public A
         add32(src, dest);
         j(cond, label);
     }
     template <typename T>
     void branchSub32(Condition cond, T src, Register dest, Label* label) {
         sub32(src, dest);
         j(cond, label);
     }
-    void not32(Register reg) {
-        notl(reg);
-    }
     void atomic_inc32(const Operand& addr) {
         lock_incl(addr);
     }
     void atomic_dec32(const Operand& addr) {
         lock_decl(addr);
     }
 
     template <typename T>