Skip to content

Commit 9c8a599

Browse files
committed
[JSC] Simplify moveIntsToDouble
https://bugs.webkit.org/show_bug.cgi?id=229351 Reviewed by Saam Barati. MacroAssembler::moveIntsToDouble required scratch FPRReg. But it was only required for MacroAssemblerX86, and it is already removed. This means that we no longer need this scratch FPRReg. This change makes a lot of IC code, property access code simpler. This patch removes that scratch FPRReg, and removed scratch FPRReg of many arithmetic ICs. This patch is important for PutByVal modern IC since some of property access requires FPRReg because of MacroAssembler::moveIntsToDouble, and it requires adding new m_scratch2FPR to AccessCase. But after this simplification, this is no longer necessary. * assembler/MacroAssemblerARMv7.h: (JSC::MacroAssemblerARMv7::moveIntsToDouble): * assembler/MacroAssemblerMIPS.h: (JSC::MacroAssemblerMIPS::moveIntsToDouble): * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileValueToInt32): (JSC::DFG::SpeculativeJIT::compileDoubleRep): (JSC::DFG::SpeculativeJIT::emitUntypedOrBigIntRightShiftBitOp): (JSC::DFG::SpeculativeJIT::compileValueAdd): (JSC::DFG::SpeculativeJIT::compileValueSub): (JSC::DFG::SpeculativeJIT::compileMathIC): (JSC::DFG::SpeculativeJIT::compileValueNegate): (JSC::DFG::SpeculativeJIT::compileValueMul): (JSC::DFG::SpeculativeJIT::speculateRealNumber): (JSC::DFG::SpeculativeJIT::compileNormalizeMapKey): * dfg/DFGSpeculativeJIT.h: (JSC::DFG::SpeculativeJIT::unboxDouble): * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileBinaryMathIC): (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq): * jit/AssemblyHelpers.cpp: (JSC::AssemblyHelpers::emitConvertValueToBoolean): (JSC::AssemblyHelpers::branchIfValue): * jit/AssemblyHelpers.h: (JSC::AssemblyHelpers::unboxDoubleNonDestructive): (JSC::AssemblyHelpers::unboxDouble): * jit/JITAddGenerator.cpp: (JSC::JITAddGenerator::generateFastPath): * jit/JITAddGenerator.h: (JSC::JITAddGenerator::JITAddGenerator): * jit/JITArithmetic.cpp: (JSC::JIT::emitRightShiftFastPath): (JSC::JIT::emitMathICFast): * jit/JITDivGenerator.cpp: (JSC::JITDivGenerator::loadOperand): * jit/JITMulGenerator.cpp: (JSC::JITMulGenerator::generateInline): (JSC::JITMulGenerator::generateFastPath): * jit/JITMulGenerator.h: (JSC::JITMulGenerator::JITMulGenerator): * jit/JITPropertyAccess.cpp: (JSC::JIT::emitFloatTypedArrayPutByVal): * jit/JITPropertyAccess32_64.cpp: (JSC::JIT::emitGenericContiguousPutByVal): * jit/JITRightShiftGenerator.cpp: (JSC::JITRightShiftGenerator::generateFastPath): * jit/JITRightShiftGenerator.h: (JSC::JITRightShiftGenerator::JITRightShiftGenerator): * jit/JITSubGenerator.cpp: (JSC::JITSubGenerator::generateInline): (JSC::JITSubGenerator::generateFastPath): * jit/JITSubGenerator.h: (JSC::JITSubGenerator::JITSubGenerator): Canonical link: https://commits.webkit.org/240770@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281355 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 8e9b7a2 commit 9c8a599

20 files changed

Lines changed: 125 additions & 128 deletions

