Changeset 67990 in webkit for trunk/JavaScriptCore/jit
- Timestamp:
- Sep 21, 2010, 4:19:53 PM (15 years ago)
- Location:
- trunk/JavaScriptCore/jit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/JIT.cpp
r66150 r67990 409 409 DEFINE_SLOWCASE_OP(op_jnlesseq) 410 410 DEFINE_SLOWCASE_OP(op_jtrue) 411 DEFINE_SLOWCASE_OP(op_load_varargs) 411 412 DEFINE_SLOWCASE_OP(op_loop_if_less) 412 413 DEFINE_SLOWCASE_OP(op_loop_if_lesseq) -
trunk/JavaScriptCore/jit/JIT.h
r66846 r67990 856 856 void emitSlow_op_jnlesseq(Instruction*, Vector<SlowCaseEntry>::iterator&); 857 857 void emitSlow_op_jtrue(Instruction*, Vector<SlowCaseEntry>::iterator&); 858 void emitSlow_op_load_varargs(Instruction*, Vector<SlowCaseEntry>::iterator&); 858 859 void emitSlow_op_loop_if_less(Instruction*, Vector<SlowCaseEntry>::iterator&); 859 860 void emitSlow_op_loop_if_lesseq(Instruction*, Vector<SlowCaseEntry>::iterator&); -
trunk/JavaScriptCore/jit/JITCall32_64.cpp
r63404 r67990 181 181 } 182 182 183 void JIT::emit_op_load_varargs(Instruction* currentInstruction)184 {185 int argCountDst = currentInstruction[1].u.operand;186 int argsOffset = currentInstruction[2].u.operand;187 188 JITStubCall stubCall(this, cti_op_load_varargs);189 stubCall.addArgument(Imm32(argsOffset));190 stubCall.call();191 // Stores a naked int32 in the register file.192 store32(returnValueRegister, Address(callFrameRegister, argCountDst * sizeof(Register)));193 }194 195 183 void JIT::emit_op_call_varargs(Instruction* currentInstruction) 196 184 { -
trunk/JavaScriptCore/jit/JITOpcodes.cpp
r66150 r67990 29 29 #include "JIT.h" 30 30 31 #include "Arguments.h" 31 32 #include "JITInlineMethods.h" 32 33 #include "JITStubCall.h" … … 437 438 { 438 439 compileOpCall(op_call_eval, currentInstruction, m_callLinkInfoIndex++); 439 }440 441 void JIT::emit_op_load_varargs(Instruction* currentInstruction)442 {443 int argCountDst = currentInstruction[1].u.operand;444 int argsOffset = currentInstruction[2].u.operand;445 446 JITStubCall stubCall(this, cti_op_load_varargs);447 stubCall.addArgument(Imm32(argsOffset));448 stubCall.call();449 // Stores a naked int32 in the register file.450 store32(returnValueRegister, Address(callFrameRegister, argCountDst * sizeof(Register)));451 440 } 452 441 … … 1529 1518 } 1530 1519 1520 void JIT::emit_op_load_varargs(Instruction* currentInstruction) 1521 { 1522 int argCountDst = currentInstruction[1].u.operand; 1523 int argsOffset = currentInstruction[2].u.operand; 1524 int expectedParams = m_codeBlock->m_numParameters - 1; 1525 // Don't do inline copying if we aren't guaranteed to have a single stream 1526 // of arguments 1527 if (expectedParams) { 1528 JITStubCall stubCall(this, cti_op_load_varargs); 1529 stubCall.addArgument(Imm32(argsOffset)); 1530 stubCall.call(); 1531 // Stores a naked int32 in the register file. 1532 store32(returnValueRegister, Address(callFrameRegister, argCountDst * sizeof(Register))); 1533 return; 1534 } 1535 1536 #if USE(JSVALUE32_64) 1537 addSlowCase(branch32(NotEqual, tagFor(argsOffset), Imm32(JSValue::EmptyValueTag))); 1538 #else 1539 addSlowCase(branchTestPtr(NonZero, addressFor(argsOffset))); 1540 #endif 1541 // Load arg count into regT0 1542 emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT0); 1543 storePtr(regT0, addressFor(argCountDst)); 1544 Jump endBranch = branch32(Equal, regT0, Imm32(1)); 1545 1546 mul32(Imm32(sizeof(Register)), regT0, regT3); 1547 addPtr(Imm32(static_cast<unsigned>(sizeof(Register) - RegisterFile::CallFrameHeaderSize * sizeof(Register))), callFrameRegister, regT1); 1548 subPtr(regT3, regT1); // regT1 is now the start of the out of line arguments 1549 addPtr(Imm32(argsOffset * sizeof(Register)), callFrameRegister, regT2); // regT2 is the target buffer 1550 1551 // Bounds check the registerfile 1552 addPtr(regT2, regT3); 1553 addSlowCase(branchPtr(Below, AbsoluteAddress(&m_globalData->interpreter->registerFile().m_end), regT3)); 1554 1555 sub32(Imm32(1), regT0); 1556 Label loopStart = label(); 1557 loadPtr(BaseIndex(regT1, regT0, TimesEight, static_cast<unsigned>(0 - 2 * sizeof(Register))), regT3); 1558 storePtr(regT3, BaseIndex(regT2, regT0, TimesEight, static_cast<unsigned>(0 - sizeof(Register)))); 1559 #if USE(JSVALUE32_64) 1560 loadPtr(BaseIndex(regT1, regT0, TimesEight, static_cast<unsigned>(sizeof(void*) - 2 * sizeof(Register))), regT3); 1561 storePtr(regT3, BaseIndex(regT2, regT0, TimesEight, static_cast<unsigned>(sizeof(void*) - sizeof(Register)))); 1562 #endif 1563 branchSubPtr(NonZero, Imm32(1), regT0).linkTo(loopStart, this); 1564 endBranch.link(this); 1565 } 1566 1567 void JIT::emitSlow_op_load_varargs(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) 1568 { 1569 int argCountDst = currentInstruction[1].u.operand; 1570 int argsOffset = currentInstruction[2].u.operand; 1571 int expectedParams = m_codeBlock->m_numParameters - 1; 1572 if (expectedParams) 1573 return; 1574 1575 linkSlowCase(iter); 1576 linkSlowCase(iter); 1577 JITStubCall stubCall(this, cti_op_load_varargs); 1578 stubCall.addArgument(Imm32(argsOffset)); 1579 stubCall.call(); 1580 // Stores a naked int32 in the register file. 1581 store32(returnValueRegister, Address(callFrameRegister, argCountDst * sizeof(Register))); 1582 } 1583 1531 1584 // For both JSValue32_64 and JSValue32 1532 1585 #if ENABLE(JIT_USE_SOFT_MODULO)
Note:
See TracChangeset
for help on using the changeset viewer.