Skip to content

Commit 29e063b

Browse files
author
Gavin Barraclough
committed
Better abstract 'abs' operation through the MacroAssembler.
https://bugs.webkit.org/show_bug.cgi?id=71873 Reviewed by Geoff Garen. Currently the x86 specific instruction sequence to perform a double abs is duplicated throughout the JITs / thunk generators. * assembler/MacroAssemblerARM.h: (JSC::MacroAssemblerARM::supportsFloatingPoint): (JSC::MacroAssemblerARM::supportsFloatingPointTruncate): (JSC::MacroAssemblerARM::supportsFloatingPointSqrt): (JSC::MacroAssemblerARM::supportsFloatingPointAbs): (JSC::MacroAssemblerARM::absDouble): - Renamed supportsFloatingPointAbs, make these methods static so that we can check the JIT's capabilites before we begin compilation. * assembler/MacroAssemblerARMv7.h: (JSC::MacroAssemblerARMv7::supportsFloatingPoint): (JSC::MacroAssemblerARMv7::supportsFloatingPointTruncate): (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt): (JSC::MacroAssemblerARMv7::supportsFloatingPointAbs): - Renamed supportsFloatingPointAbs, make these methods static so that we can check the JIT's capabilites before we begin compilation. * assembler/MacroAssemblerMIPS.h: (JSC::MacroAssemblerMIPS::absDouble): (JSC::MacroAssemblerMIPS::supportsFloatingPoint): (JSC::MacroAssemblerMIPS::supportsFloatingPointTruncate): (JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt): (JSC::MacroAssemblerMIPS::supportsFloatingPointAbs): - Renamed supportsFloatingPointAbs, make these methods static so that we can check the JIT's capabilites before we begin compilation. * assembler/MacroAssemblerSH4.h: (JSC::MacroAssemblerSH4::supportsFloatingPoint): (JSC::MacroAssemblerSH4::supportsFloatingPointTruncate): (JSC::MacroAssemblerSH4::supportsFloatingPointSqrt): (JSC::MacroAssemblerSH4::supportsFloatingPointAbs): (JSC::MacroAssemblerSH4::absDouble): - Renamed supportsFloatingPointAbs, make these methods static so that we can check the JIT's capabilites before we begin compilation. * assembler/MacroAssemblerX86.h: (JSC::MacroAssemblerX86::absDouble): (JSC::MacroAssemblerX86::supportsFloatingPoint): (JSC::MacroAssemblerX86::supportsFloatingPointTruncate): (JSC::MacroAssemblerX86::supportsFloatingPointSqrt): (JSC::MacroAssemblerX86::supportsFloatingPointAbs): - Made supports* methods static so that we can check the JIT's capabilites before we begin compilation. Added absDouble. * assembler/MacroAssemblerX86Common.h: - Removed andnotDouble, added s_maskSignBit. * assembler/MacroAssemblerX86_64.h: (JSC::MacroAssemblerX86_64::absDouble): (JSC::MacroAssemblerX86_64::supportsFloatingPoint): (JSC::MacroAssemblerX86_64::supportsFloatingPointTruncate): (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt): (JSC::MacroAssemblerX86_64::supportsFloatingPointAbs): - Made supports* methods static so that we can check the JIT's capabilites before we begin compilation. Added absDouble. * assembler/X86Assembler.h: (JSC::X86Assembler::andpd_rr): (JSC::X86Assembler::andpd_mr): - Added support for andpd instruction. * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::handleIntrinsic): - Added checks for supportsFloatingPointAbs, supportsFloatingPointSqrt. * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::compile): - Switched to use doubleAbs, we can now also reuse the operand register for the result. * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compile): - Switched to use doubleAbs, we can now also reuse the operand register for the result. * jit/ThunkGenerators.cpp: - Switched to use doubleAbs. (JSC::absThunkGenerator): * runtime/JSGlobalData.cpp: - Declared MacroAssemblerX86Common::s_maskSignBit here. This is a little ugly, but it doesn't seem worth adding a whole extra .cpp to the compile for just one constant. Canonical link: https://commits.webkit.org/88214@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent f6034aa commit 29e063b

