Changeset 89956 in webkit
- Timestamp:
- Jun 28, 2011, 1:47:58 PM (15 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 5 edited
-
ChangeLog (modified) (1 diff)
-
dfg/DFGJITCodeGenerator.cpp (modified) (1 diff)
-
dfg/DFGJITCodeGenerator.h (modified) (4 diffs)
-
dfg/DFGRegisterBank.h (modified) (1 diff)
-
dfg/DFGSpeculativeJIT.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r89954 r89956 21 21 * jit/JITStubs.cpp: 22 22 (JSC::DEFINE_STUB_FUNCTION): 23 24 2011-06-28 Gavin Barraclough <barraclough@apple.com> 25 26 Reviewed by Oliver Hunt. 27 28 https://bugs.webkit.org/show_bug.cgi?id=63560 29 DFG_JIT allow allocation of specific machine registers 30 31 This allow us to allocate the registers necessary to perform x86 32 idiv instructions for div/mod, and may be useful for shifts, too. 33 34 * dfg/DFGJITCodeGenerator.cpp: 35 (JSC::DFG::GPRTemporary::GPRTemporary): 36 * dfg/DFGJITCodeGenerator.h: 37 (JSC::DFG::JITCodeGenerator::allocate): 38 (JSC::DFG::GPRResult::GPRResult): 39 * dfg/DFGRegisterBank.h: 40 (JSC::DFG::RegisterBank::allocateSpecific): 41 * dfg/DFGSpeculativeJIT.h: 42 (JSC::DFG::SpeculativeJIT::isInteger): 23 43 24 44 2011-06-28 Gavin Barraclough <barraclough@apple.com> -
trunk/Source/JavaScriptCore/dfg/DFGJITCodeGenerator.cpp
r89861 r89956 537 537 } 538 538 539 GPRTemporary::GPRTemporary(JITCodeGenerator* jit, GPRReg specific) 540 : m_jit(jit) 541 , m_gpr(InvalidGPRReg) 542 { 543 m_gpr = m_jit->allocate(specific); 544 } 545 539 546 GPRTemporary::GPRTemporary(JITCodeGenerator* jit, SpeculateIntegerOperand& op1) 540 547 : m_jit(jit) -
trunk/Source/JavaScriptCore/dfg/DFGJITCodeGenerator.h
r89861 r89956 117 117 return gpr; 118 118 } 119 GPRReg allocate(GPRReg specific) 120 { 121 VirtualRegister spillMe = m_gprs.allocateSpecific(specific); 122 if (spillMe != InvalidVirtualRegister) 123 spill(spillMe); 124 return specific; 125 } 119 126 FPRReg fprAllocate() 120 127 { … … 1000 1007 public: 1001 1008 GPRTemporary(JITCodeGenerator*); 1009 GPRTemporary(JITCodeGenerator*, GPRReg specific); 1002 1010 GPRTemporary(JITCodeGenerator*, SpeculateIntegerOperand&); 1003 1011 GPRTemporary(JITCodeGenerator*, SpeculateIntegerOperand&, SpeculateIntegerOperand&); … … 1018 1026 } 1019 1027 1020 protected:1021 GPRTemporary(JITCodeGenerator* jit, GPRReg lockedGPR)1022 : m_jit(jit)1023 , m_gpr(lockedGPR)1024 {1025 }1026 1027 1028 private: 1028 1029 JITCodeGenerator* m_jit; … … 1067 1068 public: 1068 1069 GPRResult(JITCodeGenerator* jit) 1069 : GPRTemporary(jit, lockedResult(jit)) 1070 { 1071 } 1072 1073 private: 1074 static GPRReg lockedResult(JITCodeGenerator* jit) 1075 { 1076 jit->lock(GPRInfo::returnValueGPR); 1077 return GPRInfo::returnValueGPR; 1070 : GPRTemporary(jit, GPRInfo::returnValueGPR) 1071 { 1078 1072 } 1079 1073 }; -
trunk/Source/JavaScriptCore/dfg/DFGRegisterBank.h
r85271 r89956 140 140 } 141 141 142 // Allocates the given register, even if this will force a spill. 143 VirtualRegister allocateSpecific(RegID reg) 144 { 145 unsigned index = BankInfo::toIndex(reg); 146 147 ++m_data[index].lockCount; 148 VirtualRegister name = nameAtIndex(index); 149 if (name != InvalidVirtualRegister) 150 releaseAtIndex(index); 151 152 return name; 153 } 154 142 155 // retain/release - these methods are used to associate/disassociate names 143 156 // with values in registers. retain should only be called on locked registers. -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
r89084 r89956 161 161 return true; 162 162 163 if (isInt32Constant(nodeIndex)) 164 return true; 165 163 166 VirtualRegister virtualRegister = node.virtualRegister(); 164 167 GenerationInfo& info = m_generationInfo[virtualRegister];
Note:
See TracChangeset
for help on using the changeset viewer.