‎Source/JavaScriptCore/ChangeLog‎

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,70 @@
1+
2021-08-20 Yusuke Suzuki <ysuzuki@apple.com>
2+
3+
[JSC] Simplify moveIntsToDouble
4+
https://bugs.webkit.org/show_bug.cgi?id=229351
5+
6+
Reviewed by Saam Barati.
7+
8+
MacroAssembler::moveIntsToDouble required scratch FPRReg. But it was only required for MacroAssemblerX86, and it is already removed.
9+
This means that we no longer need this scratch FPRReg. This change makes a lot of IC code, property access code simpler.
10+
This patch removes that scratch FPRReg, and removed scratch FPRReg of many arithmetic ICs. This patch is important for PutByVal modern
11+
IC since some of property access requires FPRReg because of MacroAssembler::moveIntsToDouble, and it requires adding new m_scratch2FPR
12+
to AccessCase. But after this simplification, this is no longer necessary.
13+
14+
* assembler/MacroAssemblerARMv7.h:
15+
(JSC::MacroAssemblerARMv7::moveIntsToDouble):
16+
* assembler/MacroAssemblerMIPS.h:
17+
(JSC::MacroAssemblerMIPS::moveIntsToDouble):
18+
* dfg/DFGSpeculativeJIT.cpp:
19+
(JSC::DFG::SpeculativeJIT::compileValueToInt32):
20+
(JSC::DFG::SpeculativeJIT::compileDoubleRep):
21+
(JSC::DFG::SpeculativeJIT::emitUntypedOrBigIntRightShiftBitOp):
22+
(JSC::DFG::SpeculativeJIT::compileValueAdd):
23+
(JSC::DFG::SpeculativeJIT::compileValueSub):
24+
(JSC::DFG::SpeculativeJIT::compileMathIC):
25+
(JSC::DFG::SpeculativeJIT::compileValueNegate):
26+
(JSC::DFG::SpeculativeJIT::compileValueMul):
27+
(JSC::DFG::SpeculativeJIT::speculateRealNumber):
28+
(JSC::DFG::SpeculativeJIT::compileNormalizeMapKey):
29+
* dfg/DFGSpeculativeJIT.h:
30+
(JSC::DFG::SpeculativeJIT::unboxDouble):
31+
* ftl/FTLLowerDFGToB3.cpp:
32+
(JSC::FTL::DFG::LowerDFGToB3::compileBinaryMathIC):
33+
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
34+
* jit/AssemblyHelpers.cpp:
35+
(JSC::AssemblyHelpers::emitConvertValueToBoolean):
36+
(JSC::AssemblyHelpers::branchIfValue):
37+
* jit/AssemblyHelpers.h:
38+
(JSC::AssemblyHelpers::unboxDoubleNonDestructive):
39+
(JSC::AssemblyHelpers::unboxDouble):
40+
* jit/JITAddGenerator.cpp:
41+
(JSC::JITAddGenerator::generateFastPath):
42+
* jit/JITAddGenerator.h:
43+
(JSC::JITAddGenerator::JITAddGenerator):
44+
* jit/JITArithmetic.cpp:
45+
(JSC::JIT::emitRightShiftFastPath):
46+
(JSC::JIT::emitMathICFast):
47+
* jit/JITDivGenerator.cpp:
48+
(JSC::JITDivGenerator::loadOperand):
49+
* jit/JITMulGenerator.cpp:
50+
(JSC::JITMulGenerator::generateInline):
51+
(JSC::JITMulGenerator::generateFastPath):
52+
* jit/JITMulGenerator.h:
53+
(JSC::JITMulGenerator::JITMulGenerator):
54+
* jit/JITPropertyAccess.cpp:
55+
(JSC::JIT::emitFloatTypedArrayPutByVal):
56+
* jit/JITPropertyAccess32_64.cpp:
57+
(JSC::JIT::emitGenericContiguousPutByVal):
58+
* jit/JITRightShiftGenerator.cpp:
59+
(JSC::JITRightShiftGenerator::generateFastPath):
60+
* jit/JITRightShiftGenerator.h:
61+
(JSC::JITRightShiftGenerator::JITRightShiftGenerator):
62+
* jit/JITSubGenerator.cpp:
63+
(JSC::JITSubGenerator::generateInline):
64+
(JSC::JITSubGenerator::generateFastPath):
65+
* jit/JITSubGenerator.h:
66+
(JSC::JITSubGenerator::JITSubGenerator):
67+
168
2021-08-20 Yusuke Suzuki <ysuzuki@apple.com>
269

370
[JSC] Remove unnecessary moves in Yarr's sub32 / add32 related code

