Bug 1229057 - Part 4: Move MacroAssembler::addFloat32 into generic macro assembler. r=h4writer
authorTooru Fujisawa <arai_a@mac.com>
Tue, 01 Dec 2015 17:02:36 +0900
changeset 316145 7f0947717a9fe5c60781d17c7e580d7ad7adbdb6
parent 316144 275f7590bbe659457b349104a1b984de762dea09
child 316146 2491e453b8d049a1e27e6ab608c121d25ea1882b
push id8516
push userjlund@mozilla.com
push dateFri, 18 Dec 2015 00:52:34 +0000
reviewersh4writer
bugs1229057
milestone46.0a1
Bug 1229057 - Part 4: Move MacroAssembler::addFloat32 into generic macro assembler. r=h4writer
js/src/jit/MacroAssembler.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
@@ -744,16 +744,18 @@ class MacroAssembler : public MacroAssem
     inline void addPtr(ImmPtr imm, Register dest);
     inline void addPtr(Imm32 imm, const Address& dest) DEFINED_ON(mips_shared, arm, arm64, x86, x64);
     inline void addPtr(Imm32 imm, const AbsoluteAddress& dest) DEFINED_ON(x86, x64);
     inline void addPtr(const Address& src, Register dest) DEFINED_ON(mips_shared, arm, arm64, x86, x64);
 
     inline void add64(Register64 src, Register64 dest) PER_ARCH;
     inline void add64(Imm32 imm, Register64 dest) PER_ARCH;
 
+    inline void addFloat32(FloatRegister src, FloatRegister dest) DEFINED_ON(x86_shared);
+
     inline void sub32(const Address& src, Register dest) PER_SHARED_ARCH;
     inline void sub32(Register src, Register dest) PER_SHARED_ARCH;
     inline void sub32(Imm32 imm, Register dest) PER_SHARED_ARCH;
 
     // ===============================================================
     // Shift functions
 
     inline void lshiftPtr(Imm32 imm, Register dest) PER_ARCH;
--- a/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h
+++ b/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h
@@ -99,16 +99,22 @@ MacroAssembler::add32(Imm32 imm, const A
 
 void
 MacroAssembler::add32(Imm32 imm, const AbsoluteAddress& dest)
 {
     addl(imm, Operand(dest));
 }
 
 void
+MacroAssembler::addFloat32(FloatRegister src, FloatRegister dest)
+{
+    vaddss(src, dest, dest);
+}
+
+void
 MacroAssembler::sub32(Register src, Register dest)
 {
     subl(src, dest);
 }
 
 void
 MacroAssembler::sub32(Imm32 imm, Register dest)
 {
--- a/js/src/jit/x86-shared/MacroAssembler-x86-shared.h
+++ b/js/src/jit/x86-shared/MacroAssembler-x86-shared.h
@@ -929,19 +929,16 @@ class MacroAssemblerX86Shared : public A
         vsubsd(src, dest, dest);
     }
     void mulDouble(FloatRegister src, FloatRegister dest) {
         vmulsd(src, dest, dest);
     }
     void divDouble(FloatRegister src, FloatRegister dest) {
         vdivsd(src, dest, dest);
     }
-    void addFloat32(FloatRegister src, FloatRegister dest) {
-        vaddss(src, dest, dest);
-    }
     void convertFloat32ToDouble(FloatRegister src, FloatRegister dest) {
         vcvtss2sd(src, dest, dest);
     }
     void convertDoubleToFloat32(FloatRegister src, FloatRegister dest) {
         vcvtsd2ss(src, dest, dest);
     }
 
     void convertFloat32x4ToInt32x4(FloatRegister src, FloatRegister dest) {