From: Mike Pall Date: Mon, 19 Aug 2024 14:17:44 +0000 (+0200) Subject: MIPS32: Fix little-endian IR_RETF. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcc6cbb188e5e2e76d4aef2d48778202f65079dc;p=thirdparty%2FLuaJIT.git MIPS32: Fix little-endian IR_RETF. Thanks to Peter Cawley. #1250 --- diff --git a/src/lj_asm_mips.h b/src/lj_asm_mips.h index 3c99a843..3adb62f4 100644 --- a/src/lj_asm_mips.h +++ b/src/lj_asm_mips.h @@ -398,7 +398,7 @@ static void asm_retf(ASMState *as, IRIns *ir) emit_addptr(as, base, -8*delta); asm_guard(as, MIPSI_BNE, RID_TMP, ra_allock(as, i32ptr(pc), rset_exclude(RSET_GPR, base))); - emit_tsi(as, MIPSI_LW, RID_TMP, base, -8); + emit_tsi(as, MIPSI_LW, RID_TMP, base, LJ_BE ? -8 : -4); } /* -- Type conversions ---------------------------------------------------- */