‎Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,9 +1012,8 @@ class MacroAssemblerARMv7 : public AbstractMacroAssembler<Assembler> {
10121012
m_assembler.vmov(dest1, dest2, src);
10131013
}
10141014

1015-
void moveIntsToDouble(RegisterID src1, RegisterID src2, FPRegisterID dest, FPRegisterID scratch)
1015+
void moveIntsToDouble(RegisterID src1, RegisterID src2, FPRegisterID dest)
10161016
{
1017-
UNUSED_PARAM(scratch);
10181017
m_assembler.vmov(dest, src1, src2);
10191018
}
10201019

‎Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2072,9 +2072,8 @@ class MacroAssemblerMIPS : public AbstractMacroAssembler<Assembler> {
20722072
m_assembler.vmov(dest1, dest2, src);
20732073
}
20742074

2075-
void moveIntsToDouble(RegisterID src1, RegisterID src2, FPRegisterID dest, FPRegisterID scratch)
2075+
void moveIntsToDouble(RegisterID src1, RegisterID src2, FPRegisterID dest)
20762076
{
2077-
UNUSED_PARAM(scratch);
20782077
m_assembler.vmov(dest, src1, src2);
20792078
}
20802079

‎Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp‎

Lines changed: 18 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -2856,7 +2856,6 @@ void SpeculativeJIT::compileValueToInt32(Node* node)
28562856
GPRReg tagGPR = op1.tagGPR();
28572857
FPRTemporary tempFpr(this);
28582858
FPRReg fpr = tempFpr.fpr();
2859-
FPRTemporary scratch(this);
28602859

28612860
JITCompiler::Jump isInteger = m_jit.branchIfInt32(tagGPR);
28622861

@@ -2885,7 +2884,7 @@ void SpeculativeJIT::compileValueToInt32(Node* node)
28852884
isNumber.link(&m_jit);
28862885
}
28872886

2888-
unboxDouble(tagGPR, payloadGPR, fpr, scratch.fpr());
2887+
unboxDouble(tagGPR, payloadGPR, fpr);
28892888

28902889
silentSpillAllRegisters(resultGpr);
28912890
callOperation(operationToInt32, resultGpr, fpr);
@@ -2989,9 +2988,7 @@ void SpeculativeJIT::compileDoubleRep(Node* node)
29892988
GPRReg tempGPR = temp.gpr();
29902989
m_jit.unboxDoubleWithoutAssertions(op1Regs.gpr(), tempGPR, resultFPR);
29912990
#else
2992-
FPRTemporary temp(this);
2993-
FPRReg tempFPR = temp.fpr();
2994-
unboxDouble(op1Regs.tagGPR(), op1Regs.payloadGPR(), resultFPR, tempFPR);
2991+
unboxDouble(op1Regs.tagGPR(), op1Regs.payloadGPR(), resultFPR);
29952992
#endif
29962993

29972994
JITCompiler::Jump done = m_jit.branchIfNotNaN(resultFPR);
@@ -3068,11 +3065,8 @@ void SpeculativeJIT::compileDoubleRep(Node* node)
30683065
m_jit.convertInt32ToDouble(op1GPR, resultFPR);
30693066
done.link(&m_jit);
30703067
#else // USE(JSVALUE64) -> this is the 32_64 case
3071-
FPRTemporary temp(this);
3072-
30733068
GPRReg op1TagGPR = op1.tagGPR();
30743069
GPRReg op1PayloadGPR = op1.payloadGPR();
3075-
FPRReg tempFPR = temp.fpr();
30763070
FPRReg resultFPR = result.fpr();
30773071
JITCompiler::JumpList done;
30783072

@@ -3109,7 +3103,7 @@ void SpeculativeJIT::compileDoubleRep(Node* node)
31093103
m_jit.branch32(MacroAssembler::AboveOrEqual, op1TagGPR, TrustedImm32(JSValue::LowestTag)));
31103104
}
31113105

3112-
unboxDouble(op1TagGPR, op1PayloadGPR, resultFPR, tempFPR);
3106+
unboxDouble(op1TagGPR, op1PayloadGPR, resultFPR);
31133107
done.append(m_jit.jump());
31143108

