Changeset 43363 in webkit for trunk/JavaScriptCore/jit/JIT.cpp
- Timestamp:
- May 7, 2009, 1:42:59 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/JIT.cpp
r43362 r43363 1 1 2 /* 2 3 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. … … 229 230 #endif 230 231 addJump(branch32(LessThan, regT0, Imm32(op2imm)), target + 3); 232 } else if (isOperandConstantImmediateInt(op1)) { 233 emitGetVirtualRegister(op2, regT1); 234 emitJumpSlowCaseIfNotImmediateInteger(regT1); 235 #if USE(ALTERNATE_JSIMMEDIATE) 236 int32_t op1imm = getConstantOperandImmediateInt(op1); 237 #else 238 int32_t op1imm = static_cast<int32_t>(JSImmediate::rawValue(getConstantOperand(op1))); 239 #endif 240 addJump(branch32(GreaterThan, regT1, Imm32(op1imm)), target + 3); 231 241 } else { 232 242 emitGetVirtualRegisters(op1, regT0, op2, regT1); … … 614 624 } 615 625 case op_jnless: { 616 unsigned op1 = currentInstruction[1].u.operand;617 unsigned op2 = currentInstruction[2].u.operand;618 626 unsigned target = currentInstruction[3].u.operand; 619 if (isOperandConstantImmediateInt(op2)) { 620 emitGetVirtualRegister(op1, regT0); 621 emitJumpSlowCaseIfNotImmediateInteger(regT0); 622 #if USE(ALTERNATE_JSIMMEDIATE) 623 int32_t op2imm = getConstantOperandImmediateInt(op2); 624 #else 625 int32_t op2imm = static_cast<int32_t>(JSImmediate::rawValue(getConstantOperand(op2))); 626 #endif 627 addJump(branch32(GreaterThanOrEqual, regT0, Imm32(op2imm)), target + 3); 628 } else { 629 emitGetVirtualRegisters(op1, regT0, op2, regT1); 630 emitJumpSlowCaseIfNotImmediateInteger(regT0); 631 emitJumpSlowCaseIfNotImmediateInteger(regT1); 632 addJump(branch32(GreaterThanOrEqual, regT0, regT1), target + 3); 633 } 627 compileFastArith_op_jnless(currentInstruction[1].u.operand, currentInstruction[2].u.operand, target); 634 628 RECORD_JUMP_TARGET(target + 3); 635 629 NEXT_OPCODE(op_jnless); … … 1236 1230 } 1237 1231 case op_loop_if_less: { 1232 unsigned op1 = currentInstruction[1].u.operand; 1238 1233 unsigned op2 = currentInstruction[2].u.operand; 1239 1234 unsigned target = currentInstruction[3].u.operand; … … 1242 1237 emitPutJITStubArg(regT0, 1); 1243 1238 emitPutJITStubArgFromVirtualRegister(op2, 2, regT2); 1239 emitCTICall(JITStubs::cti_op_loop_if_less); 1240 emitJumpSlowToHot(branchTest32(NonZero, regT0), target + 3); 1241 } else if (isOperandConstantImmediateInt(op1)) { 1242 linkSlowCase(iter); 1243 emitPutJITStubArgFromVirtualRegister(op1, 1, regT1); 1244 emitPutJITStubArg(regT0, 2); 1244 1245 emitCTICall(JITStubs::cti_op_loop_if_less); 1245 1246 emitJumpSlowToHot(branchTest32(NonZero, regT0), target + 3); … … 1323 1324 } 1324 1325 case op_jnless: { 1325 unsigned op2 = currentInstruction[2].u.operand; 1326 unsigned target = currentInstruction[3].u.operand; 1327 if (isOperandConstantImmediateInt(op2)) { 1328 linkSlowCase(iter); 1329 emitPutJITStubArg(regT0, 1); 1330 emitPutJITStubArgFromVirtualRegister(currentInstruction[2].u.operand, 2, regT2); 1331 emitCTICall(JITStubs::cti_op_jless); 1332 emitJumpSlowToHot(branchTest32(Zero, regT0), target + 3); 1333 } else { 1334 linkSlowCase(iter); 1335 linkSlowCase(iter); 1336 emitPutJITStubArg(regT0, 1); 1337 emitPutJITStubArg(regT1, 2); 1338 emitCTICall(JITStubs::cti_op_jless); 1339 emitJumpSlowToHot(branchTest32(Zero, regT0), target + 3); 1340 } 1326 compileFastArithSlow_op_jnless(currentInstruction[1].u.operand, currentInstruction[2].u.operand, currentInstruction[3].u.operand, iter); 1341 1327 NEXT_OPCODE(op_jnless); 1342 1328 }
Note:
See TracChangeset
for help on using the changeset viewer.