diff options
author | Mike Pall <mike> | 2023-09-09 18:18:48 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2023-09-09 18:18:48 +0200 |
commit | f442432ecb09d9326b769f1f1d4a43689f27a9e1 (patch) | |
tree | e243e341662b1f4ab4cde9c525d755578d605988 /src | |
parent | b8c6ccd50c61b7a2df5123ddc5a85ac7d089542b (diff) | |
parent | 44da356e97a159f5962f32a526525d14bcd13179 (diff) | |
download | luajit-f442432ecb09d9326b769f1f1d4a43689f27a9e1.tar.gz luajit-f442432ecb09d9326b769f1f1d4a43689f27a9e1.tar.bz2 luajit-f442432ecb09d9326b769f1f1d4a43689f27a9e1.zip |
Merge branch 'master' into v2.1
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_asm_arm.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lj_asm_arm.h b/src/lj_asm_arm.h index b3b1f096..a003d5ca 100644 --- a/src/lj_asm_arm.h +++ b/src/lj_asm_arm.h | |||
@@ -1990,6 +1990,7 @@ static void asm_prof(ASMState *as, IRIns *ir) | |||
1990 | static void asm_stack_check(ASMState *as, BCReg topslot, | 1990 | static void asm_stack_check(ASMState *as, BCReg topslot, |
1991 | IRIns *irp, RegSet allow, ExitNo exitno) | 1991 | IRIns *irp, RegSet allow, ExitNo exitno) |
1992 | { | 1992 | { |
1993 | int savereg = 0; | ||
1993 | Reg pbase; | 1994 | Reg pbase; |
1994 | uint32_t k; | 1995 | uint32_t k; |
1995 | if (irp) { | 1996 | if (irp) { |
@@ -2000,12 +2001,14 @@ static void asm_stack_check(ASMState *as, BCReg topslot, | |||
2000 | pbase = rset_pickbot(allow); | 2001 | pbase = rset_pickbot(allow); |
2001 | } else { | 2002 | } else { |
2002 | pbase = RID_RET; | 2003 | pbase = RID_RET; |
2003 | emit_lso(as, ARMI_LDR, RID_RET, RID_SP, 0); /* Restore temp. register. */ | 2004 | savereg = 1; |
2004 | } | 2005 | } |
2005 | } else { | 2006 | } else { |
2006 | pbase = RID_BASE; | 2007 | pbase = RID_BASE; |
2007 | } | 2008 | } |
2008 | emit_branch(as, ARMF_CC(ARMI_BL, CC_LS), exitstub_addr(as->J, exitno)); | 2009 | emit_branch(as, ARMF_CC(ARMI_BL, CC_LS), exitstub_addr(as->J, exitno)); |
2010 | if (savereg) | ||
2011 | emit_lso(as, ARMI_LDR, RID_RET, RID_SP, 0); /* Restore temp. register. */ | ||
2009 | k = emit_isk12(0, (int32_t)(8*topslot)); | 2012 | k = emit_isk12(0, (int32_t)(8*topslot)); |
2010 | lj_assertA(k, "slot offset %d does not fit in K12", 8*topslot); | 2013 | lj_assertA(k, "slot offset %d does not fit in K12", 8*topslot); |
2011 | emit_n(as, ARMI_CMP^k, RID_TMP); | 2014 | emit_n(as, ARMI_CMP^k, RID_TMP); |
@@ -2017,7 +2020,7 @@ static void asm_stack_check(ASMState *as, BCReg topslot, | |||
2017 | if (ra_hasspill(irp->s)) | 2020 | if (ra_hasspill(irp->s)) |
2018 | emit_lso(as, ARMI_LDR, pbase, RID_SP, sps_scale(irp->s)); | 2021 | emit_lso(as, ARMI_LDR, pbase, RID_SP, sps_scale(irp->s)); |
2019 | emit_lso(as, ARMI_LDR, RID_TMP, RID_TMP, (i & 4095)); | 2022 | emit_lso(as, ARMI_LDR, RID_TMP, RID_TMP, (i & 4095)); |
2020 | if (ra_hasspill(irp->s) && !allow) | 2023 | if (savereg) |
2021 | emit_lso(as, ARMI_STR, RID_RET, RID_SP, 0); /* Save temp. register. */ | 2024 | emit_lso(as, ARMI_STR, RID_RET, RID_SP, 0); /* Save temp. register. */ |
2022 | emit_loadi(as, RID_TMP, (i & ~4095)); | 2025 | emit_loadi(as, RID_TMP, (i & ~4095)); |
2023 | } else { | 2026 | } else { |