Changeset 197654 in webkit
- Timestamp:
- Mar 6, 2016, 6:43:09 PM (11 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
dfg/DFGSpeculativeJIT.cpp (modified) (4 diffs)
-
dfg/DFGSpeculativeJIT.h (modified) (1 diff)
-
jit/AssemblyHelpers.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r197653 r197654 1 2016-03-06 Benjamin Poulain <benjamin@webkit.org> 2 3 [JSC] Remove a superfluous Move in front of every double unboxing 4 https://bugs.webkit.org/show_bug.cgi?id=155064 5 6 Reviewed by Saam Barati. 7 8 Double unboxing was always doing: 9 Move source, scratch 10 Add64 tag, scratch 11 IntToDouble scratch, fp 12 13 We do not need to "Move" to copy the source. 14 Both x86 and ARM64 have an efficient 3 operands Add instruction. 15 16 * dfg/DFGSpeculativeJIT.cpp: 17 (JSC::DFG::SpeculativeJIT::compileValueToInt32): 18 (JSC::DFG::SpeculativeJIT::compileDoubleRep): 19 (JSC::DFG::SpeculativeJIT::speculateRealNumber): 20 * dfg/DFGSpeculativeJIT.h: 21 (JSC::DFG::SpeculativeJIT::unboxDouble): 22 * jit/AssemblyHelpers.h: 23 (JSC::AssemblyHelpers::unboxDoubleWithoutAssertions): 24 (JSC::AssemblyHelpers::unboxDouble): 25 (JSC::AssemblyHelpers::unboxDoubleNonDestructive): 26 1 27 2016-03-06 Benjamin Poulain <benjamin@webkit.org> 2 28 -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r197653 r197654 2014 2014 2015 2015 // First, if we get here we have a double encoded as a JSValue 2016 m_jit.move(gpr, resultGpr); 2017 unboxDouble(resultGpr, fpr); 2016 unboxDouble(gpr, resultGpr, fpr); 2018 2017 2019 2018 silentSpillAllRegisters(resultGpr); … … 2172 2171 GPRTemporary temp(this); 2173 2172 GPRReg tempGPR = temp.gpr(); 2174 m_jit.move(op1Regs.gpr(), tempGPR); 2175 m_jit.unboxDoubleWithoutAssertions(tempGPR, resultFPR); 2173 m_jit.unboxDoubleWithoutAssertions(op1Regs.gpr(), tempGPR, resultFPR); 2176 2174 #else 2177 2175 FPRTemporary temp(this); … … 2250 2248 m_jit.branchTest64(MacroAssembler::Zero, op1GPR, GPRInfo::tagTypeNumberRegister)); 2251 2249 } 2252 2253 m_jit.move(op1GPR, tempGPR); 2254 unboxDouble(tempGPR, resultFPR); 2250 2251 unboxDouble(op1GPR, tempGPR, resultFPR); 2255 2252 done.append(m_jit.jump()); 2256 2253 … … 6584 6581 GPRTemporary temp(this); 6585 6582 GPRReg tempGPR = temp.gpr(); 6586 m_jit.move(op1Regs.gpr(), tempGPR); 6587 m_jit.unboxDoubleWithoutAssertions(tempGPR, resultFPR); 6583 m_jit.unboxDoubleWithoutAssertions(op1Regs.gpr(), tempGPR, resultFPR); 6588 6584 #else 6589 6585 FPRTemporary temp(this); -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
r197649 r197654 453 453 return m_jit.boxDouble(fpr, gpr); 454 454 } 455 FPRReg unboxDouble(GPRReg gpr, FPRReg fpr)456 { 457 return m_jit.unboxDouble(gpr, fpr);455 FPRReg unboxDouble(GPRReg gpr, GPRReg resultGPR, FPRReg fpr) 456 { 457 return m_jit.unboxDouble(gpr, resultGPR, fpr); 458 458 } 459 459 GPRReg boxDouble(FPRReg fpr) -
trunk/Source/JavaScriptCore/jit/AssemblyHelpers.h
r196513 r197654 1038 1038 return gpr; 1039 1039 } 1040 FPRReg unboxDoubleWithoutAssertions(GPRReg gpr, FPRReg fpr)1041 { 1042 add64(GPRInfo::tagTypeNumberRegister, gpr );1043 move64ToDouble( gpr, fpr);1040 FPRReg unboxDoubleWithoutAssertions(GPRReg gpr, GPRReg resultGPR, FPRReg fpr) 1041 { 1042 add64(GPRInfo::tagTypeNumberRegister, gpr, resultGPR); 1043 move64ToDouble(resultGPR, fpr); 1044 1044 return fpr; 1045 1045 } 1046 FPRReg unboxDouble(GPRReg gpr, FPRReg fpr)1046 FPRReg unboxDouble(GPRReg gpr, GPRReg resultGPR, FPRReg fpr) 1047 1047 { 1048 1048 jitAssertIsJSDouble(gpr); 1049 return unboxDoubleWithoutAssertions(gpr, fpr);1049 return unboxDoubleWithoutAssertions(gpr, resultGPR, fpr); 1050 1050 } 1051 1051 … … 1055 1055 } 1056 1056 1057 void unboxDoubleNonDestructive(JSValueRegs regs, FPRReg destFPR, GPRReg scratchGPR, FPRReg) 1058 { 1059 move(regs.payloadGPR(), scratchGPR); 1060 unboxDouble(scratchGPR, destFPR); 1057 void unboxDoubleNonDestructive(JSValueRegs regs, FPRReg destFPR, GPRReg resultGPR, FPRReg) 1058 { 1059 unboxDouble(regs.payloadGPR(), resultGPR, destFPR); 1061 1060 } 1062 1061
Note:
See TracChangeset
for help on using the changeset viewer.