]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
ARM: Fix soft-float math.min()/math.max().
authorMike Pall <mike>
Thu, 10 Apr 2025 20:45:38 +0000 (22:45 +0200)
committerMike Pall <mike>
Thu, 10 Apr 2025 20:45:38 +0000 (22:45 +0200)
Reported by Dong Jianqiang. #1356

src/lj_asm_arm.h
src/vm_arm.dasc

index de435057e197e9e9a46148cea8182e57bd8afdef..24deaeae27bb9be6496d1122493e240f60c62198 100644 (file)
@@ -1927,7 +1927,7 @@ static void asm_hiop(ASMState *as, IRIns *ir)
   } else if ((ir-1)->o == IR_MIN || (ir-1)->o == IR_MAX) {
     as->curins--;  /* Always skip the loword min/max. */
     if (uselo || usehi)
-      asm_sfpmin_max(as, ir-1, (ir-1)->o == IR_MIN ? CC_PL : CC_LE);
+      asm_sfpmin_max(as, ir-1, (ir-1)->o == IR_MIN ? CC_HS : CC_LS);
     return;
 #elif LJ_HASFFI
   } else if ((ir-1)->o == IR_CONV) {
index ca08fc117e98490c3c7fcd834544e1aa230b7692..86bef0cfbcea0b9a27feea92c37c807156cc0472 100644 (file)
@@ -1717,8 +1717,8 @@ static void build_subroutines(BuildCtx *ctx)
   |.endif
   |.endmacro
   |
-  |  math_minmax math_min, gt, pl
-  |  math_minmax math_max, lt, le
+  |  math_minmax math_min, gt, hs
+  |  math_minmax math_max, lt, ls
   |
   |//-- String library -----------------------------------------------------
   |