summaryrefslogtreecommitdiff
path: root/src/lib_jit.c
diff options
context:
space:
mode:
authorMike Pall <mike>2012-06-09 20:53:22 +0200
committerMike Pall <mike>2012-06-09 20:53:22 +0200
commit9f443e8b8919e094100bf1eb94981aec905be783 (patch)
tree1137bf976577f3634ed82486fd3998f86644626d /src/lib_jit.c
parent9d7bd04faed5feed273d9b9a11962f01e3cc7edf (diff)
downloadluajit-9f443e8b8919e094100bf1eb94981aec905be783.tar.gz
luajit-9f443e8b8919e094100bf1eb94981aec905be783.tar.bz2
luajit-9f443e8b8919e094100bf1eb94981aec905be783.zip
ARM/PPC: Detect more target arch variants. Detect console OS.
Diffstat (limited to 'src/lib_jit.c')
-rw-r--r--src/lib_jit.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/lib_jit.c b/src/lib_jit.c
index 7d5e0aef..db6bcfa8 100644
--- a/src/lib_jit.c
+++ b/src/lib_jit.c
@@ -591,11 +591,11 @@ static uint32_t jit_cpudetect(lua_State *L)
591#elif LJ_TARGET_ARM 591#elif LJ_TARGET_ARM
592#if LJ_HASJIT 592#if LJ_HASJIT
593 /* Compile-time ARM CPU detection. */ 593 /* Compile-time ARM CPU detection. */
594#if __ARM_ARCH_7__ || __ARM_ARCH_7A__ || __ARM_ARCH_7R__ 594#if LJ_ARCH_VERSION >= 70
595 flags |= JIT_F_ARMV6|JIT_F_ARMV6T2|JIT_F_ARMV7; 595 flags |= JIT_F_ARMV6|JIT_F_ARMV6T2|JIT_F_ARMV7;
596#elif __ARM_ARCH_6T2__ 596#elif LJ_ARCH_VERSION >= 61
597 flags |= JIT_F_ARMV6|JIT_F_ARMV6T2; 597 flags |= JIT_F_ARMV6|JIT_F_ARMV6T2;
598#elif __ARM_ARCH_6__ || __ARM_ARCH_6J__ || __ARM_ARCH_6Z__ || __ARM_ARCH_6ZK__ 598#elif LJ_ARCH_VERSION >= 60
599 flags |= JIT_F_ARMV6; 599 flags |= JIT_F_ARMV6;
600#endif 600#endif
601 /* Runtime ARM CPU detection. */ 601 /* Runtime ARM CPU detection. */
@@ -612,12 +612,28 @@ static uint32_t jit_cpudetect(lua_State *L)
612 } 612 }
613#endif 613#endif
614#endif 614#endif
615#elif LJ_TARGET_PPC || LJ_TARGET_PPCSPE 615#elif LJ_TARGET_PPC
616#if LJ_ARCH_PPC64
617 flags |= JIT_F_PPC64;
618#endif
619#if LJ_ARCH_SQRT
620 flags |= JIT_F_SQRT;
621#endif
622#if LJ_ARCH_ROUND
623 flags |= JIT_F_ROUND;
624#endif
625#if LJ_ARCH_CELL
626 flags |= JIT_F_CELL;
627#endif
628#if LJ_ARCH_XENON
629 flags |= JIT_F_XENON;
630#endif
631#elif LJ_TARGET_PPCSPE
616 /* Nothing to do. */ 632 /* Nothing to do. */
617#elif LJ_TARGET_MIPS 633#elif LJ_TARGET_MIPS
618#if LJ_HASJIT 634#if LJ_HASJIT
619 /* Compile-time MIPS CPU detection. */ 635 /* Compile-time MIPS CPU detection. */
620#if _MIPS_ARCH_MIPS32R2 636#if LJ_ARCH_VERSION >= 20
621 flags |= JIT_F_MIPS32R2; 637 flags |= JIT_F_MIPS32R2;
622#endif 638#endif
623 /* Runtime MIPS CPU detection. */ 639 /* Runtime MIPS CPU detection. */