31153109
isInteger.link(&m_jit);
@@ -4622,14 +4616,11 @@ void SpeculativeJIT::emitUntypedOrBigIntRightShiftBitOp(Node* node)
46224616
JSValueRegs resultRegs = JSValueRegs(result.gpr());
46234617
GPRTemporary scratch(this);
46244618
GPRReg scratchGPR = scratch.gpr();
4625-
FPRReg scratchFPR = InvalidFPRReg;
46264619
#else
46274620
GPRTemporary resultTag(this);
46284621
GPRTemporary resultPayload(this);
46294622
JSValueRegs resultRegs = JSValueRegs(resultPayload.gpr(), resultTag.gpr());
46304623
GPRReg scratchGPR = resultTag.gpr();
4631-
FPRTemporary fprScratch(this);
4632-
FPRReg scratchFPR = fprScratch.fpr();
46334624
#endif
46344625

46354626
SnippetOperand leftOperand;
@@ -4653,8 +4644,7 @@ void SpeculativeJIT::emitUntypedOrBigIntRightShiftBitOp(Node* node)
46534644
rightRegs = right->jsValueRegs();
46544645
}
46554646

4656-
JITRightShiftGenerator gen(leftOperand, rightOperand, resultRegs, leftRegs, rightRegs,
4657-
leftFPR, scratchGPR, scratchFPR, shiftType);
4647+
JITRightShiftGenerator gen(leftOperand, rightOperand, resultRegs, leftRegs, rightRegs, leftFPR, scratchGPR, shiftType);
46584648
gen.generateFastPath(m_jit);
46594649

46604650
ASSERT(gen.didEmitFastPath());
@@ -4859,22 +4849,14 @@ void SpeculativeJIT::compileValueAdd(Node* node)
48594849
return;
48604850
}
48614851

4862-
#if USE(JSVALUE64)
4863-
bool needsScratchGPRReg = true;
4864-
bool needsScratchFPRReg = false;
4865-
#else
4866-
bool needsScratchGPRReg = true;
4867-
bool needsScratchFPRReg = true;
4868-
#endif
4869-
48704852
CodeBlock* baselineCodeBlock = m_jit.graph().baselineCodeBlockFor(node->origin.semantic);
48714853
BytecodeIndex bytecodeIndex = node->origin.semantic.bytecodeIndex();
48724854
BinaryArithProfile* arithProfile = baselineCodeBlock->binaryArithProfileForBytecodeIndex(bytecodeIndex);
48734855
JITAddIC* addIC = m_jit.codeBlock()->addJITAddIC(arithProfile);
48744856
auto repatchingFunction = operationValueAddOptimize;
48754857
auto nonRepatchingFunction = operationValueAdd;
48764858

4877-
compileMathIC(node, addIC, needsScratchGPRReg, needsScratchFPRReg, repatchingFunction, nonRepatchingFunction);
4859+
compileMathIC(node, addIC, repatchingFunction, nonRepatchingFunction);
48784860
}
48794861

48804862
void SpeculativeJIT::compileValueSub(Node* node)
@@ -4951,26 +4933,18 @@ void SpeculativeJIT::compileValueSub(Node* node)
49514933
return;
49524934
}
49534935

4954-
#if USE(JSVALUE64)
4955-
bool needsScratchGPRReg = true;
4956-
bool needsScratchFPRReg = false;
4957-
#else
4958-
bool needsScratchGPRReg = true;
4959-
bool needsScratchFPRReg = true;
4960-
#endif
4961-
49624936
CodeBlock* baselineCodeBlock = m_jit.graph().baselineCodeBlockFor(node->origin.semantic);
49634937
BytecodeIndex bytecodeIndex = node->origin.semantic.bytecodeIndex();
49644938
BinaryArithProfile* arithProfile = baselineCodeBlock->binaryArithProfileForBytecodeIndex(bytecodeIndex);
49654939
JITSubIC* subIC = m_jit.codeBlock()->addJITSubIC(arithProfile);
49664940
auto repatchingFunction = operationValueSubOptimize;
49674941
auto nonRepatchingFunction = operationValueSub;
49684942

4969-
compileMathIC(node, subIC, needsScratchGPRReg, needsScratchFPRReg, repatchingFunction, nonRepatchingFunction);
4943+
compileMathIC(node, subIC, repatchingFunction, nonRepatchingFunction);
49704944
}
49714945

