From f58a84d0bc9852c82e10db268dd549c9a5b33014 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sun, 19 Aug 2012 18:39:47 +0200 Subject: [PATCH] ARM: Fix calls to hard-float floor/ceil/trunc. --- src/lj_asm_arm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lj_asm_arm.h b/src/lj_asm_arm.h index c380a6e8..8574a2b3 100644 --- a/src/lj_asm_arm.h +++ b/src/lj_asm_arm.h @@ -1560,8 +1560,9 @@ static void asm_callid(ASMState *as, IRIns *ir, IRCallID id) static void asm_callround(ASMState *as, IRIns *ir, int id) { /* The modified regs must match with the *.dasc implementation. */ - RegSet drop = RID2RSET(RID_D1)|RID2RSET(RID_D2)| + RegSet drop = RID2RSET(RID_D0)|RID2RSET(RID_D1)|RID2RSET(RID_D2)| RID2RSET(RID_R0)|RID2RSET(RID_R1); + if (ra_hasreg(ir->r)) rset_clear(drop, ir->r); ra_evictset(as, drop); ra_destreg(as, ir, RID_FPRET); emit_call(as, id == IRFPM_FLOOR ? (void *)lj_vm_floor_hf :