Copy destination type for CONV from ir->t to op2, too.

This commit is contained in:
Mike Pall
2010-12-31 01:00:54 +01:00
parent dc4b82c33d
commit 65b194a2f8
8 changed files with 49 additions and 29 deletions

View File

@@ -238,9 +238,10 @@ local litname = {
["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)
s = irtype[band(shr(mode, 5), 31)].."."..s
if band(mode, 0x400) ~= 0 then s = s.." trunc"
elseif band(mode, 0x800) ~= 0 then s = s.." sext" end
local c = shr(mode, 14)
if c == 2 then s = s.." index" elseif c == 3 then s = s.." check" end
t[mode] = s
return s