Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (99651 => 99652)
--- trunk/Source/_javascript_Core/ChangeLog 2011-11-09 05:44:47 UTC (rev 99651)
+++ trunk/Source/_javascript_Core/ChangeLog 2011-11-09 06:41:55 UTC (rev 99652)
@@ -1,3 +1,59 @@
+2011-11-08 Sheriff Bot <webkit.review....@gmail.com>
+
+ Unreviewed, rolling out r99647.
+ http://trac.webkit.org/changeset/99647
+ https://bugs.webkit.org/show_bug.cgi?id=71876
+
+ It broke jsc and layout tests on all bot (Requested by
+ Ossy_night on #webkit).
+
+ * assembler/MacroAssemblerARM.h:
+ (JSC::MacroAssemblerARM::supportsFloatingPoint):
+ (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
+ (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
+ (JSC::MacroAssemblerARM::supportsDoubleBitops):
+ (JSC::MacroAssemblerARM::andnotDouble):
+ * assembler/MacroAssemblerARMv7.h:
+ (JSC::MacroAssemblerARMv7::supportsFloatingPoint):
+ (JSC::MacroAssemblerARMv7::supportsFloatingPointTruncate):
+ (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
+ (JSC::MacroAssemblerARMv7::supportsDoubleBitops):
+ * assembler/MacroAssemblerMIPS.h:
+ (JSC::MacroAssemblerMIPS::andnotDouble):
+ (JSC::MacroAssemblerMIPS::supportsFloatingPoint):
+ (JSC::MacroAssemblerMIPS::supportsFloatingPointTruncate):
+ (JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt):
+ (JSC::MacroAssemblerMIPS::supportsDoubleBitops):
+ * assembler/MacroAssemblerSH4.h:
+ (JSC::MacroAssemblerSH4::supportsFloatingPoint):
+ (JSC::MacroAssemblerSH4::supportsFloatingPointTruncate):
+ (JSC::MacroAssemblerSH4::supportsFloatingPointSqrt):
+ (JSC::MacroAssemblerSH4::supportsDoubleBitops):
+ (JSC::MacroAssemblerSH4::andnotDouble):
+ * assembler/MacroAssemblerX86.h:
+ (JSC::MacroAssemblerX86::MacroAssemblerX86):
+ (JSC::MacroAssemblerX86::supportsFloatingPoint):
+ (JSC::MacroAssemblerX86::supportsFloatingPointTruncate):
+ (JSC::MacroAssemblerX86::supportsFloatingPointSqrt):
+ (JSC::MacroAssemblerX86::supportsDoubleBitops):
+ * assembler/MacroAssemblerX86Common.h:
+ (JSC::MacroAssemblerX86Common::andnotDouble):
+ * assembler/MacroAssemblerX86_64.h:
+ (JSC::MacroAssemblerX86_64::supportsFloatingPoint):
+ (JSC::MacroAssemblerX86_64::supportsFloatingPointTruncate):
+ (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt):
+ (JSC::MacroAssemblerX86_64::supportsDoubleBitops):
+ * assembler/X86Assembler.h:
+ * dfg/DFGByteCodeParser.cpp:
+ (JSC::DFG::ByteCodeParser::handleIntrinsic):
+ * dfg/DFGSpeculativeJIT32_64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile):
+ * dfg/DFGSpeculativeJIT64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile):
+ * jit/ThunkGenerators.cpp:
+ (JSC::absThunkGenerator):
+ * runtime/JSGlobalData.cpp:
+
2011-11-08 Gavin Barraclough <barraclo...@apple.com>
Better abstract 'abs' operation through the MacroAssembler.
Modified: trunk/Source/_javascript_Core/assembler/MacroAssemblerARM.h (99651 => 99652)
--- trunk/Source/_javascript_Core/assembler/MacroAssemblerARM.h 2011-11-09 05:44:47 UTC (rev 99651)
+++ trunk/Source/_javascript_Core/assembler/MacroAssemblerARM.h 2011-11-09 06:41:55 UTC (rev 99652)
@@ -780,21 +780,21 @@
}
// Floating point operators
- static bool supportsFloatingPoint()
+ bool supportsFloatingPoint() const
{
return s_isVFPPresent;
}
- static bool supportsFloatingPointTruncate()
+ bool supportsFloatingPointTruncate() const
{
return false;
}
- static bool supportsFloatingPointSqrt()
+ bool supportsFloatingPointSqrt() const
{
return s_isVFPPresent;
}
- static bool supportsFloatingPointAbs() { return false; }
+ bool supportsDoubleBitops() const { return false; }
void loadDouble(ImplicitAddress address, FPRegisterID dest)
{
@@ -862,7 +862,7 @@
m_assembler.vsqrt_f64_r(dest, src);
}
- void absDouble(FPRegisterID, FPRegisterID)
+ void andnotDouble(FPRegisterID, FPRegisterID)
{
ASSERT_NOT_REACHED();
}
Modified: trunk/Source/_javascript_Core/assembler/MacroAssemblerARMv7.h (99651 => 99652)
--- trunk/Source/_javascript_Core/assembler/MacroAssemblerARMv7.h 2011-11-09 05:44:47 UTC (rev 99651)
+++ trunk/Source/_javascript_Core/assembler/MacroAssemblerARMv7.h 2011-11-09 06:41:55 UTC (rev 99652)
@@ -564,7 +564,7 @@
// Floating-point operations:
- static bool supportsFloatingPoint() { return true; }
+ bool supportsFloatingPoint() const { return true; }
// On x86(_64) the MacroAssembler provides an interface to truncate a double to an integer.
// If a value is not representable as an integer, and possibly for some values that are,
// (on x86 INT_MIN, since this is indistinguishable from results for out-of-range/NaN input)
@@ -576,13 +576,13 @@
// generic, or decide that the MacroAssembler cannot practically be used to abstracted these
// operations, and make clients go directly to the m_assembler to plant truncation instructions.
// In short, FIXME:.
- static bool supportsFloatingPointTruncate() { return false; }
+ bool supportsFloatingPointTruncate() const { return false; }
- static bool supportsFloatingPointSqrt()
+ bool supportsFloatingPointSqrt() const
{
return false;
}
- static bool supportsFloatingPointAbs() { return false; }
+ bool supportsDoubleBitops() const { return false; }
void loadDouble(ImplicitAddress address, FPRegisterID dest)
{
@@ -663,7 +663,7 @@
ASSERT_NOT_REACHED();
}
- void absDouble(FPRegisterID, FPRegisterID) NO_RETURN_DUE_TO_ASSERT
+ void andnotDouble(FPRegisterID, FPRegisterID) NO_RETURN_DUE_TO_ASSERT
{
ASSERT_NOT_REACHED();
}
Modified: trunk/Source/_javascript_Core/assembler/MacroAssemblerMIPS.h (99651 => 99652)
--- trunk/Source/_javascript_Core/assembler/MacroAssemblerMIPS.h 2011-11-09 05:44:47 UTC (rev 99651)
+++ trunk/Source/_javascript_Core/assembler/MacroAssemblerMIPS.h 2011-11-09 06:41:55 UTC (rev 99652)
@@ -471,7 +471,7 @@
m_assembler.sqrtd(dst, src);
}
- void absDouble(FPRegisterID, FPRegisterID)
+ void andnotDouble(FPRegisterID, FPRegisterID)
{
ASSERT_NOT_REACHED();
}
@@ -834,7 +834,7 @@
// Floating-point operations:
- static bool supportsFloatingPoint()
+ bool supportsFloatingPoint() const
{
#if WTF_MIPS_DOUBLE_FLOAT
return true;
@@ -843,7 +843,7 @@
#endif
}
- static bool supportsFloatingPointTruncate()
+ bool supportsFloatingPointTruncate() const
{
#if WTF_MIPS_DOUBLE_FLOAT && WTF_MIPS_ISA_AT_LEAST(2)
return true;
@@ -852,7 +852,7 @@
#endif
}
- static bool supportsFloatingPointSqrt()
+ bool supportsFloatingPointSqrt() const
{
#if WTF_MIPS_DOUBLE_FLOAT && WTF_MIPS_ISA_AT_LEAST(2)
return true;
@@ -860,7 +860,7 @@
return false;
#endif
}
- static bool supportsFloatingPointAbs() { return false; }
+ bool supportsDoubleBitops() const { return false; }
// Stack manipulation operations:
//
Modified: trunk/Source/_javascript_Core/assembler/MacroAssemblerSH4.h (99651 => 99652)
--- trunk/Source/_javascript_Core/assembler/MacroAssemblerSH4.h 2011-11-09 05:44:47 UTC (rev 99651)
+++ trunk/Source/_javascript_Core/assembler/MacroAssemblerSH4.h 2011-11-09 06:41:55 UTC (rev 99652)
@@ -786,10 +786,10 @@
// Floating-point operations
- static bool supportsFloatingPoint() { return true; }
- static bool supportsFloatingPointTruncate() { return true; }
- static bool supportsFloatingPointSqrt() { return true; }
- static bool supportsFloatingPointAbs() { return false; }
+ bool supportsFloatingPoint() const { return true; }
+ bool supportsFloatingPointTruncate() const { return true; }
+ bool supportsFloatingPointSqrt() const { return true; }
+ bool supportsDoubleBitops() const { return false; }
void loadDouble(ImplicitAddress address, FPRegisterID dest)
{
@@ -1129,7 +1129,7 @@
m_assembler.dsqrt(dest);
}
- void absDouble(FPRegisterID, FPRegisterID)
+ void andnotDouble(FPRegisterID, FPRegisterID)
{
ASSERT_NOT_REACHED();
}
Modified: trunk/Source/_javascript_Core/assembler/MacroAssemblerX86.h (99651 => 99652)
--- trunk/Source/_javascript_Core/assembler/MacroAssemblerX86.h 2011-11-09 05:44:47 UTC (rev 99651)
+++ trunk/Source/_javascript_Core/assembler/MacroAssemblerX86.h 2011-11-09 06:41:55 UTC (rev 99652)
@@ -34,6 +34,11 @@
class MacroAssemblerX86 : public MacroAssemblerX86Common {
public:
+ MacroAssemblerX86()
+ : m_isSSE2Present(isSSE2Present())
+ {
+ }
+
static const Scale ScalePtr = TimesFour;
using MacroAssemblerX86Common::add32;
@@ -108,12 +113,6 @@
m_assembler.cvtsi2sd_mr(src.m_ptr, dest);
}
- void absDouble(FPRegisterID src, FPRegisterID dst)
- {
- moveDouble(src, dst);
- m_assembler.andpd_mr(&s_maskSignBit, dst);
- }
-
void store32(TrustedImm32 imm, void* address)
{
m_assembler.movl_i32m(imm.m_value, address);
@@ -190,13 +189,15 @@
return DataLabelPtr(this);
}
- static bool supportsFloatingPoint() { return isSSE2Present(); }
+ bool supportsFloatingPoint() const { return m_isSSE2Present; }
// See comment on MacroAssemblerARMv7::supportsFloatingPointTruncate()
- static bool supportsFloatingPointTruncate() { return isSSE2Present(); }
- static bool supportsFloatingPointSqrt() { return isSSE2Present(); }
- static bool supportsFloatingPointAbs() { return isSSE2Present(); }
+ bool supportsFloatingPointTruncate() const { return m_isSSE2Present; }
+ bool supportsFloatingPointSqrt() const { return m_isSSE2Present; }
+ bool supportsDoubleBitops() const { return m_isSSE2Present; }
private:
+ const bool m_isSSE2Present;
+
friend class LinkBuffer;
friend class RepatchBuffer;
Modified: trunk/Source/_javascript_Core/assembler/MacroAssemblerX86Common.h (99651 => 99652)
--- trunk/Source/_javascript_Core/assembler/MacroAssemblerX86Common.h 2011-11-09 05:44:47 UTC (rev 99651)
+++ trunk/Source/_javascript_Core/assembler/MacroAssemblerX86Common.h 2011-11-09 06:41:55 UTC (rev 99652)
@@ -424,6 +424,11 @@
m_assembler.sqrtsd_rr(src, dst);
}
+ void andnotDouble(FPRegisterID src, FPRegisterID dst)
+ {
+ m_assembler.andnpd_rr(src, dst);
+ }
+
// Memory access operations:
//
// Loads are of the form load(address, destination) and stores of the form
@@ -1261,9 +1266,6 @@
}
protected:
- // A 64-bit mask with all bits set other than the sign bit (used in abs).
- static const uint64_t s_maskSignBit;
-
X86Assembler::Condition x86Condition(RelationalCondition cond)
{
return static_cast<X86Assembler::Condition>(cond);
Modified: trunk/Source/_javascript_Core/assembler/MacroAssemblerX86_64.h (99651 => 99652)
--- trunk/Source/_javascript_Core/assembler/MacroAssemblerX86_64.h 2011-11-09 05:44:47 UTC (rev 99651)
+++ trunk/Source/_javascript_Core/assembler/MacroAssemblerX86_64.h 2011-11-09 06:41:55 UTC (rev 99652)
@@ -105,13 +105,6 @@
m_assembler.cvtsi2sd_rr(scratchRegister, dest);
}
- void absDouble(FPRegisterID src, FPRegisterID dst)
- {
- moveDouble(src, dst);
- move(TrustedImmPtr(&s_maskSignBit), scratchRegister);
- m_assembler.andpd_mr(0, scratchRegister, dst);
- }
-
void store32(TrustedImm32 imm, void* address)
{
move(TrustedImmPtr(address), scratchRegister);
@@ -468,11 +461,11 @@
return MacroAssemblerX86Common::branchTest8(cond, BaseIndex(scratchRegister, address.base, TimesOne), mask);
}
- static bool supportsFloatingPoint() { return true; }
+ bool supportsFloatingPoint() const { return true; }
// See comment on MacroAssemblerARMv7::supportsFloatingPointTruncate()
- static bool supportsFloatingPointTruncate() { return true; }
- static bool supportsFloatingPointSqrt() { return true; }
- static bool supportsFloatingPointAbs() { return true; }
+ bool supportsFloatingPointTruncate() const { return true; }
+ bool supportsFloatingPointSqrt() const { return true; }
+ bool supportsDoubleBitops() const { return true; }
private:
friend class LinkBuffer;
Modified: trunk/Source/_javascript_Core/assembler/X86Assembler.h (99651 => 99652)
--- trunk/Source/_javascript_Core/assembler/X86Assembler.h 2011-11-09 05:44:47 UTC (rev 99651)
+++ trunk/Source/_javascript_Core/assembler/X86Assembler.h 2011-11-09 06:41:55 UTC (rev 99652)
@@ -173,7 +173,6 @@
OP2_SUBSD_VsdWsd = 0x5C,
OP2_DIVSD_VsdWsd = 0x5E,
OP2_SQRTSD_VsdWsd = 0x51,
- OP2_ANDPD_VpdWpd = 0x54,
OP2_ANDNPD_VpdWpd = 0x55,
OP2_XORPD_VpdWpd = 0x57,
OP2_MOVD_VdEd = 0x6E,
@@ -1568,26 +1567,6 @@
m_formatter.twoByteOp(OP2_ANDNPD_VpdWpd, (RegisterID)dst, (RegisterID)src);
}
- void andpd_rr(XMMRegisterID src, XMMRegisterID dst)
- {
- m_formatter.prefix(PRE_SSE_66);
- m_formatter.twoByteOp(OP2_ANDPD_VpdWpd, (RegisterID)dst, (RegisterID)src);
- }
-
- void andpd_mr(int offset, RegisterID base, XMMRegisterID dst)
- {
- m_formatter.prefix(PRE_SSE_66);
- m_formatter.twoByteOp(OP2_ANDPD_VpdWpd, (RegisterID)dst, base, offset);
- }
-
-#if CPU(X86)
- void andpd_mr(const void* address, XMMRegisterID dst)
- {
- m_formatter.prefix(PRE_SSE_66);
- m_formatter.twoByteOp(OP2_ANDPD_VpdWpd, (RegisterID)dst, address);
- }
-#endif
-
void sqrtsd_rr(XMMRegisterID src, XMMRegisterID dst)
{
m_formatter.prefix(PRE_SSE_F2);
Modified: trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp (99651 => 99652)
--- trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp 2011-11-09 05:44:47 UTC (rev 99651)
+++ trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp 2011-11-09 06:41:55 UTC (rev 99652)
@@ -1141,15 +1141,10 @@
// We don't care about the this argument. If we don't have a first
// argument then make this JSConstant(NaN).
int absArg = firstArg + 1;
- if (absArg > lastArg) {
+ if (absArg > lastArg)
set(resultOperand, constantNaN());
- return true;
- }
-
- if (!MacroAssembler::supportsFloatingPointAbs())
- return false;
-
- set(resultOperand, addToGraph(ArithAbs, OpInfo(NodeUseBottom), getToNumber(absArg)));
+ else
+ set(resultOperand, addToGraph(ArithAbs, OpInfo(NodeUseBottom), getToNumber(absArg)));
return true;
}
@@ -1168,9 +1163,6 @@
return true;
}
- if (!MacroAssembler::supportsFloatingPointSqrt())
- return false;
-
set(resultOperand, addToGraph(ArithSqrt, getToNumber(firstArg + 1)));
return true;
}
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp (99651 => 99652)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp 2011-11-09 05:44:47 UTC (rev 99651)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp 2011-11-09 06:41:55 UTC (rev 99652)
@@ -1256,9 +1256,12 @@
}
SpeculateDoubleOperand op1(this, node.child1());
- FPRTemporary result(this, op1);
+ FPRTemporary result(this);
- m_jit.absDouble(op1.fpr(), result.fpr());
+ static const double negativeZeroConstant = -0.0;
+
+ m_jit.loadDouble(&negativeZeroConstant, result.fpr());
+ m_jit.andnotDouble(op1.fpr(), result.fpr());
doubleResult(result.fpr(), m_compileIndex);
break;
}
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp (99651 => 99652)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp 2011-11-09 05:44:47 UTC (rev 99651)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp 2011-11-09 06:41:55 UTC (rev 99652)
@@ -1306,9 +1306,12 @@
}
SpeculateDoubleOperand op1(this, node.child1());
- FPRTemporary result(this, op1);
+ FPRTemporary result(this);
- m_jit.absDouble(op1.fpr(), result.fpr());
+ static const double negativeZeroConstant = -0.0;
+
+ m_jit.loadDouble(&negativeZeroConstant, result.fpr());
+ m_jit.andnotDouble(op1.fpr(), result.fpr());
doubleResult(result.fpr(), m_compileIndex);
break;
}
Modified: trunk/Source/_javascript_Core/jit/ThunkGenerators.cpp (99651 => 99652)
--- trunk/Source/_javascript_Core/jit/ThunkGenerators.cpp 2011-11-09 05:44:47 UTC (rev 99651)
+++ trunk/Source/_javascript_Core/jit/ThunkGenerators.cpp 2011-11-09 06:41:55 UTC (rev 99652)
@@ -277,7 +277,7 @@
MacroAssemblerCodeRef absThunkGenerator(JSGlobalData* globalData)
{
SpecializedThunkJIT jit(1, globalData);
- if (!jit.supportsFloatingPointAbs())
+ if (!jit.supportsDoubleBitops())
return MacroAssemblerCodeRef::createSelfManagedCodeRef(globalData->jitStubs->ctiNativeCall());
MacroAssembler::Jump nonIntJump;
jit.loadInt32Argument(0, SpecializedThunkJIT::regT0, nonIntJump);
@@ -288,8 +288,9 @@
jit.returnInt32(SpecializedThunkJIT::regT0);
nonIntJump.link(&jit);
// Shame about the double int conversion here.
+ jit.loadDouble(&negativeZeroConstant, SpecializedThunkJIT::fpRegT1);
jit.loadDoubleArgument(0, SpecializedThunkJIT::fpRegT0, SpecializedThunkJIT::regT0);
- jit.absDouble(SpecializedThunkJIT::fpRegT0, SpecializedThunkJIT::fpRegT1);
+ jit.andnotDouble(SpecializedThunkJIT::fpRegT0, SpecializedThunkJIT::fpRegT1);
jit.returnDouble(SpecializedThunkJIT::fpRegT1);
return jit.finalize(*globalData, globalData->jitStubs->ctiNativeCall());
}
Modified: trunk/Source/_javascript_Core/runtime/JSGlobalData.cpp (99651 => 99652)
--- trunk/Source/_javascript_Core/runtime/JSGlobalData.cpp 2011-11-09 05:44:47 UTC (rev 99651)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalData.cpp 2011-11-09 06:41:55 UTC (rev 99652)
@@ -88,10 +88,6 @@
namespace JSC {
-#if ENABLE(ASSEMBLER) && (CPU(X86) || CPU(X86_64))
-const uint64_t MacroAssemblerX86Common::s_maskSignBit = 0x7FFFFFFFFFFFFFFFull;
-#endif
-
extern JSC_CONST_HASHTABLE HashTable arrayConstructorTable;
extern JSC_CONST_HASHTABLE HashTable arrayPrototypeTable;
extern JSC_CONST_HASHTABLE HashTable booleanPrototypeTable;