Implement JIT on Windows 64 bits
authorjocelyn.turcotte@digia.com <jocelyn.turcotte@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Feb 2013 13:04:28 +0000 (13:04 +0000)
committerjocelyn.turcotte@digia.com <jocelyn.turcotte@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Feb 2013 13:04:28 +0000 (13:04 +0000)
commita71bd2b56374f7beb7c8fbe97aa1651c3c617864
tree64e2e0b4128ab5f59163fc0db79c20c89063cabf
parentcec7440d186ff9d47106d35eb4977eaf84ea3c90
Implement JIT on Windows 64 bits
https://bugs.webkit.org/show_bug.cgi?id=107965

Reviewed by Simon Hausmann.

Source/JavaScriptCore:

1. MSVC doesn't support inline assembly for 64 bits, implements the trampoline in a separate ASM file.

2. Windows 64 bits has a different calling convention than other OSes following the AMD64 ABI.
Differences that we have to handle here:
- Registers passed parameters are RCX, RDX, R8 and R9 instead of RDI, RSI, RDX, RCX, R8 and R9
- RDI and RSI must be preserved by callee
- Only return values <= 8 bytes can be returned by register (RDX can't be used to return a second word)
- There is no red-zone after RIP on the stack, but instead 4 reserved words before it

* Target.pri:
* jit/JITStubs.cpp:
* jit/JITStubs.h:
(JSC):
(JITStackFrame):
(JSC::JITStackFrame::returnAddressSlot):
* jit/JITStubsMSVC64.asm: Added.
* jit/JSInterfaceJIT.h:
(JSInterfaceJIT):
* jit/ThunkGenerators.cpp:
(JSC::nativeForGenerator):
* yarr/YarrJIT.cpp:
(YarrGenerator):
(JSC::Yarr::YarrGenerator::generateEnter):
(JSC::Yarr::YarrGenerator::generateReturn):

Source/WTF:

* wtf/Platform.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144043 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Target.pri
Source/JavaScriptCore/jit/JITStubs.cpp
Source/JavaScriptCore/jit/JITStubs.h
Source/JavaScriptCore/jit/JITStubsMSVC64.asm [new file with mode: 0644]
Source/JavaScriptCore/jit/JSInterfaceJIT.h
Source/JavaScriptCore/jit/ThunkGenerators.cpp
Source/JavaScriptCore/yarr/YarrJIT.cpp
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h