mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 15:34:09 +00:00
Fix store opcodes with dynamic destructive out register not being correctly allocated an input register
This commit is contained in:
parent
748091cfd9
commit
4eaf7f6efe
@ -2743,7 +2743,7 @@ static void wrap_intrins(jit_State *J, CIntrinsic *intrins, IntrinWrapState *sta
|
||||
|
||||
/* Allocate the dynamic output register */
|
||||
if (intrins->outsz > 0 && intrin_dynrout(intrins)) {
|
||||
if (dynreg == DYNREG_INOUT) {
|
||||
if (dynreg == DYNREG_INOUT || dynreg == DYNREG_TWOSTORE) {
|
||||
rout = reg_rid(in[1]);
|
||||
out[0] = reg_setrid(out[0], rout);
|
||||
} else if (dynreg == DYNREG_OPEXT) {
|
||||
|
@ -868,7 +868,7 @@ static void asm_intrin_opcode(ASMState *as, IRIns *ir, IntrinsInfo *ininfo)
|
||||
lua_assert(ra_hasreg(right) && (ra_hasreg(dest) || intrins->dyninsz < 2));
|
||||
emit_intrins(as, intrins, right, dest, vvvv);
|
||||
|
||||
if (dynreg == DYNREG_INOUT) {
|
||||
if (dynreg == DYNREG_INOUT || (dynreg == DYNREG_TWOSTORE && dynrout)) {
|
||||
lua_assert(lref);
|
||||
ra_left(as, dest, lref);
|
||||
/* no need to load the register since ra_left already did */
|
||||
|
@ -28,7 +28,7 @@ typedef enum REGMODE {
|
||||
DYNREG_ONE,
|
||||
/* 1(R) register in, 1 out(M) which can be a memory address to store the value */
|
||||
DYNREG_ONESTORE,
|
||||
/* 2 in 0 out first must always be treated as indirect */
|
||||
/* 2 in with R optionally being destructive out. first must always be treated as indirect */
|
||||
DYNREG_TWOSTORE,
|
||||
/* one input(M) register and the second is part of part of the opcode */
|
||||
DYNREG_OPEXT,
|
||||
|
Loading…
Reference in New Issue
Block a user