Changeset 38928 in webkit for trunk/JavaScriptCore/jit/JIT.cpp
- Timestamp:
- Dec 2, 2008, 6:10:54 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/JIT.cpp
r38917 r38928 1813 1813 } 1814 1814 case op_rshift: { 1815 emitGetVirtualRegisters(instruction[i + 2].u.operand, X86::eax, instruction[i + 3].u.operand, X86::ecx, i); 1816 emitJumpSlowCaseIfNotImmNum(X86::eax, i); 1817 emitJumpSlowCaseIfNotImmNum(X86::ecx, i); 1818 emitFastArithImmToInt(X86::ecx); 1819 __ sarl_CLr(X86::eax); 1815 unsigned src1 = instruction[i + 2].u.operand; 1816 unsigned src2 = instruction[i + 3].u.operand; 1817 if (JSValue* value = getConstantImmediateNumericArg(src2)) { 1818 emitGetVirtualRegister(src1, X86::eax, i); 1819 emitJumpSlowCaseIfNotImmNum(X86::eax, i); 1820 // Mask with 0x1f as per ecma-262 11.7.2 step 7. 1821 __ sarl_i8r(JSImmediate::getTruncatedUInt32(value) & 0x1f, X86::eax); 1822 } else { 1823 emitGetVirtualRegisters(src1, X86::eax, src2, X86::ecx, i); 1824 emitJumpSlowCaseIfNotImmNum(X86::eax, i); 1825 emitJumpSlowCaseIfNotImmNum(X86::ecx, i); 1826 emitFastArithImmToInt(X86::ecx); 1827 __ sarl_CLr(X86::eax); 1828 } 1820 1829 emitFastArithPotentiallyReTagImmediate(X86::eax); 1821 1830 emitPutVirtualRegister(instruction[i + 1].u.operand); … … 2415 2424 } 2416 2425 case op_rshift: { 2426 unsigned src2 = instruction[i + 3].u.operand; 2417 2427 __ link(iter->from, __ label()); 2418 __ link((++iter)->from, __ label()); 2428 if (getConstantImmediateNumericArg(src2)) 2429 emitPutCTIArgFromVirtualRegister(src2, 4, X86::ecx); 2430 else { 2431 __ link((++iter)->from, __ label()); 2432 emitPutCTIArg(X86::ecx, 4); 2433 } 2434 2419 2435 emitPutCTIArg(X86::eax, 0); 2420 emitPutCTIArg(X86::ecx, 4);2421 2436 emitCTICall(i, Interpreter::cti_op_rshift); 2422 2437 emitPutVirtualRegister(instruction[i + 1].u.operand);
Note:
See TracChangeset
for help on using the changeset viewer.