mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 15:14:08 +00:00
Add volatile XLOADs.
This commit is contained in:
parent
925050fe3f
commit
8407ac0eca
@ -234,7 +234,7 @@ local litname = {
|
||||
t[mode] = s
|
||||
return s
|
||||
end}),
|
||||
["XLOAD "] = { [0] = "", "R", "U", "RU", },
|
||||
["XLOAD "] = { [0] = "", "R", "V", "RV", "U", "RU", "VU", "RVU", },
|
||||
["CONV "] = setmetatable({}, { __index = function(t, mode)
|
||||
local s = irtype[band(mode, 31)]
|
||||
s = irtype[band(shr(mode, 5), 31)].."."..s
|
||||
|
@ -206,7 +206,8 @@ IRFLDEF(FLENUM)
|
||||
|
||||
/* XLOAD mode, stored in op2. */
|
||||
#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. */
|
||||
#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))
|
||||
goto cselim;
|
||||
if ((fins->op2 & IRXLOAD_VOLATILE))
|
||||
goto doemit;
|
||||
|
||||
/* Search for conflicting stores. */
|
||||
ref = J->chain[IR_XSTORE];
|
||||
@ -721,7 +723,8 @@ cselim:
|
||||
xr = IR(xref);
|
||||
goto retry; /* Retry with the reassociated reference. */
|
||||
}
|
||||
return lj_ir_emit(J);
|
||||
doemit:
|
||||
return EMITFOLD;
|
||||
}
|
||||
|
||||
/* XSTORE elimination. */
|
||||
|
Loading…
Reference in New Issue
Block a user