Changeset 46831 in webkit for trunk/JavaScriptCore/jit/JITOpcodes.cpp
- Timestamp:
- Aug 5, 2009, 10:22:42 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/JITOpcodes.cpp
r46620 r46831 1794 1794 addPtr(Imm32(NativeCallFrameSize - sizeof(NativeFunctionCalleeSignature)), stackPointerRegister); 1795 1795 1796 #elif PLATFORM(ARM) && !PLATFORM_ARM_ARCH(7) 1797 emitGetFromCallFrameHeader32(RegisterFile::ArgumentCount, regT0); 1798 1799 // Allocate stack space for our arglist 1800 COMPILE_ASSERT((sizeof(ArgList) & 0x7) == 0, ArgList_should_by_8byte_aligned); 1801 subPtr(Imm32(sizeof(ArgList)), stackPointerRegister); 1802 1803 // Set up arguments 1804 subPtr(Imm32(1), regT0); // Don't include 'this' in argcount 1805 1806 // Push argcount 1807 storePtr(regT0, Address(stackPointerRegister, OBJECT_OFFSETOF(ArgList, m_argCount))); 1808 1809 // Calculate the start of the callframe header, and store in regT1 1810 move(callFrameRegister, regT1); 1811 sub32(Imm32(RegisterFile::CallFrameHeaderSize * (int32_t)sizeof(Register)), regT1); 1812 1813 // Calculate start of arguments as callframe header - sizeof(Register) * argcount (regT1) 1814 mul32(Imm32(sizeof(Register)), regT0, regT0); 1815 subPtr(regT0, regT1); 1816 1817 // push pointer to arguments 1818 storePtr(regT1, Address(stackPointerRegister, OBJECT_OFFSETOF(ArgList, m_args))); 1819 1820 // Setup arg3: regT1 currently points to the first argument, regT1-sizeof(Register) points to 'this' 1821 loadPtr(Address(regT1, -(int32_t)sizeof(Register)), regT2); 1822 1823 // Setup arg2: 1824 emitGetFromCallFrameHeaderPtr(RegisterFile::Callee, regT1); 1825 1826 // Setup arg1: 1827 move(callFrameRegister, regT0); 1828 1829 // Setup arg4: This is a plain hack 1830 move(stackPointerRegister, ARM::S0); 1831 1832 move(ctiReturnRegister, ARM::lr); 1833 call(Address(regT1, OBJECT_OFFSETOF(JSFunction, m_data))); 1834 1835 addPtr(Imm32(sizeof(ArgList)), stackPointerRegister); 1836 1796 1837 #elif ENABLE(JIT_OPTIMIZE_NATIVE_CALL) 1797 1838 #error "JIT_OPTIMIZE_NATIVE_CALL not yet supported on this platform." … … 1841 1882 patchBuffer.link(string_failureCases3Call, FunctionPtr(cti_op_get_by_id_string_fail)); 1842 1883 #endif 1884 #if ENABLE(JIT_OPTIMIZE_CALL) 1843 1885 patchBuffer.link(callArityCheck1, FunctionPtr(cti_op_call_arityCheck)); 1844 1886 patchBuffer.link(callArityCheck2, FunctionPtr(cti_op_call_arityCheck)); 1845 patchBuffer.link(callArityCheck3, FunctionPtr(cti_op_call_arityCheck));1846 1887 patchBuffer.link(callJSFunction1, FunctionPtr(cti_op_call_JSFunction)); 1847 1888 patchBuffer.link(callJSFunction2, FunctionPtr(cti_op_call_JSFunction)); 1848 patchBuffer.link(callJSFunction3, FunctionPtr(cti_op_call_JSFunction));1849 1889 patchBuffer.link(callDontLazyLinkCall, FunctionPtr(cti_vm_dontLazyLinkCall)); 1850 1890 patchBuffer.link(callLazyLinkCall, FunctionPtr(cti_vm_lazyLinkCall)); 1891 #endif 1892 patchBuffer.link(callArityCheck3, FunctionPtr(cti_op_call_arityCheck)); 1893 patchBuffer.link(callJSFunction3, FunctionPtr(cti_op_call_JSFunction)); 1851 1894 1852 1895 CodeRef finalCode = patchBuffer.finalizeCode();
Note:
See TracChangeset
for help on using the changeset viewer.