From 1e93951b258cdf885779992434201c6114445665 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sun, 8 Oct 2023 21:20:10 +0200 Subject: [PATCH] ARM64: Fix register hint for FFI calls with FP results. Thanks to Peter Cawley. #1096 --- src/lj_asm_arm64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h index 82f14405..9f165fa8 100644 --- a/src/lj_asm_arm64.h +++ b/src/lj_asm_arm64.h @@ -1985,7 +1985,7 @@ static Reg asm_setup_call_slots(ASMState *as, IRIns *ir, const CCallInfo *ci) as->evenspill = nslots; } #endif - return REGSP_HINT(RID_RET); + return REGSP_HINT(irt_isfp(ir->t) ? RID_FPRET : RID_RET); } static void asm_setup_target(ASMState *as)