Refactoring of conversion ops, part 1: add IR_CONV.
This commit is contained in:
@@ -236,6 +236,15 @@ local litname = {
|
||||
return s
|
||||
end}),
|
||||
["XLOAD "] = { [0] = "", "R", "U", "RU", },
|
||||
["CONV "] = setmetatable({}, { __index = function(t, mode)
|
||||
local s = irtype[band(mode, 31)]
|
||||
if band(mode, 0x100) ~= 0 then s = s.." trunc"
|
||||
elseif band(mode, 0x200) ~= 0 then s = s.." sext" end
|
||||
local c = shr(mode, 10)
|
||||
if c == 2 then s = s.." index" elseif c == 3 then s = s.." check" end
|
||||
t[mode] = s
|
||||
return s
|
||||
end}),
|
||||
["TOINT "] = tointname,
|
||||
["TOI64 "] = tointname,
|
||||
["FLOAD "] = vmdef.irfield,
|
||||
|
||||
Reference in New Issue
Block a user