aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2023-09-09 23:20:57 +0200
committerMike Pall <mike>2023-09-09 23:20:57 +0200
commit566532b8071c82125a65ad1bea0d5784991fa7a2 (patch)
tree208e1a2ba19eebfe13ca73c24d5a10651b7dbf4c /src
parent4611e25c0fbe911486cccae4556eb086c0254c5f (diff)
parent4fe200229289c43868442ba344a71f4ff847bfe1 (diff)
downloadluajit-566532b8071c82125a65ad1bea0d5784991fa7a2.tar.gz
luajit-566532b8071c82125a65ad1bea0d5784991fa7a2.tar.bz2
luajit-566532b8071c82125a65ad1bea0d5784991fa7a2.zip
Merge branch 'master' into v2.1
Diffstat (limited to 'src')
-rw-r--r--src/Makefile2
-rw-r--r--src/lj_arch.h16
2 files changed, 14 insertions, 4 deletions
diff --git a/src/Makefile b/src/Makefile
index 79340a96..224d21e7 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -233,7 +233,7 @@ TARGET_ALDFLAGS= $(LDOPTIONS) $(TARGET_XLDFLAGS) $(TARGET_FLAGS) $(TARGET_LDFLAG
233TARGET_ASHLDFLAGS= $(LDOPTIONS) $(TARGET_XSHLDFLAGS) $(TARGET_FLAGS) $(TARGET_SHLDFLAGS) 233TARGET_ASHLDFLAGS= $(LDOPTIONS) $(TARGET_XSHLDFLAGS) $(TARGET_FLAGS) $(TARGET_SHLDFLAGS)
234TARGET_ALIBS= $(TARGET_XLIBS) $(LIBS) $(TARGET_LIBS) 234TARGET_ALIBS= $(TARGET_XLIBS) $(LIBS) $(TARGET_LIBS)
235 235
236TARGET_TESTARCH=$(shell $(TARGET_CC) $(TARGET_TCFLAGS) -E lj_arch.h -dM) 236TARGET_TESTARCH:=$(shell $(TARGET_CC) $(TARGET_TCFLAGS) -E lj_arch.h -dM)
237ifneq (,$(findstring LJ_TARGET_X64 ,$(TARGET_TESTARCH))) 237ifneq (,$(findstring LJ_TARGET_X64 ,$(TARGET_TESTARCH)))
238 TARGET_LJARCH= x64 238 TARGET_LJARCH= x64
239else 239else
diff --git a/src/lj_arch.h b/src/lj_arch.h
index 6e22b1b2..3e920f2a 100644
--- a/src/lj_arch.h
+++ b/src/lj_arch.h
@@ -66,7 +66,7 @@
66#elif defined(__mips__) || defined(__mips) || defined(__MIPS__) || defined(__MIPS) 66#elif defined(__mips__) || defined(__mips) || defined(__MIPS__) || defined(__MIPS)
67#define LUAJIT_TARGET LUAJIT_ARCH_MIPS32 67#define LUAJIT_TARGET LUAJIT_ARCH_MIPS32
68#else 68#else
69#error "No support for this architecture (yet)" 69#error "Architecture not supported (in this version), see: https://luajit.org/status.html#architectures"
70#endif 70#endif
71 71
72#endif 72#endif
@@ -237,7 +237,7 @@
237#define LJ_TARGET_UNIFYROT 2 /* Want only IR_BROR. */ 237#define LJ_TARGET_UNIFYROT 2 /* Want only IR_BROR. */
238#define LJ_ARCH_NUMMODE LJ_NUMMODE_DUAL 238#define LJ_ARCH_NUMMODE LJ_NUMMODE_DUAL
239 239
240#if __ARM_ARCH == 8 || __ARM_ARCH_8__ || __ARM_ARCH_8A__ 240#if __ARM_ARCH >= 8 || __ARM_ARCH_8__ || __ARM_ARCH_8A__
241#define LJ_ARCH_VERSION 80 241#define LJ_ARCH_VERSION 80
242#elif __ARM_ARCH == 7 || __ARM_ARCH_7__ || __ARM_ARCH_7A__ || __ARM_ARCH_7R__ || __ARM_ARCH_7S__ || __ARM_ARCH_7VE__ 242#elif __ARM_ARCH == 7 || __ARM_ARCH_7__ || __ARM_ARCH_7A__ || __ARM_ARCH_7R__ || __ARM_ARCH_7S__ || __ARM_ARCH_7VE__
243#define LJ_ARCH_VERSION 70 243#define LJ_ARCH_VERSION 70
@@ -331,6 +331,7 @@
331#define LJ_ARCH_NOFFI 1 331#define LJ_ARCH_NOFFI 1
332#elif LJ_ARCH_BITS == 64 332#elif LJ_ARCH_BITS == 64
333#error "No support for PPC64" 333#error "No support for PPC64"
334#undef LJ_TARGET_PPC
334#endif 335#endif
335 336
336#if _ARCH_PWR7 337#if _ARCH_PWR7
@@ -490,36 +491,45 @@
490#elif LJ_TARGET_ARM 491#elif LJ_TARGET_ARM
491#if defined(__ARMEB__) 492#if defined(__ARMEB__)
492#error "No support for big-endian ARM" 493#error "No support for big-endian ARM"
494#undef LJ_TARGET_ARM
493#endif 495#endif
494#if __ARM_ARCH_6M__ || __ARM_ARCH_7M__ || __ARM_ARCH_7EM__ 496#if __ARM_ARCH_6M__ || __ARM_ARCH_7M__ || __ARM_ARCH_7EM__
495#error "No support for Cortex-M CPUs" 497#error "No support for Cortex-M CPUs"
498#undef LJ_TARGET_ARM
496#endif 499#endif
497#if !(__ARM_EABI__ || LJ_TARGET_IOS) 500#if !(__ARM_EABI__ || LJ_TARGET_IOS)
498#error "Only ARM EABI or iOS 3.0+ ABI is supported" 501#error "Only ARM EABI or iOS 3.0+ ABI is supported"
502#undef LJ_TARGET_ARM
499#endif 503#endif
500#elif LJ_TARGET_ARM64 504#elif LJ_TARGET_ARM64
501#if defined(_ILP32) 505#if defined(_ILP32)
502#error "No support for ILP32 model on ARM64" 506#error "No support for ILP32 model on ARM64"
507#undef LJ_TARGET_ARM64
503#endif 508#endif
504#elif LJ_TARGET_PPC 509#elif LJ_TARGET_PPC
505#if defined(_LITTLE_ENDIAN) && (!defined(_BYTE_ORDER) || (_BYTE_ORDER == _LITTLE_ENDIAN)) 510#if defined(_LITTLE_ENDIAN) && (!defined(_BYTE_ORDER) || (_BYTE_ORDER == _LITTLE_ENDIAN))
506#error "No support for little-endian PPC32" 511#error "No support for little-endian PPC32"
512#undef LJ_TARGET_PPC
507#endif 513#endif
508#if defined(__NO_FPRS__) && !defined(_SOFT_FLOAT) 514#if defined(__NO_FPRS__) && !defined(_SOFT_FLOAT)
509#error "No support for PPC/e500 anymore (use LuaJIT 2.0)" 515#error "No support for PPC/e500, use LuaJIT 2.0"
516#undef LJ_TARGET_PPC
510#endif 517#endif
511#elif LJ_TARGET_MIPS32 518#elif LJ_TARGET_MIPS32
512#if !((defined(_MIPS_SIM_ABI32) && _MIPS_SIM == _MIPS_SIM_ABI32) || (defined(_ABIO32) && _MIPS_SIM == _ABIO32)) 519#if !((defined(_MIPS_SIM_ABI32) && _MIPS_SIM == _MIPS_SIM_ABI32) || (defined(_ABIO32) && _MIPS_SIM == _ABIO32))
513#error "Only o32 ABI supported for MIPS32" 520#error "Only o32 ABI supported for MIPS32"
521#undef LJ_TARGET_MIPS
514#endif 522#endif
515#if LJ_TARGET_MIPSR6 523#if LJ_TARGET_MIPSR6
516/* Not that useful, since most available r6 CPUs are 64 bit. */ 524/* Not that useful, since most available r6 CPUs are 64 bit. */
517#error "No support for MIPS32R6" 525#error "No support for MIPS32R6"
526#undef LJ_TARGET_MIPS
518#endif 527#endif
519#elif LJ_TARGET_MIPS64 528#elif LJ_TARGET_MIPS64
520#if !((defined(_MIPS_SIM_ABI64) && _MIPS_SIM == _MIPS_SIM_ABI64) || (defined(_ABI64) && _MIPS_SIM == _ABI64)) 529#if !((defined(_MIPS_SIM_ABI64) && _MIPS_SIM == _MIPS_SIM_ABI64) || (defined(_ABI64) && _MIPS_SIM == _ABI64))
521/* MIPS32ON64 aka n32 ABI support might be desirable, but difficult. */ 530/* MIPS32ON64 aka n32 ABI support might be desirable, but difficult. */
522#error "Only n64 ABI supported for MIPS64" 531#error "Only n64 ABI supported for MIPS64"
532#undef LJ_TARGET_MIPS
523#endif 533#endif
524#endif 534#endif
525#endif 535#endif