Changeset 253335 in webkit for trunk/Source/JavaScriptCore/jit/JITArithmetic.cpp
- Timestamp:
- Dec 10, 2019, 11:41:40 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/JITArithmetic.cpp
r252422 r253335 172 172 void JIT::emit_compareAndJump(const Instruction* instruction, RelationalCondition condition) 173 173 { 174 auto bytecode = instruction->as<Op>(); 175 int op1 = bytecode.m_lhs.offset(); 176 int op2 = bytecode.m_rhs.offset(); 177 unsigned target = jumpTarget(instruction, bytecode.m_targetLabel); 178 emit_compareAndJumpImpl(op1, op2, target, condition); 179 } 180 181 void JIT::emit_compareAndJumpImpl(int op1, int op2, unsigned target, RelationalCondition condition) 182 { 174 183 // We generate inline code for the following cases in the fast path: 175 184 // - int immediate to constant int immediate … … 177 186 // - int immediate to int immediate 178 187 179 auto bytecode = instruction->as<Op>();180 int op1 = bytecode.m_lhs.offset();181 int op2 = bytecode.m_rhs.offset();182 unsigned target = jumpTarget(instruction, bytecode.m_targetLabel);183 188 bool disallowAllocation = false; 184 189 if (isOperandConstantChar(op1)) { … … 229 234 int op2 = bytecode.m_rhs.offset(); 230 235 unsigned target = jumpTarget(instruction, bytecode.m_targetLabel); 236 emit_compareUnsignedAndJumpImpl(op1, op2, target, condition); 237 } 238 239 void JIT::emit_compareUnsignedAndJumpImpl(int op1, int op2, unsigned target, RelationalCondition condition) 240 { 231 241 if (isOperandConstantInt(op2)) { 232 242 emitGetVirtualRegister(op1, regT0); … … 250 260 int op1 = bytecode.m_lhs.offset(); 251 261 int op2 = bytecode.m_rhs.offset(); 262 emit_compareUnsignedImpl(dst, op1, op2, condition); 263 } 264 265 void JIT::emit_compareUnsignedImpl(int dst, int op1, int op2, RelationalCondition condition) 266 { 252 267 if (isOperandConstantInt(op2)) { 253 268 emitGetVirtualRegister(op1, regT0); … … 273 288 int op2 = bytecode.m_rhs.offset(); 274 289 unsigned target = jumpTarget(instruction, bytecode.m_targetLabel); 290 emit_compareAndJumpSlowImpl(op1, op2, target, instruction->size(), condition, operation, invert, iter); 291 } 292 293 void JIT::emit_compareAndJumpSlowImpl(int op1, int op2, unsigned target, size_t instructionSize, DoubleCondition condition, size_t (JIT_OPERATION *operation)(JSGlobalObject*, EncodedJSValue, EncodedJSValue), bool invert, Vector<SlowCaseEntry>::iterator& iter) 294 { 275 295 276 296 // We generate inline code for the following cases in the slow path: … … 303 323 emitJumpSlowToHot(branchDouble(condition, fpRegT0, fpRegT1), target); 304 324 305 emitJumpSlowToHot(jump(), instruction ->size());325 emitJumpSlowToHot(jump(), instructionSize); 306 326 307 327 fail1.link(this); … … 329 349 emitJumpSlowToHot(branchDouble(condition, fpRegT0, fpRegT1), target); 330 350 331 emitJumpSlowToHot(jump(), instruction ->size());351 emitJumpSlowToHot(jump(), instructionSize); 332 352 333 353 fail1.link(this); … … 353 373 emitJumpSlowToHot(branchDouble(condition, fpRegT0, fpRegT1), target); 354 374 355 emitJumpSlowToHot(jump(), instruction ->size());375 emitJumpSlowToHot(jump(), instructionSize); 356 376 357 377 fail1.link(this);
Note:
See TracChangeset
for help on using the changeset viewer.