aboutsummaryrefslogtreecommitdiff
path: root/src/lib_jit.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-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