diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/dump.lua | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/dump.lua b/lib/dump.lua index 555b4b45..652761ff 100644 --- a/lib/dump.lua +++ b/lib/dump.lua | |||
| @@ -429,9 +429,15 @@ local function dump_ir(tr, dumpsnap, dumpreg) | |||
| 429 | band(ot, 128) == 0 and " " or ">", | 429 | band(ot, 128) == 0 and " " or ">", |
| 430 | band(ot, 64) == 0 and " " or "+", | 430 | band(ot, 64) == 0 and " " or "+", |
| 431 | irtype[t], op)) | 431 | irtype[t], op)) |
| 432 | local m1 = band(m, 3) | 432 | local m1, m2 = band(m, 3), band(m, 3*4) |
| 433 | if sub(op, 1, 4) == "CALL" then | 433 | if sub(op, 1, 4) == "CALL" then |
| 434 | out:write(format("%-10s (", vmdef.ircall[op2])) | 434 | if m2 == 1*4 then -- op2 == IRMlit |
| 435 | out:write(format("%-10s (", vmdef.ircall[op2])) | ||
| 436 | elseif op2 < 0 then | ||
| 437 | out:write(format("[0x%x](", tonumber((tracek(tr, op2))))) | ||
| 438 | else | ||
| 439 | out:write(format("%04d (", op2)) | ||
| 440 | end | ||
| 435 | if op1 ~= -1 then dumpcallargs(tr, op1) end | 441 | if op1 ~= -1 then dumpcallargs(tr, op1) end |
| 436 | out:write(")") | 442 | out:write(")") |
| 437 | elseif op == "CNEW " and op2 == -1 then | 443 | elseif op == "CNEW " and op2 == -1 then |
| @@ -442,7 +448,6 @@ local function dump_ir(tr, dumpsnap, dumpreg) | |||
| 442 | else | 448 | else |
| 443 | out:write(format(m1 == 0 and "%04d" or "#%-3d", op1)) | 449 | out:write(format(m1 == 0 and "%04d" or "#%-3d", op1)) |
| 444 | end | 450 | end |
| 445 | local m2 = band(m, 3*4) | ||
| 446 | if m2 ~= 3*4 then -- op2 != IRMnone | 451 | if m2 ~= 3*4 then -- op2 != IRMnone |
| 447 | if m2 == 1*4 then -- op2 == IRMlit | 452 | if m2 == 1*4 then -- op2 == IRMlit |
| 448 | local litn = litname[op] | 453 | local litn = litname[op] |