49724946
template <typename Generator, typename RepatchingFunction, typename NonRepatchingFunction>
4973-
void SpeculativeJIT::compileMathIC(Node* node, JITBinaryMathIC<Generator>* mathIC, bool needsScratchGPRReg, bool needsScratchFPRReg, RepatchingFunction repatchingFunction, NonRepatchingFunction nonRepatchingFunction)
4947+
void SpeculativeJIT::compileMathIC(Node* node, JITBinaryMathIC<Generator>* mathIC, RepatchingFunction repatchingFunction, NonRepatchingFunction nonRepatchingFunction)
49744948
{
49754949
Edge& leftChild = node->child1();
49764950
Edge& rightChild = node->child2();
@@ -4987,28 +4961,17 @@ void SpeculativeJIT::compileMathIC(Node* node, JITBinaryMathIC<Generator>* mathI
49874961
FPRReg rightFPR = rightNumber.fpr();
49884962

49894963
GPRReg scratchGPR = InvalidGPRReg;
4990-
FPRReg scratchFPR = InvalidFPRReg;
4991-
4992-
std::optional<FPRTemporary> fprScratch;
4993-
if (needsScratchFPRReg) {
4994-
fprScratch.emplace(this);
4995-
scratchFPR = fprScratch->fpr();
4996-
}
49974964

49984965
#if USE(JSVALUE64)
4999-
std::optional<GPRTemporary> gprScratch;
5000-
if (needsScratchGPRReg) {
5001-
gprScratch.emplace(this);
5002-
scratchGPR = gprScratch->gpr();
5003-
}
4966+
GPRTemporary gprScratch(this);
4967+
scratchGPR = gprScratch.gpr();
50044968
GPRTemporary result(this);
50054969
JSValueRegs resultRegs = JSValueRegs(result.gpr());
50064970
#else
50074971
GPRTemporary resultTag(this);
50084972
GPRTemporary resultPayload(this);
50094973
JSValueRegs resultRegs = JSValueRegs(resultPayload.gpr(), resultTag.gpr());
5010-
if (needsScratchGPRReg)
5011-
scratchGPR = resultRegs.tagGPR();
4974+
scratchGPR = resultRegs.tagGPR();
50124975
#endif
50134976

50144977
SnippetOperand leftOperand(m_state.forNode(leftChild).resultType());
@@ -5038,7 +5001,7 @@ void SpeculativeJIT::compileMathIC(Node* node, JITBinaryMathIC<Generator>* mathI
50385001
#endif
50395002

50405003
Box<MathICGenerationState> addICGenerationState = Box<MathICGenerationState>::create();
5041-
mathIC->m_generator = Generator(leftOperand, rightOperand, resultRegs, leftRegs, rightRegs, leftFPR, rightFPR, scratchGPR, scratchFPR);
5004+
mathIC->m_generator = Generator(leftOperand, rightOperand, resultRegs, leftRegs, rightRegs, leftFPR, rightFPR, scratchGPR);
50425005

50435006
bool shouldEmitProfiling = false;
50445007
bool generatedInline = mathIC->generateInline(m_jit, *addICGenerationState, shouldEmitProfiling);
@@ -5558,8 +5521,7 @@ void SpeculativeJIT::compileValueNegate(Node* node)
55585521
JITNegIC* negIC = m_jit.codeBlock()->addJITNegIC(arithProfile);
55595522
auto repatchingFunction = operationArithNegateOptimize;
55605523
auto nonRepatchingFunction = operationArithNegate;
5561-
bool needsScratchGPRReg = true;
5562-
compileMathIC(node, negIC, needsScratchGPRReg, repatchingFunction, nonRepatchingFunction);
5524+
compileMathIC(node, negIC, repatchingFunction, nonRepatchingFunction);
55635525
}
55645526

55655527
void SpeculativeJIT::compileArithNegate(Node* node)
@@ -5642,14 +5604,10 @@ void SpeculativeJIT::compileArithNegate(Node* node)
56425604
}
56435605

56445606
template <typename Generator, typename RepatchingFunction, typename NonRepatchingFunction>
5645-
void SpeculativeJIT::compileMathIC(Node* node, JITUnaryMathIC<Generator>* mathIC, bool needsScratchGPRReg, RepatchingFunction repatchingFunction, NonRepatchingFunction nonRepatchingFunction)
5607+
void SpeculativeJIT::compileMathIC(Node* node, JITUnaryMathIC<Generator>* mathIC, RepatchingFunction repatchingFunction, NonRepatchingFunction nonRepatchingFunction)
56465608
{
5647-
GPRReg scratchGPR = InvalidGPRReg;
5648-
std::optional<GPRTemporary> gprScratch;
5649-
if (needsScratchGPRReg) {
5650-
gprScratch.emplace(this);
5651-
scratchGPR = gprScratch->gpr();
5652-
}
5609+
GPRTemporary gprScratch(this);
5610+
GPRReg scratchGPR = gprScratch.gpr();
56535611
JSValueOperand childOperand(this, node->child1());
56545612
JSValueRegs childRegs = childOperand.jsValueRegs();
56555613
#if USE(JSVALUE64)
@@ -5801,21 +5759,14 @@ void SpeculativeJIT::compileValueMul(Node* node)
58015759
return;
58025760
}
58035761

5804-
bool needsScratchGPRReg = true;
5805-
#if USE(JSVALUE64)
5806-
bool needsScratchFPRReg = false;
5807-
#else
5808-
bool needsScratchFPRReg = true;
5809-
#endif
5810-
58115762
CodeBlock* baselineCodeBlock = m_jit.graph().baselineCodeBlockFor(node->origin.semantic);
58125763
BytecodeIndex bytecodeIndex = node->origin.semantic.bytecodeIndex();
58135764
BinaryArithProfile* arithProfile = baselineCodeBlock->binaryArithProfileForBytecodeIndex(bytecodeIndex);
58145765
JITMulIC* mulIC = m_jit.codeBlock()->addJITMulIC(arithProfile);
58155766
auto repatchingFunction = operationValueMulOptimize;
58165767
auto nonRepatchingFunction = operationValueMul;
58175768

5818-
compileMathIC(node, mulIC, needsScratchGPRReg, needsScratchFPRReg, repatchingFunction, nonRepatchingFunction);
5769+
compileMathIC(node, mulIC, repatchingFunction, nonRepatchingFunction);
58195770
}
58205771

