Changeset 36408 in webkit for trunk/JavaScriptCore/VM/CTI.cpp
- Timestamp:
- Sep 14, 2008, 4:01:03 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/CTI.cpp
r36402 r36408 571 571 break; 572 572 } 573 case op_loop_if_lesseq: { 574 emitSlowScriptCheck(i); 575 576 unsigned target = instruction[i + 3].u.operand; 577 JSValue* src2imm = getConstantImmediateNumericArg(instruction[i + 2].u.operand); 578 if (src2imm) { 579 emitGetArg(instruction[i + 1].u.operand, X86::edx); 580 emitJumpSlowCaseIfNotImm(X86::edx, i); 581 m_jit.cmpl_i32r(reinterpret_cast<unsigned>(src2imm), X86::edx); 582 m_jmpTable.append(JmpTable(m_jit.emitUnlinkedJle(), i + 3 + target)); 583 } else { 584 emitGetArg(instruction[i + 1].u.operand, X86::eax); 585 emitGetArg(instruction[i + 2].u.operand, X86::edx); 586 emitJumpSlowCaseIfNotImm(X86::eax, i); 587 emitJumpSlowCaseIfNotImm(X86::edx, i); 588 m_jit.cmpl_rr(X86::edx, X86::eax); 589 m_jmpTable.append(JmpTable(m_jit.emitUnlinkedJle(), i + 3 + target)); 590 } 591 i += 4; 592 break; 593 } 573 594 case op_new_object: { 574 595 emitCall(i, Machine::cti_op_new_object); … … 1446 1467 break; 1447 1468 } 1469 case op_loop_if_lesseq: { 1470 emitSlowScriptCheck(i); 1471 1472 unsigned target = instruction[i + 3].u.operand; 1473 JSValue* src2imm = getConstantImmediateNumericArg(instruction[i + 2].u.operand); 1474 if (src2imm) { 1475 m_jit.link(iter->from, m_jit.label()); 1476 emitPutArg(X86::edx, 0); 1477 emitGetPutArg(instruction[i + 2].u.operand, 4, X86::ecx); 1478 emitCall(i, Machine::cti_op_loop_if_lesseq); 1479 m_jit.testl_rr(X86::eax, X86::eax); 1480 m_jit.link(m_jit.emitUnlinkedJne(), m_labels[i + 3 + target]); 1481 } else { 1482 m_jit.link(iter->from, m_jit.label()); 1483 m_jit.link((++iter)->from, m_jit.label()); 1484 emitPutArg(X86::eax, 0); 1485 emitPutArg(X86::edx, 4); 1486 emitCall(i, Machine::cti_op_loop_if_lesseq); 1487 m_jit.testl_rr(X86::eax, X86::eax); 1488 m_jit.link(m_jit.emitUnlinkedJne(), m_labels[i + 3 + target]); 1489 } 1490 i += 4; 1491 break; 1492 } 1448 1493 case op_pre_inc: { 1449 1494 unsigned srcDst = instruction[i + 1].u.operand;
Note:
See TracChangeset
for help on using the changeset viewer.