diff options
author | Mike Pall <mike> | 2010-02-28 21:45:38 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2010-02-28 21:51:01 +0100 |
commit | 2e22d33d9d256e9a1551229f1b51e2a6f02da2f6 (patch) | |
tree | 55c51dd77b08afd7044a046cb3b037106285000c /src | |
parent | 956065fd047de66aab31cd4336f3e663e87db3e3 (diff) | |
download | luajit-2e22d33d9d256e9a1551229f1b51e2a6f02da2f6.tar.gz luajit-2e22d33d9d256e9a1551229f1b51e2a6f02da2f6.tar.bz2 luajit-2e22d33d9d256e9a1551229f1b51e2a6f02da2f6.zip |
Enable JIT compiler for x64.
Only works on Linux/x64 and Windows/x64 right now.
Force an x64 build on Linux/x64 with: make CC="gcc -m64"
NYI: handle on-trace OOM errors.
NYI: improve register allocation for x64.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 16 | ||||
-rw-r--r-- | src/lj_arch.h | 1 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/Makefile b/src/Makefile index 5fef367a..261e2049 100644 --- a/src/Makefile +++ b/src/Makefile | |||
@@ -20,9 +20,6 @@ NODOTABIVER= 51 | |||
20 | # Turn any of the optional settings on by removing the '#' in front of them. | 20 | # Turn any of the optional settings on by removing the '#' in front of them. |
21 | # You need to 'make clean' and 'make' again, if you change any options. | 21 | # You need to 'make clean' and 'make' again, if you change any options. |
22 | # | 22 | # |
23 | # Note: LuaJIT can only be compiled for x86, and not for x64 (yet)! | ||
24 | # In the meantime, the x86 binary runs fine under a x64 OS. | ||
25 | # | ||
26 | # It's recommended to compile at least for i686. By default the assembler part | 23 | # It's recommended to compile at least for i686. By default the assembler part |
27 | # of the interpreter makes use of CMOV/FCOMI*/FUCOMI* instructions, anyway. | 24 | # of the interpreter makes use of CMOV/FCOMI*/FUCOMI* instructions, anyway. |
28 | CC= gcc -m32 -march=i686 | 25 | CC= gcc -m32 -march=i686 |
@@ -30,10 +27,14 @@ CC= gcc -m32 -march=i686 | |||
30 | # binaries to a different machine: | 27 | # binaries to a different machine: |
31 | #CC= gcc -m32 -march=native | 28 | #CC= gcc -m32 -march=native |
32 | # | 29 | # |
30 | # Currently LuaJIT builds by default as a 32 bit binary. Use this to force | ||
31 | # a native x64 build on Linux/x64: | ||
32 | #CC= gcc -m64 | ||
33 | # | ||
33 | # Since the assembler part does NOT maintain a frame pointer, it's pointless | 34 | # Since the assembler part does NOT maintain a frame pointer, it's pointless |
34 | # to slow down the C part by not omitting it. Debugging and tracebacks are | 35 | # to slow down the C part by not omitting it. Debugging, tracebacks and |
35 | # not affected -- the assembler part has frame unwind information and GCC | 36 | # unwinding are not affected -- the assembler part has frame unwind |
36 | # emits it with -g (see CCDEBUG below). | 37 | # information and GCC emits it where needed (x64) or with -g (see CCDEBUG). |
37 | CCOPT= -O2 -fomit-frame-pointer | 38 | CCOPT= -O2 -fomit-frame-pointer |
38 | # Use this if you want to generate a smaller binary (but it's slower): | 39 | # Use this if you want to generate a smaller binary (but it's slower): |
39 | #CCOPT= -Os -fomit-frame-pointer | 40 | #CCOPT= -Os -fomit-frame-pointer |
@@ -75,7 +76,8 @@ XCFLAGS= | |||
75 | # | 76 | # |
76 | # Use the system provided memory allocator (realloc) instead of the | 77 | # Use the system provided memory allocator (realloc) instead of the |
77 | # bundled memory allocator. This is slower, but sometimes helpful for | 78 | # bundled memory allocator. This is slower, but sometimes helpful for |
78 | # debugging. It's mandatory for Valgrind's memcheck tool, too. | 79 | # debugging. It's helpful for Valgrind's memcheck tool, too. This option |
80 | # cannot be enabled on x64, since the built-in allocator is mandatory. | ||
79 | #XCFLAGS+= -DLUAJIT_USE_SYSMALLOC | 81 | #XCFLAGS+= -DLUAJIT_USE_SYSMALLOC |
80 | # | 82 | # |
81 | # This define is required to run LuaJIT under Valgrind. The Valgrind | 83 | # This define is required to run LuaJIT under Valgrind. The Valgrind |
diff --git a/src/lj_arch.h b/src/lj_arch.h index 111ea8c1..86a2d5ed 100644 --- a/src/lj_arch.h +++ b/src/lj_arch.h | |||
@@ -48,7 +48,6 @@ | |||
48 | #define LJ_TARGET_X64 1 | 48 | #define LJ_TARGET_X64 1 |
49 | #define LJ_TARGET_X86ORX64 1 | 49 | #define LJ_TARGET_X86ORX64 1 |
50 | #define LJ_PAGESIZE 4096 | 50 | #define LJ_PAGESIZE 4096 |
51 | #define LJ_ARCH_NOJIT 1 /* NYI */ | ||
52 | #else | 51 | #else |
53 | #error "No target architecture defined" | 52 | #error "No target architecture defined" |
54 | #endif | 53 | #endif |