Ignore:
Timestamp:
Dec 17, 2008, 7:38:10 PM (16 years ago)
Author:
[email protected]
Message:

2008-12-17 Gavin Barraclough <[email protected]>

Reviewed by Sam Weinig.

print("Hello, 64-bit jitted world!");
Get hello-world working through the JIT, on x86-64.

  • assembler/X86Assembler.h:

Fix encoding of opcode + RegisterID format instructions for 64-bit.

  • interpreter/Interpreter.cpp:
  • interpreter/Interpreter.h:

Make VoidPtrPair actually be a pair of void*s.
(Possibly should make this change for 32-bit Mac platforms, too - but won't change 32-bit behaviour in this patch).

  • jit/JIT.cpp:
  • jit/JIT.h:

Provide names for the timeoutCheckRegister & callFrameRegister on x86-64,
force x86-64 ctiTrampoline arguments onto the stack,
implement the asm trampolines for x86-64,
implement the restoreArgumentReference methods for x86-64 calling conventions.

  • jit/JITCall.cpp:
  • jit/JITInlineMethods.h:
  • wtf/Platform.h:

Add switch settings to ENABLE(JIT), on PLATFORM(X86_64) (currently still disabled).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/jit/JITCall.cpp

    r39351 r39370  
    7474void JIT::compileOpCallInitializeCallFrame()
    7575{
    76     store32(X86::edx, Address(X86::edi, RegisterFile::ArgumentCount * static_cast<int>(sizeof(Register))));
     76    store32(X86::edx, Address(callFrameRegister, RegisterFile::ArgumentCount * static_cast<int>(sizeof(Register))));
    7777
    7878    loadPtr(Address(X86::ecx, FIELD_OFFSET(JSFunction, m_scopeChain) + FIELD_OFFSET(ScopeChain, m_node)), X86::edx); // newScopeChain
    7979
    80     storePtr(ImmPtr(noValue()), Address(X86::edi, RegisterFile::OptionalCalleeArguments * static_cast<int>(sizeof(Register))));
    81     storePtr(X86::ecx, Address(X86::edi, RegisterFile::Callee * static_cast<int>(sizeof(Register))));
    82     storePtr(X86::edx, Address(X86::edi, RegisterFile::ScopeChain * static_cast<int>(sizeof(Register))));
     80    storePtr(ImmPtr(noValue()), Address(callFrameRegister, RegisterFile::OptionalCalleeArguments * static_cast<int>(sizeof(Register))));
     81    storePtr(X86::ecx, Address(callFrameRegister, RegisterFile::Callee * static_cast<int>(sizeof(Register))));
     82    storePtr(X86::edx, Address(callFrameRegister, RegisterFile::ScopeChain * static_cast<int>(sizeof(Register))));
    8383}
    8484
     
    158158
    159159    // Speculatively roll the callframe, assuming argCount will match the arity.
    160     storePtr(X86::edi, Address(X86::edi, (RegisterFile::CallerFrame + registerOffset) * static_cast<int>(sizeof(Register))));
    161     addPtr(Imm32(registerOffset * static_cast<int>(sizeof(Register))), X86::edi);
     160    storePtr(callFrameRegister, Address(callFrameRegister, (RegisterFile::CallerFrame + registerOffset) * static_cast<int>(sizeof(Register))));
     161    addPtr(Imm32(registerOffset * static_cast<int>(sizeof(Register))), callFrameRegister);
    162162    move(Imm32(argCount), X86::edx);
    163163
Note: See TracChangeset for help on using the changeset viewer.