58215772
void SpeculativeJIT::compileArithMul(Node* node)
@@ -11263,9 +11214,7 @@ void SpeculativeJIT::speculateRealNumber(Edge edge)
1126311214
GPRReg tempGPR = temp.gpr();
1126411215
m_jit.unboxDoubleWithoutAssertions(op1Regs.gpr(), tempGPR, resultFPR);
1126511216
#else
11266-
FPRTemporary temp(this);
11267-
FPRReg tempFPR = temp.fpr();
11268-
unboxDouble(op1Regs.tagGPR(), op1Regs.payloadGPR(), resultFPR, tempFPR);
11217+
unboxDouble(op1Regs.tagGPR(), op1Regs.payloadGPR(), resultFPR);
1126911218
#endif
1127011219

1127111220
JITCompiler::Jump done = m_jit.branchIfNotNaN(resultFPR);
@@ -13298,7 +13247,7 @@ void SpeculativeJIT::compileNormalizeMapKey(Node* node)
1329813247
#if USE(JSVALUE64)
1329913248
m_jit.unboxDoubleWithoutAssertions(keyRegs.gpr(), scratchGPR, doubleValueFPR);
1330013249
#else
13301-
unboxDouble(keyRegs.tagGPR(), keyRegs.payloadGPR(), doubleValueFPR, tempFPR);
13250+
unboxDouble(keyRegs.tagGPR(), keyRegs.payloadGPR(), doubleValueFPR);
1330213251
#endif
1330313252
auto notNaN = m_jit.branchIfNotNaN(doubleValueFPR);
1330413253
m_jit.moveTrustedValue(jsNaN(), resultRegs);

