mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Add volatile XLOADs.
This commit is contained in:
parent
925050fe3f
commit
8407ac0eca
@ -234,7 +234,7 @@ local litname = {
|
|||||||
t[mode] = s
|
t[mode] = s
|
||||||
return s
|
return s
|
||||||
end}),
|
end}),
|
||||||
["XLOAD "] = { [0] = "", "R", "U", "RU", },
|
["XLOAD "] = { [0] = "", "R", "V", "RV", "U", "RU", "VU", "RVU", },
|
||||||
["CONV "] = setmetatable({}, { __index = function(t, mode)
|
["CONV "] = setmetatable({}, { __index = function(t, mode)
|
||||||
local s = irtype[band(mode, 31)]
|
local s = irtype[band(mode, 31)]
|
||||||
s = irtype[band(shr(mode, 5), 31)].."."..s
|
s = irtype[band(shr(mode, 5), 31)].."."..s
|
||||||
|
@ -206,7 +206,8 @@ IRFLDEF(FLENUM)
|
|||||||
|
|
||||||
/* XLOAD mode, stored in op2. */
|
/* XLOAD mode, stored in op2. */
|
||||||
#define IRXLOAD_READONLY 1 /* Load from read-only data. */
|
#define IRXLOAD_READONLY 1 /* Load from read-only data. */
|
||||||
#define IRXLOAD_UNALIGNED 2 /* Unaligned load. */
|
#define IRXLOAD_VOLATILE 2 /* Load from volatile data. */
|
||||||
|
#define IRXLOAD_UNALIGNED 4 /* Unaligned load. */
|
||||||
|
|
||||||
/* CONV mode, stored in op2. */
|
/* CONV mode, stored in op2. */
|
||||||
#define IRCONV_SRCMASK 0x001f /* Source IRType. */
|
#define IRCONV_SRCMASK 0x001f /* Source IRType. */
|
||||||
|
@ -669,6 +669,8 @@ TRef LJ_FASTCALL lj_opt_fwd_xload(jit_State *J)
|
|||||||
|
|
||||||
if ((fins->op2 & IRXLOAD_READONLY))
|
if ((fins->op2 & IRXLOAD_READONLY))
|
||||||
goto cselim;
|
goto cselim;
|
||||||
|
if ((fins->op2 & IRXLOAD_VOLATILE))
|
||||||
|
goto doemit;
|
||||||
|
|
||||||
/* Search for conflicting stores. */
|
/* Search for conflicting stores. */
|
||||||
ref = J->chain[IR_XSTORE];
|
ref = J->chain[IR_XSTORE];
|
||||||
@ -721,7 +723,8 @@ cselim:
|
|||||||
xr = IR(xref);
|
xr = IR(xref);
|
||||||
goto retry; /* Retry with the reassociated reference. */
|
goto retry; /* Retry with the reassociated reference. */
|
||||||
}
|
}
|
||||||
return lj_ir_emit(J);
|
doemit:
|
||||||
|
return EMITFOLD;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XSTORE elimination. */
|
/* XSTORE elimination. */
|
||||||
|
Loading…
Reference in New Issue
Block a user