14 files changed

Lines changed: 166 additions & 56 deletions

Source/JavaScriptCore/ChangeLog

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,83 @@
1+
2011-11-08 Gavin Barraclough <barraclough@apple.com>
2+
3+
Better abstract 'abs' operation through the MacroAssembler.
4+
https://bugs.webkit.org/show_bug.cgi?id=71873
5+
6+
Reviewed by Geoff Garen.
7+
8+
Currently the x86 specific instruction sequence to perform a double abs
9+
is duplicated throughout the JITs / thunk generators.
10+
11+
* assembler/MacroAssemblerARM.h:
12+
(JSC::MacroAssemblerARM::supportsFloatingPoint):
13+
(JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
14+
(JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
15+
(JSC::MacroAssemblerARM::supportsFloatingPointAbs):
16+
(JSC::MacroAssemblerARM::absDouble):
17+
- Renamed supportsFloatingPointAbs, make these methods static so that
18+
we can check the JIT's capabilites before we begin compilation.
19+
* assembler/MacroAssemblerARMv7.h:
20+
(JSC::MacroAssemblerARMv7::supportsFloatingPoint):
21+
(JSC::MacroAssemblerARMv7::supportsFloatingPointTruncate):
22+
(JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
23+
(JSC::MacroAssemblerARMv7::supportsFloatingPointAbs):
24+
- Renamed supportsFloatingPointAbs, make these methods static so that
25+
we can check the JIT's capabilites before we begin compilation.
26+
* assembler/MacroAssemblerMIPS.h:
27+
(JSC::MacroAssemblerMIPS::absDouble):
28+
(JSC::MacroAssemblerMIPS::supportsFloatingPoint):
29+
(JSC::MacroAssemblerMIPS::supportsFloatingPointTruncate):
30+
(JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt):
31+
(JSC::MacroAssemblerMIPS::supportsFloatingPointAbs):
32+
- Renamed supportsFloatingPointAbs, make these methods static so that
33+
we can check the JIT's capabilites before we begin compilation.
34+
* assembler/MacroAssemblerSH4.h:
35+
(JSC::MacroAssemblerSH4::supportsFloatingPoint):
36+
(JSC::MacroAssemblerSH4::supportsFloatingPointTruncate):
37+
(JSC::MacroAssemblerSH4::supportsFloatingPointSqrt):
38+
(JSC::MacroAssemblerSH4::supportsFloatingPointAbs):
39+
(JSC::MacroAssemblerSH4::absDouble):
40+
- Renamed supportsFloatingPointAbs, make these methods static so that
41+
we can check the JIT's capabilites before we begin compilation.
42+
* assembler/MacroAssemblerX86.h:
43+
(JSC::MacroAssemblerX86::absDouble):
44+
(JSC::MacroAssemblerX86::supportsFloatingPoint):
45+
(JSC::MacroAssemblerX86::supportsFloatingPointTruncate):
46+
(JSC::MacroAssemblerX86::supportsFloatingPointSqrt):
47+
(JSC::MacroAssemblerX86::supportsFloatingPointAbs):
48+
- Made supports* methods static so that we can check the JIT's
49+
capabilites before we begin compilation. Added absDouble.
50+
* assembler/MacroAssemblerX86Common.h:
51+
- Removed andnotDouble, added s_maskSignBit.
52+
* assembler/MacroAssemblerX86_64.h:
53+
(JSC::MacroAssemblerX86_64::absDouble):
54+
(JSC::MacroAssemblerX86_64::supportsFloatingPoint):
55+
(JSC::MacroAssemblerX86_64::supportsFloatingPointTruncate):
56+
(JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt):
57+
(JSC::MacroAssemblerX86_64::supportsFloatingPointAbs):
58+
- Made supports* methods static so that we can check the JIT's
59+
capabilites before we begin compilation. Added absDouble.
60+
* assembler/X86Assembler.h:
61+
(JSC::X86Assembler::andpd_rr):
62+
(JSC::X86Assembler::andpd_mr):
63+
- Added support for andpd instruction.
64+
* dfg/DFGByteCodeParser.cpp:
65+
(JSC::DFG::ByteCodeParser::handleIntrinsic):
66+
- Added checks for supportsFloatingPointAbs, supportsFloatingPointSqrt.
67+
* dfg/DFGSpeculativeJIT32_64.cpp:
68+
(JSC::DFG::SpeculativeJIT::compile):
69+
- Switched to use doubleAbs, we can now also reuse the operand register for the result.
70+
* dfg/DFGSpeculativeJIT64.cpp:
71+
(JSC::DFG::SpeculativeJIT::compile):
72+
- Switched to use doubleAbs, we can now also reuse the operand register for the result.
73+
* jit/ThunkGenerators.cpp:
74+
- Switched to use doubleAbs.
75+
(JSC::absThunkGenerator):
76+
* runtime/JSGlobalData.cpp:
77+
- Declared MacroAssemblerX86Common::s_maskSignBit here.
78+
This is a little ugly, but it doesn't seem worth adding a whole extra .cpp
79+
to the compile for just one constant.
80+
181
2011-11-08 Gavin Barraclough <barraclough@apple.com>
282

383
Move duplicates of SYMBOL_STRING* macros to the single location

Source/JavaScriptCore/assembler/MacroAssemblerARM.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -780,21 +780,21 @@ class MacroAssemblerARM : public AbstractMacroAssembler<ARMAssembler> {
780780
}
781781

782782
// Floating point operators
783-
bool supportsFloatingPoint() const
783+
static bool supportsFloatingPoint()
784784
{
785785
return s_isVFPPresent;
786786
}
787787

788-
bool supportsFloatingPointTruncate() const
788+
static bool supportsFloatingPointTruncate()
789789
{
790790
return false;
791791
}
792792

793-
bool supportsFloatingPointSqrt() const
793+
static bool supportsFloatingPointSqrt()
794794
{
795795
return s_isVFPPresent;
796796
}
797-
bool supportsDoubleBitops() const { return false; }
797+
static bool supportsFloatingPointAbs() { return false; }
798798

799799
void loadDouble(ImplicitAddress address, FPRegisterID dest)
800800
{
@@ -862,7 +862,7 @@ class MacroAssemblerARM : public AbstractMacroAssembler<ARMAssembler> {
862862
m_assembler.vsqrt_f64_r(dest, src);
863863
}
864864

865-
void andnotDouble(FPRegisterID, FPRegisterID)
865+
void absDouble(FPRegisterID, FPRegisterID)
866866
{
867867
ASSERT_NOT_REACHED();
868868
}

Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ class MacroAssemblerARMv7 : public AbstractMacroAssembler<ARMv7Assembler> {
564564

565565
// Floating-point operations:
566566

567-
bool supportsFloatingPoint() const { return true; }
567+
static bool supportsFloatingPoint() { return true; }
568568
// On x86(_64) the MacroAssembler provides an interface to truncate a double to an integer.
569569
// If a value is not representable as an integer, and possibly for some values that are,
570570
// (on x86 INT_MIN, since this is indistinguishable from results for out-of-range/NaN input)
@@ -576,13 +576,13 @@ class MacroAssemblerARMv7 : public AbstractMacroAssembler<ARMv7Assembler> {
576576
// generic, or decide that the MacroAssembler cannot practically be used to abstracted these
577577
// operations, and make clients go directly to the m_assembler to plant truncation instructions.
578578
// In short, FIXME:.
579-
bool supportsFloatingPointTruncate() const { return false; }
579+
static bool supportsFloatingPointTruncate() { return false; }
580580

581-
bool supportsFloatingPointSqrt() const
581+
static bool supportsFloatingPointSqrt()
582582
{
583583
return false;
584584
}
585-
bool supportsDoubleBitops() const { return false; }
585+
static bool supportsFloatingPointAbs() { return false; }
586586

587587
void loadDouble(ImplicitAddress address, FPRegisterID dest)
588588
{
@@ -663,7 +663,7 @@ class MacroAssemblerARMv7 : public AbstractMacroAssembler<ARMv7Assembler> {
663663
ASSERT_NOT_REACHED();
664664
}
665665

666-
void andnotDouble(FPRegisterID, FPRegisterID) NO_RETURN_DUE_TO_ASSERT
666+
void absDouble(FPRegisterID, FPRegisterID) NO_RETURN_DUE_TO_ASSERT
667667
{
668668
ASSERT_NOT_REACHED();
669669
}

Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ class MacroAssemblerMIPS : public AbstractMacroAssembler<MIPSAssembler> {
471471
m_assembler.sqrtd(dst, src);
472472
}
473473

474-
void andnotDouble(FPRegisterID, FPRegisterID)
474+
void absDouble(FPRegisterID, FPRegisterID)
475475
{
476476
ASSERT_NOT_REACHED();
477477
}
@@ -834,7 +834,7 @@ class MacroAssemblerMIPS : public AbstractMacroAssembler<MIPSAssembler> {
834834

835835
// Floating-point operations:
836836

837-
bool supportsFloatingPoint() const
837+
static bool supportsFloatingPoint()
838838
{
839839
#if WTF_MIPS_DOUBLE_FLOAT
840840
return true;
@@ -843,7 +843,7 @@ class MacroAssemblerMIPS : public AbstractMacroAssembler<MIPSAssembler> {
843843
#endif
844844
}
845845

846-
bool supportsFloatingPointTruncate() const
846+
static bool supportsFloatingPointTruncate()
847847
{
848848
#if WTF_MIPS_DOUBLE_FLOAT && WTF_MIPS_ISA_AT_LEAST(2)
849849
return true;
@@ -852,15 +852,15 @@ class MacroAssemblerMIPS : public AbstractMacroAssembler<MIPSAssembler> {
852852
#endif
853853
}
854854

855-
bool supportsFloatingPointSqrt() const
855+
static bool supportsFloatingPointSqrt()
856856
{
857857
#if WTF_MIPS_DOUBLE_FLOAT && WTF_MIPS_ISA_AT_LEAST(2)
858858
return true;
859859
#else
860860
return false;
861861
#endif
862862
}
863-
bool supportsDoubleBitops() const { return false; }
863+
static bool supportsFloatingPointAbs() { return false; }
864864

865865
// Stack manipulation operations:
866866
//

Source/JavaScriptCore/assembler/MacroAssemblerSH4.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -786,10 +786,10 @@ class MacroAssemblerSH4 : public AbstractMacroAssembler<SH4Assembler> {
786786

787787
// Floating-point operations
788788

789-
bool supportsFloatingPoint() const { return true; }
790-
bool supportsFloatingPointTruncate() const { return true; }
791-
bool supportsFloatingPointSqrt() const { return true; }
792-
bool supportsDoubleBitops() const { return false; }
789+
static bool supportsFloatingPoint() { return true; }
790+
static bool supportsFloatingPointTruncate() { return true; }
791+
static bool supportsFloatingPointSqrt() { return true; }
792+
static bool supportsFloatingPointAbs() { return false; }
793793

794794
void loadDouble(ImplicitAddress address, FPRegisterID dest)
795795
{
@@ -1129,7 +1129,7 @@ class MacroAssemblerSH4 : public AbstractMacroAssembler<SH4Assembler> {
11291129
m_assembler.dsqrt(dest);
11301130
}
11311131

1132-
void andnotDouble(FPRegisterID, FPRegisterID)
1132+
void absDouble(FPRegisterID, FPRegisterID)
11331133
{
11341134
ASSERT_NOT_REACHED();
11351135
}

Source/JavaScriptCore/assembler/MacroAssemblerX86.h

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ namespace JSC {
3434

3535
class MacroAssemblerX86 : public MacroAssemblerX86Common {
3636
public:
37-
MacroAssemblerX86()
38-
: m_isSSE2Present(isSSE2Present())
39-
{
40-
}
41-
4237
static const Scale ScalePtr = TimesFour;
4338

4439
using MacroAssemblerX86Common::add32;
@@ -113,6 +108,12 @@ class MacroAssemblerX86 : public MacroAssemblerX86Common {
113108
m_assembler.cvtsi2sd_mr(src.m_ptr, dest);
114109
}
115110

111+
void absDouble(FPRegisterID src, FPRegisterID dst)
112+
{
113+
moveDouble(src, dst);
114+
m_assembler.andpd_mr(&s_maskSignBit, dst);
115+
}
116+
116117
void store32(TrustedImm32 imm, void* address)
117118
{
118119
m_assembler.movl_i32m(imm.m_value, address);
@@ -189,15 +190,13 @@ class MacroAssemblerX86 : public MacroAssemblerX86Common {
189190
return DataLabelPtr(this);
190191
}
191192

192-
bool supportsFloatingPoint() const { return m_isSSE2Present; }
193+
static bool supportsFloatingPoint() { return isSSE2Present(); }
193194
// See comment on MacroAssemblerARMv7::supportsFloatingPointTruncate()
194-
bool supportsFloatingPointTruncate() const { return m_isSSE2Present; }
195-
bool supportsFloatingPointSqrt() const { return m_isSSE2Present; }
196-
bool supportsDoubleBitops() const { return m_isSSE2Present; }
195+
static bool supportsFloatingPointTruncate() { return isSSE2Present(); }
196+
static bool supportsFloatingPointSqrt() { return isSSE2Present(); }
197+
static bool supportsFloatingPointAbs() { return isSSE2Present(); }
197198

198199
private:
199-
const bool m_isSSE2Present;
200-
201200
friend class LinkBuffer;
202201
friend class RepatchBuffer;
203202

Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -424,11 +424,6 @@ class MacroAssemblerX86Common : public AbstractMacroAssembler<X86Assembler> {
424424
m_assembler.sqrtsd_rr(src, dst);
425425
}
426426

427-
void andnotDouble(FPRegisterID src, FPRegisterID dst)
428-
{
429-
m_assembler.andnpd_rr(src, dst);
430-
}
431-
432427
// Memory access operations:
433428
//
434429
// Loads are of the form load(address, destination) and stores of the form
@@ -1266,6 +1261,9 @@ class MacroAssemblerX86Common : public AbstractMacroAssembler<X86Assembler> {
12661261
}
12671262

12681263
protected:
1264+
// A 64-bit mask with all bits set other than the sign bit (used in abs).
1265+
static const uint64_t s_maskSignBit;
1266+
12691267
X86Assembler::Condition x86Condition(RelationalCondition cond)
12701268
{
12711269
return static_cast<X86Assembler::Condition>(cond);

Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,13 @@ class MacroAssemblerX86_64 : public MacroAssemblerX86Common {
105105
m_assembler.cvtsi2sd_rr(scratchRegister, dest);
106106
}
107107

108+
void absDouble(FPRegisterID src, FPRegisterID dst)
109+
{
110+
moveDouble(src, dst);
111+
move(TrustedImmPtr(&s_maskSignBit), scratchRegister);
112+
m_assembler.andpd_mr(0, scratchRegister, dst);
113+
}
114+
108115
void store32(TrustedImm32 imm, void* address)
109116
{
110117
move(TrustedImmPtr(address), scratchRegister);
@@ -461,11 +468,11 @@ class MacroAssemblerX86_64 : public MacroAssemblerX86Common {
461468
return MacroAssemblerX86Common::branchTest8(cond, BaseIndex(scratchRegister, address.base, TimesOne), mask);
462469
}
463470

464-
bool supportsFloatingPoint() const { return true; }
471+
static bool supportsFloatingPoint() { return true; }
465472
// See comment on MacroAssemblerARMv7::supportsFloatingPointTruncate()
466-
bool supportsFloatingPointTruncate() const { return true; }
467-
bool supportsFloatingPointSqrt() const { return true; }
468-
bool supportsDoubleBitops() const { return true; }
473+
static bool supportsFloatingPointTruncate() { return true; }
474+
static bool supportsFloatingPointSqrt() { return true; }
475+
static bool supportsFloatingPointAbs() { return true; }
469476

470477
private:
471478
friend class LinkBuffer;

Source/JavaScriptCore/assembler/X86Assembler.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ class X86Assembler {
173173
OP2_SUBSD_VsdWsd = 0x5C,
174174
OP2_DIVSD_VsdWsd = 0x5E,
175175
OP2_SQRTSD_VsdWsd = 0x51,
176+
OP2_ANDPD_VpdWpd = 0x54,
176177
OP2_ANDNPD_VpdWpd = 0x55,
177178
OP2_XORPD_VpdWpd = 0x57,
178179
OP2_MOVD_VdEd = 0x6E,
@@ -1567,6 +1568,26 @@ class X86Assembler {
15671568
m_formatter.twoByteOp(OP2_ANDNPD_VpdWpd, (RegisterID)dst, (RegisterID)src);
15681569
}
15691570

1571+
void andpd_rr(XMMRegisterID src, XMMRegisterID dst)
1572+
{
1573+
m_formatter.prefix(PRE_SSE_66);
1574+
m_formatter.twoByteOp(OP2_ANDPD_VpdWpd, (RegisterID)dst, (RegisterID)src);
1575+
}
1576+
1577+
void andpd_mr(int offset, RegisterID base, XMMRegisterID dst)
1578+
{
1579+
m_formatter.prefix(PRE_SSE_66);
1580+
m_formatter.twoByteOp(OP2_ANDPD_VpdWpd, (RegisterID)dst, base, offset);
1581+
}
1582+
1583+
#if CPU(X86)
1584+
void andpd_mr(const void* address, XMMRegisterID dst)
1585+
{
1586+
m_formatter.prefix(PRE_SSE_66);
1587+
m_formatter.twoByteOp(OP2_ANDPD_VpdWpd, (RegisterID)dst, address);
1588+
}
1589+
#endif
1590+
15701591
void sqrtsd_rr(XMMRegisterID src, XMMRegisterID dst)
15711592
{
15721593
m_formatter.prefix(PRE_SSE_F2);

Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,10 +1141,15 @@ bool ByteCodeParser::handleIntrinsic(bool usesResult, int resultOperand, Intrins
11411141
// We don't care about the this argument. If we don't have a first
11421142
// argument then make this JSConstant(NaN).
11431143
int absArg = firstArg + 1;
1144-
if (absArg > lastArg)
1144+
if (absArg > lastArg) {
11451145
set(resultOperand, constantNaN());
1146-
else
1147-
set(resultOperand, addToGraph(ArithAbs, OpInfo(NodeUseBottom), getToNumber(absArg)));
1146+
return true;
1147+
}
1148+
1149+
if (!MacroAssembler::supportsFloatingPointAbs())
1150+
return false;
1151+
1152+
set(resultOperand, addToGraph(ArithAbs, OpInfo(NodeUseBottom), getToNumber(absArg)));
11481153
return true;
11491154
}
11501155

@@ -1163,6 +1168,9 @@ bool ByteCodeParser::handleIntrinsic(bool usesResult, int resultOperand, Intrins
11631168
return true;
11641169
}
11651170

1171+
if (!MacroAssembler::supportsFloatingPointSqrt())
1172+
return false;
1173+
11661174
set(resultOperand, addToGraph(ArithSqrt, getToNumber(firstArg + 1)));
11671175
return true;
11681176
}

0 commit comments

Comments
 (0)