mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 868674 - Make supportsFloatingPoint() a static function. r=h4writer
--- js/src/assembler/assembler/MacroAssemblerARM.h | 6 +++--- js/src/assembler/assembler/MacroAssemblerARMv7.h | 6 +++--- js/src/assembler/assembler/MacroAssemblerMIPS.h | 6 +++--- js/src/assembler/assembler/MacroAssemblerSparc.h | 6 +++--- js/src/assembler/assembler/MacroAssemblerX86.h | 12 ++++-------- js/src/assembler/assembler/MacroAssemblerX86_64.h | 6 +++--- js/src/ion/AsmJS.cpp | 4 ++-- js/src/jsapi.cpp | 2 +- 8 files changed, 22 insertions(+), 26 deletions(-) --- js/src/assembler/assembler/MacroAssemblerARM.h | 6 +++--- js/src/assembler/assembler/MacroAssemblerARMv7.h | 6 +++--- js/src/assembler/assembler/MacroAssemblerMIPS.h | 6 +++--- js/src/assembler/assembler/MacroAssemblerSparc.h | 6 +++--- js/src/assembler/assembler/MacroAssemblerX86.h | 12 ++++-------- js/src/assembler/assembler/MacroAssemblerX86_64.h | 6 +++--- js/src/ion/AsmJS.cpp | 4 ++-- js/src/jsapi.cpp | 2 +- 8 files changed, 22 insertions(+), 26 deletions(-) --HG-- extra : rebase_source : f4ec6b6c9c9f94959311685150b77a63bb5fd9be
This commit is contained in:
parent
c52c15b2d9
commit
b41e1eef50
@ -1111,17 +1111,17 @@ public:
|
||||
}
|
||||
|
||||
// Floating point operators
|
||||
bool supportsFloatingPoint() const
|
||||
static bool supportsFloatingPoint()
|
||||
{
|
||||
return s_isVFPPresent;
|
||||
}
|
||||
|
||||
bool supportsFloatingPointTruncate() const
|
||||
static bool supportsFloatingPointTruncate()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool supportsFloatingPointSqrt() const
|
||||
static bool supportsFloatingPointSqrt()
|
||||
{
|
||||
return s_isVFPPresent;
|
||||
}
|
||||
|
@ -507,7 +507,7 @@ public:
|
||||
|
||||
// Floating-point operations:
|
||||
|
||||
bool supportsFloatingPoint() const { return true; }
|
||||
static bool supportsFloatingPoint() { 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)
|
||||
@ -519,9 +519,9 @@ public:
|
||||
// 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:.
|
||||
bool supportsFloatingPointTruncate() const { return false; }
|
||||
static bool supportsFloatingPointTruncate() { return false; }
|
||||
|
||||
bool supportsFloatingPointSqrt() const
|
||||
static bool supportsFloatingPointSqrt()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -1389,7 +1389,7 @@ public:
|
||||
|
||||
// Floating-point operations:
|
||||
|
||||
bool supportsFloatingPoint() const
|
||||
static bool supportsFloatingPoint()
|
||||
{
|
||||
#if WTF_MIPS_DOUBLE_FLOAT
|
||||
return true;
|
||||
@ -1398,7 +1398,7 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
bool supportsFloatingPointTruncate() const
|
||||
static bool supportsFloatingPointTruncate()
|
||||
{
|
||||
#if WTF_MIPS_DOUBLE_FLOAT && WTF_MIPS_ISA_AT_LEAST(2)
|
||||
return true;
|
||||
@ -1407,7 +1407,7 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
bool supportsFloatingPointSqrt() const
|
||||
static bool supportsFloatingPointSqrt()
|
||||
{
|
||||
#if WTF_MIPS_DOUBLE_FLOAT && WTF_MIPS_ISA_AT_LEAST(2)
|
||||
return true;
|
||||
|
@ -1107,17 +1107,17 @@ namespace JSC {
|
||||
}
|
||||
|
||||
// Floating point operators
|
||||
bool supportsFloatingPoint() const
|
||||
static bool supportsFloatingPoint()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool supportsFloatingPointTruncate() const
|
||||
static bool supportsFloatingPointTruncate()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool supportsFloatingPointSqrt() const
|
||||
static bool supportsFloatingPointSqrt()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -41,9 +41,7 @@ namespace JSC {
|
||||
class MacroAssemblerX86 : public MacroAssemblerX86Common {
|
||||
public:
|
||||
MacroAssemblerX86()
|
||||
: m_isSSE2Present(isSSE2Present())
|
||||
{
|
||||
}
|
||||
{ }
|
||||
|
||||
static const Scale ScalePtr = TimesFour;
|
||||
static const unsigned int TotalRegisters = 8;
|
||||
@ -229,14 +227,12 @@ public:
|
||||
m_assembler.popa();
|
||||
}
|
||||
|
||||
bool supportsFloatingPoint() const { return m_isSSE2Present; }
|
||||
static bool supportsFloatingPoint() { return isSSE2Present(); }
|
||||
// See comment on MacroAssemblerARMv7::supportsFloatingPointTruncate()
|
||||
bool supportsFloatingPointTruncate() const { return m_isSSE2Present; }
|
||||
bool supportsFloatingPointSqrt() const { return m_isSSE2Present; }
|
||||
static bool supportsFloatingPointTruncate() { return isSSE2Present(); }
|
||||
static bool supportsFloatingPointSqrt() { return isSSE2Present(); }
|
||||
|
||||
private:
|
||||
const bool m_isSSE2Present;
|
||||
|
||||
friend class LinkBuffer;
|
||||
friend class RepatchBuffer;
|
||||
|
||||
|
@ -568,10 +568,10 @@ public:
|
||||
storePtr(ImmPtr(reinterpret_cast<void *>(imm.u.u64)), address);
|
||||
}
|
||||
|
||||
bool supportsFloatingPoint() const { return true; }
|
||||
static bool supportsFloatingPoint() { return true; }
|
||||
// See comment on MacroAssemblerARMv7::supportsFloatingPointTruncate()
|
||||
bool supportsFloatingPointTruncate() const { return true; }
|
||||
bool supportsFloatingPointSqrt() const { return true; }
|
||||
static bool supportsFloatingPointTruncate() { return true; }
|
||||
static bool supportsFloatingPointSqrt() { return true; }
|
||||
|
||||
private:
|
||||
friend class LinkBuffer;
|
||||
|
@ -6354,7 +6354,7 @@ js::CompileAsmJS(JSContext *cx, AsmJSParser &parser, ParseNode *stmtList, bool *
|
||||
{
|
||||
*validated = false;
|
||||
|
||||
if (!JSC::MacroAssembler().supportsFloatingPoint())
|
||||
if (!JSC::MacroAssembler::supportsFloatingPoint())
|
||||
return Warn(cx, JSMSG_USE_ASM_TYPE_FAIL, "Disabled by lack of floating point support");
|
||||
|
||||
if (cx->runtime()->gcSystemPageSize != AsmJSPageSize)
|
||||
@ -6413,7 +6413,7 @@ js::IsAsmJSCompilationAvailable(JSContext *cx, unsigned argc, Value *vp)
|
||||
{
|
||||
CallArgs args = CallArgsFromVp(argc, vp);
|
||||
|
||||
bool available = JSC::MacroAssembler().supportsFloatingPoint() &&
|
||||
bool available = JSC::MacroAssembler::supportsFloatingPoint() &&
|
||||
!cx->compartment()->debugMode() &&
|
||||
cx->hasOption(JSOPTION_ASMJS);
|
||||
|
||||
|
@ -654,7 +654,7 @@ static bool
|
||||
JitSupportsFloatingPoint()
|
||||
{
|
||||
#if defined(JS_ION)
|
||||
if (!JSC::MacroAssembler().supportsFloatingPoint())
|
||||
if (!JSC::MacroAssembler::supportsFloatingPoint())
|
||||
return false;
|
||||
|
||||
#if defined(JS_ION) && WTF_ARM_ARCH_VERSION == 6
|
||||
|
Loading…
Reference in New Issue
Block a user