Browse Source

x64: Fix DynASM defines.

Mike Pall 13 years ago
parent
commit
0528bb7d02
2 changed files with 6 additions and 3 deletions
  1. 3 1
      src/Makefile
  2. 3 2
      src/vm_x86.dasc

+ 3 - 1
src/Makefile

@@ -362,6 +362,9 @@ DASM_XFLAGS=
 DASM_AFLAGS=
 DASM_ARCH= $(TARGET_LJARCH)
 
+ifneq (,$(findstring LJ_ARCH_BITS 64,$(TARGET_TESTARCH)))
+  DASM_AFLAGS+= -D P64
+endif
 ifneq (,$(findstring LJ_HASJIT 1,$(TARGET_TESTARCH)))
   DASM_AFLAGS+= -D JIT
 endif
@@ -387,7 +390,6 @@ ifeq (x86,$(TARGET_LJARCH))
   endif
 else
 ifeq (x64,$(TARGET_LJARCH))
-  DASM_AFLAGS+= -D X64
   DASM_ARCH= x86
 else
 ifeq (arm,$(TARGET_LJARCH))

+ 3 - 2
src/vm_x86.dasc

@@ -2,7 +2,7 @@
 |// Bytecode interpreter, fast functions and helper functions.
 |// Copyright (C) 2005-2012 Mike Pall. See Copyright Notice in luajit.h
 |
-|.if X64
+|.if P64
 |.arch x64
 |.else
 |.arch x86
@@ -16,7 +16,8 @@
 |
 |//-----------------------------------------------------------------------
 |
-|.if X64
+|.if P64
+|.define X64, 1
 |.define SSE, 1
 |.if WIN
 |.define X64WIN, 1