‎Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,9 +480,9 @@ class SpeculativeJIT {
480480
{
481481
m_jit.boxDouble(fpr, tagGPR, payloadGPR);
482482
}
483-
void unboxDouble(GPRReg tagGPR, GPRReg payloadGPR, FPRReg fpr, FPRReg scratchFPR)
483+
void unboxDouble(GPRReg tagGPR, GPRReg payloadGPR, FPRReg fpr)
484484
{
485-
m_jit.unboxDouble(tagGPR, payloadGPR, fpr, scratchFPR);
485+
m_jit.unboxDouble(tagGPR, payloadGPR, fpr);
486486
}
487487
#endif
488488
void boxDouble(FPRReg fpr, JSValueRegs regs)
@@ -1395,9 +1395,9 @@ class SpeculativeJIT {
13951395
void compileShiftOp(Node*);
13961396

13971397
template <typename Generator, typename RepatchingFunction, typename NonRepatchingFunction>
1398-
void compileMathIC(Node*, JITBinaryMathIC<Generator>*, bool needsScratchGPRReg, bool needsScratchFPRReg, RepatchingFunction, NonRepatchingFunction);
1398+
void compileMathIC(Node*, JITBinaryMathIC<Generator>*, RepatchingFunction, NonRepatchingFunction);
13991399
template <typename Generator, typename RepatchingFunction, typename NonRepatchingFunction>
1400-
void compileMathIC(Node*, JITUnaryMathIC<Generator>*, bool needsScratchGPRReg, RepatchingFunction, NonRepatchingFunction);
1400+
void compileMathIC(Node*, JITUnaryMathIC<Generator>*, RepatchingFunction, NonRepatchingFunction);
14011401

14021402
void compileArithDoubleUnaryOp(Node*, double (*doubleFunction)(double), double (*operation)(JSGlobalObject*, EncodedJSValue));
14031403
void compileValueAdd(Node*);

‎Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2503,7 +2503,7 @@ class LowerDFGToB3 {
25032503
JITBinaryMathIC<Generator>* mathIC = jit.codeBlock()->addMathIC<Generator>(arithProfile);
25042504
mathIC->m_generator = Generator(leftOperand, rightOperand, JSValueRegs(params[0].gpr()),
25052505
JSValueRegs(params[1].gpr()), JSValueRegs(params[2].gpr()), params.fpScratch(0),
2506-
params.fpScratch(1), params.gpScratch(0), InvalidFPRReg);
2506+
params.fpScratch(1), params.gpScratch(0));
25072507

25082508
bool shouldEmitProfiling = false;
25092509
bool generatedInline = mathIC->generateInline(jit, *mathICGenerationState, shouldEmitProfiling);
@@ -16012,7 +16012,7 @@ class LowerDFGToB3 {
1601216012
auto generator = Box<JITRightShiftGenerator>::create(
1601316013
leftOperand, rightOperand, JSValueRegs(params[0].gpr()),
1601416014
JSValueRegs(params[1].gpr()), JSValueRegs(params[2].gpr()),
16015-
params.fpScratch(0), params.gpScratch(0), InvalidFPRReg, shiftType);
16015+
params.fpScratch(0), params.gpScratch(0), shiftType);
1601616016

1601716017
generator->generateFastPath(jit);
1601816018
generator->endJumpList().link(&jit);

‎Source/JavaScriptCore/jit/AssemblyHelpers.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ void AssemblyHelpers::emitConvertValueToBoolean(VM& vm, JSValueRegs value, GPRRe
819819
#if USE(JSVALUE64)
820820
unboxDouble(value.gpr(), result, valueAsFPR);
821821
#else
822-
unboxDouble(value, valueAsFPR, tempFPR);
822+
unboxDouble(value, valueAsFPR);
823823
#endif
824824
move(invert ? TrustedImm32(1) : TrustedImm32(0), result);
825825
done.append(branchDoubleZeroOrNaN(valueAsFPR, tempFPR));
@@ -920,7 +920,7 @@ AssemblyHelpers::JumpList AssemblyHelpers::branchIfValue(VM& vm, JSValueRegs val
920920
#if USE(JSVALUE64)
921921
unboxDouble(value.gpr(), scratch, valueAsFPR);
922922
#else
923-
unboxDouble(value, valueAsFPR, tempFPR);
923+
unboxDouble(value, valueAsFPR);
924924
#endif
925925
if (invert) {
926926
truthy.append(branchDoubleZeroOrNaN(valueAsFPR, tempFPR));

0 commit comments

Comments
 (0)