Changeset 49409 in webkit for trunk/JavaScriptCore/jit/JITArithmetic.cpp
- Timestamp:
- Oct 9, 2009, 5:30:49 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/JITArithmetic.cpp
r48938 r49409 99 99 emitLoad(op2, regT3, regT2); 100 100 notInt32Op2.append(branch32(NotEqual, regT3, Imm32(JSValue::Int32Tag))); 101 addJump(branch32(LessThanOrEqual, regT2, Imm32(getConstantOperand(op1).asInt32())), target + 3);101 addJump(branch32(LessThanOrEqual, regT2, Imm32(getConstantOperand(op1).asInt32())), target); 102 102 } else if (isOperandConstantImmediateInt(op2)) { 103 103 emitLoad(op1, regT1, regT0); 104 104 notInt32Op1.append(branch32(NotEqual, regT1, Imm32(JSValue::Int32Tag))); 105 addJump(branch32(GreaterThanOrEqual, regT0, Imm32(getConstantOperand(op2).asInt32())), target + 3);105 addJump(branch32(GreaterThanOrEqual, regT0, Imm32(getConstantOperand(op2).asInt32())), target); 106 106 } else { 107 107 emitLoad2(op1, regT1, regT0, op2, regT3, regT2); 108 108 notInt32Op1.append(branch32(NotEqual, regT1, Imm32(JSValue::Int32Tag))); 109 109 notInt32Op2.append(branch32(NotEqual, regT3, Imm32(JSValue::Int32Tag))); 110 addJump(branch32(GreaterThanOrEqual, regT0, regT2), target + 3);110 addJump(branch32(GreaterThanOrEqual, regT0, regT2), target); 111 111 } 112 112 … … 146 146 stubCall.addArgument(op2); 147 147 stubCall.call(); 148 emitJumpSlowToHot(branchTest32(Zero, regT0), target + 3);148 emitJumpSlowToHot(branchTest32(Zero, regT0), target); 149 149 } 150 150 … … 162 162 emitLoad(op2, regT3, regT2); 163 163 notInt32Op2.append(branch32(NotEqual, regT3, Imm32(JSValue::Int32Tag))); 164 addJump(branch32(LessThan, regT2, Imm32(getConstantOperand(op1).asInt32())), target + 3);164 addJump(branch32(LessThan, regT2, Imm32(getConstantOperand(op1).asInt32())), target); 165 165 } else if (isOperandConstantImmediateInt(op2)) { 166 166 emitLoad(op1, regT1, regT0); 167 167 notInt32Op1.append(branch32(NotEqual, regT1, Imm32(JSValue::Int32Tag))); 168 addJump(branch32(GreaterThan, regT0, Imm32(getConstantOperand(op2).asInt32())), target + 3);168 addJump(branch32(GreaterThan, regT0, Imm32(getConstantOperand(op2).asInt32())), target); 169 169 } else { 170 170 emitLoad2(op1, regT1, regT0, op2, regT3, regT2); 171 171 notInt32Op1.append(branch32(NotEqual, regT1, Imm32(JSValue::Int32Tag))); 172 172 notInt32Op2.append(branch32(NotEqual, regT3, Imm32(JSValue::Int32Tag))); 173 addJump(branch32(GreaterThan, regT0, regT2), target + 3);173 addJump(branch32(GreaterThan, regT0, regT2), target); 174 174 } 175 175 … … 209 209 stubCall.addArgument(op2); 210 210 stubCall.call(); 211 emitJumpSlowToHot(branchTest32(Zero, regT0), target + 3);211 emitJumpSlowToHot(branchTest32(Zero, regT0), target); 212 212 } 213 213 … … 830 830 case op_jnless: 831 831 emitLoadDouble(op1, fpRegT2); 832 addJump(branchDouble(DoubleLessThanOrEqual, fpRegT0, fpRegT2), dst + 3);832 addJump(branchDouble(DoubleLessThanOrEqual, fpRegT0, fpRegT2), dst); 833 833 break; 834 834 case op_jnlesseq: 835 835 emitLoadDouble(op1, fpRegT2); 836 addJump(branchDouble(DoubleLessThan, fpRegT0, fpRegT2), dst + 3);836 addJump(branchDouble(DoubleLessThan, fpRegT0, fpRegT2), dst); 837 837 break; 838 838 default: … … 883 883 case op_jnless: 884 884 emitLoadDouble(op2, fpRegT1); 885 addJump(branchDouble(DoubleLessThanOrEqual, fpRegT1, fpRegT0), dst + 3);885 addJump(branchDouble(DoubleLessThanOrEqual, fpRegT1, fpRegT0), dst); 886 886 break; 887 887 case op_jnlesseq: 888 888 emitLoadDouble(op2, fpRegT1); 889 addJump(branchDouble(DoubleLessThan, fpRegT1, fpRegT0), dst + 3);889 addJump(branchDouble(DoubleLessThan, fpRegT1, fpRegT0), dst); 890 890 break; 891 891 default: … … 1314 1314 int32_t op2imm = static_cast<int32_t>(JSImmediate::rawValue(getConstantOperand(op2))); 1315 1315 #endif 1316 addJump(branch32(GreaterThanOrEqual, regT0, Imm32(op2imm)), target + 3);1316 addJump(branch32(GreaterThanOrEqual, regT0, Imm32(op2imm)), target); 1317 1317 } else if (isOperandConstantImmediateInt(op1)) { 1318 1318 emitGetVirtualRegister(op2, regT1); … … 1323 1323 int32_t op1imm = static_cast<int32_t>(JSImmediate::rawValue(getConstantOperand(op1))); 1324 1324 #endif 1325 addJump(branch32(LessThanOrEqual, regT1, Imm32(op1imm)), target + 3);1325 addJump(branch32(LessThanOrEqual, regT1, Imm32(op1imm)), target); 1326 1326 } else { 1327 1327 emitGetVirtualRegisters(op1, regT0, op2, regT1); … … 1329 1329 emitJumpSlowCaseIfNotImmediateInteger(regT1); 1330 1330 1331 addJump(branch32(GreaterThanOrEqual, regT0, regT1), target + 3);1331 addJump(branch32(GreaterThanOrEqual, regT0, regT1), target); 1332 1332 } 1333 1333 } … … 1366 1366 convertInt32ToDouble(regT1, fpRegT1); 1367 1367 1368 emitJumpSlowToHot(branchDouble(DoubleLessThanOrEqual, fpRegT1, fpRegT0), target + 3);1368 emitJumpSlowToHot(branchDouble(DoubleLessThanOrEqual, fpRegT1, fpRegT0), target); 1369 1369 1370 1370 emitJumpSlowToHot(jump(), OPCODE_LENGTH(op_jnless)); … … 1383 1383 stubCall.addArgument(op2, regT2); 1384 1384 stubCall.call(); 1385 emitJumpSlowToHot(branchTest32(Zero, regT0), target + 3);1385 emitJumpSlowToHot(branchTest32(Zero, regT0), target); 1386 1386 1387 1387 } else if (isOperandConstantImmediateInt(op1)) { … … 1407 1407 convertInt32ToDouble(regT0, fpRegT0); 1408 1408 1409 emitJumpSlowToHot(branchDouble(DoubleLessThanOrEqual, fpRegT1, fpRegT0), target + 3);1409 emitJumpSlowToHot(branchDouble(DoubleLessThanOrEqual, fpRegT1, fpRegT0), target); 1410 1410 1411 1411 emitJumpSlowToHot(jump(), OPCODE_LENGTH(op_jnless)); … … 1424 1424 stubCall.addArgument(regT1); 1425 1425 stubCall.call(); 1426 emitJumpSlowToHot(branchTest32(Zero, regT0), target + 3);1426 emitJumpSlowToHot(branchTest32(Zero, regT0), target); 1427 1427 1428 1428 } else { … … 1453 1453 #endif 1454 1454 1455 emitJumpSlowToHot(branchDouble(DoubleLessThanOrEqual, fpRegT1, fpRegT0), target + 3);1455 emitJumpSlowToHot(branchDouble(DoubleLessThanOrEqual, fpRegT1, fpRegT0), target); 1456 1456 1457 1457 emitJumpSlowToHot(jump(), OPCODE_LENGTH(op_jnless)); … … 1476 1476 stubCall.addArgument(regT1); 1477 1477 stubCall.call(); 1478 emitJumpSlowToHot(branchTest32(Zero, regT0), target + 3);1478 emitJumpSlowToHot(branchTest32(Zero, regT0), target); 1479 1479 } 1480 1480 } … … 1499 1499 int32_t op2imm = static_cast<int32_t>(JSImmediate::rawValue(getConstantOperand(op2))); 1500 1500 #endif 1501 addJump(branch32(GreaterThan, regT0, Imm32(op2imm)), target + 3);1501 addJump(branch32(GreaterThan, regT0, Imm32(op2imm)), target); 1502 1502 } else if (isOperandConstantImmediateInt(op1)) { 1503 1503 emitGetVirtualRegister(op2, regT1); … … 1508 1508 int32_t op1imm = static_cast<int32_t>(JSImmediate::rawValue(getConstantOperand(op1))); 1509 1509 #endif 1510 addJump(branch32(LessThan, regT1, Imm32(op1imm)), target + 3);1510 addJump(branch32(LessThan, regT1, Imm32(op1imm)), target); 1511 1511 } else { 1512 1512 emitGetVirtualRegisters(op1, regT0, op2, regT1); … … 1514 1514 emitJumpSlowCaseIfNotImmediateInteger(regT1); 1515 1515 1516 addJump(branch32(GreaterThan, regT0, regT1), target + 3);1516 addJump(branch32(GreaterThan, regT0, regT1), target); 1517 1517 } 1518 1518 } … … 1551 1551 convertInt32ToDouble(regT1, fpRegT1); 1552 1552 1553 emitJumpSlowToHot(branchDouble(DoubleLessThan, fpRegT1, fpRegT0), target + 3);1553 emitJumpSlowToHot(branchDouble(DoubleLessThan, fpRegT1, fpRegT0), target); 1554 1554 1555 1555 emitJumpSlowToHot(jump(), OPCODE_LENGTH(op_jnlesseq)); … … 1568 1568 stubCall.addArgument(op2, regT2); 1569 1569 stubCall.call(); 1570 emitJumpSlowToHot(branchTest32(Zero, regT0), target + 3);1570 emitJumpSlowToHot(branchTest32(Zero, regT0), target); 1571 1571 1572 1572 } else if (isOperandConstantImmediateInt(op1)) { … … 1592 1592 convertInt32ToDouble(regT0, fpRegT0); 1593 1593 1594 emitJumpSlowToHot(branchDouble(DoubleLessThan, fpRegT1, fpRegT0), target + 3);1594 emitJumpSlowToHot(branchDouble(DoubleLessThan, fpRegT1, fpRegT0), target); 1595 1595 1596 1596 emitJumpSlowToHot(jump(), OPCODE_LENGTH(op_jnlesseq)); … … 1609 1609 stubCall.addArgument(regT1); 1610 1610 stubCall.call(); 1611 emitJumpSlowToHot(branchTest32(Zero, regT0), target + 3);1611 emitJumpSlowToHot(branchTest32(Zero, regT0), target); 1612 1612 1613 1613 } else { … … 1638 1638 #endif 1639 1639 1640 emitJumpSlowToHot(branchDouble(DoubleLessThan, fpRegT1, fpRegT0), target + 3);1640 emitJumpSlowToHot(branchDouble(DoubleLessThan, fpRegT1, fpRegT0), target); 1641 1641 1642 1642 emitJumpSlowToHot(jump(), OPCODE_LENGTH(op_jnlesseq)); … … 1661 1661 stubCall.addArgument(regT1); 1662 1662 stubCall.call(); 1663 emitJumpSlowToHot(branchTest32(Zero, regT0), target + 3);1663 emitJumpSlowToHot(branchTest32(Zero, regT0), target); 1664 1664 } 1665 1665 }
Note:
See TracChangeset
for help on using the changeset viewer.