aboutsummaryrefslogtreecommitdiff
path: root/src/lib_jit.c
diff options
context:
space:
mode:
authorMike Pall <mike>2016-05-28 05:10:55 +0200
committerMike Pall <mike>2016-05-28 05:10:55 +0200
commitd9986fbadb6c50b826e39e5f690bcf0b4cd6a20b (patch)
treec89961a1a8949c19872aa39269c2408dd6595733 /src/lib_jit.c
parente3c4c9af0f07a114fb754fed6ac358a102f49e2f (diff)
downloadluajit-d9986fbadb6c50b826e39e5f690bcf0b4cd6a20b.tar.gz
luajit-d9986fbadb6c50b826e39e5f690bcf0b4cd6a20b.tar.bz2
luajit-d9986fbadb6c50b826e39e5f690bcf0b4cd6a20b.zip
MIPS64, part 1: Add MIPS64 support to interpreter.
Contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com. Sponsored by Cisco Systems, Inc.
Diffstat (limited to 'src/lib_jit.c')
-rw-r--r--src/lib_jit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib_jit.c b/src/lib_jit.c
index c6330c49..1655f0c5 100644
--- a/src/lib_jit.c
+++ b/src/lib_jit.c
@@ -715,15 +715,15 @@ static uint32_t jit_cpudetect(lua_State *L)
715#if LJ_HASJIT 715#if LJ_HASJIT
716 /* Compile-time MIPS CPU detection. */ 716 /* Compile-time MIPS CPU detection. */
717#if LJ_ARCH_VERSION >= 20 717#if LJ_ARCH_VERSION >= 20
718 flags |= JIT_F_MIPS32R2; 718 flags |= JIT_F_MIPSXXR2;
719#endif 719#endif
720 /* Runtime MIPS CPU detection. */ 720 /* Runtime MIPS CPU detection. */
721#if defined(__GNUC__) 721#if defined(__GNUC__)
722 if (!(flags & JIT_F_MIPS32R2)) { 722 if (!(flags & JIT_F_MIPSXXR2)) {
723 int x; 723 int x;
724 /* On MIPS32R1 rotr is treated as srl. rotr r2,r2,1 -> srl r2,r2,1. */ 724 /* On MIPS32R1 rotr is treated as srl. rotr r2,r2,1 -> srl r2,r2,1. */
725 __asm__("li $2, 1\n\t.long 0x00221042\n\tmove %0, $2" : "=r"(x) : : "$2"); 725 __asm__("li $2, 1\n\t.long 0x00221042\n\tmove %0, $2" : "=r"(x) : : "$2");
726 if (x) flags |= JIT_F_MIPS32R2; /* Either 0x80000000 (R2) or 0 (R1). */ 726 if (x) flags |= JIT_F_MIPSXXR2; /* Either 0x80000000 (R2) or 0 (R1). */
727 } 727 }
728#endif 728#endif
729#endif 729#endif