diff options
Diffstat (limited to 'src/jit/dis_x86.lua')
-rw-r--r-- | src/jit/dis_x86.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/jit/dis_x86.lua b/src/jit/dis_x86.lua index c442a176..49101efe 100644 --- a/src/jit/dis_x86.lua +++ b/src/jit/dis_x86.lua | |||
@@ -28,6 +28,8 @@ local type = type | |||
28 | local sub, byte, format = string.sub, string.byte, string.format | 28 | local sub, byte, format = string.sub, string.byte, string.format |
29 | local match, gmatch, gsub = string.match, string.gmatch, string.gsub | 29 | local match, gmatch, gsub = string.match, string.gmatch, string.gsub |
30 | local lower, rep = string.lower, string.rep | 30 | local lower, rep = string.lower, string.rep |
31 | local bit = require("bit") | ||
32 | local tohex = bit.tohex | ||
31 | 33 | ||
32 | -- Map for 1st opcode byte in 32 bit mode. Ugly? Well ... read on. | 34 | -- Map for 1st opcode byte in 32 bit mode. Ugly? Well ... read on. |
33 | local map_opc1_32 = { | 35 | local map_opc1_32 = { |
@@ -532,7 +534,7 @@ local function putpat(ctx, name, pat) | |||
532 | local lo = imm % 0x1000000 | 534 | local lo = imm % 0x1000000 |
533 | x = format("0x%02x%06x", (imm-lo) / 0x1000000, lo) | 535 | x = format("0x%02x%06x", (imm-lo) / 0x1000000, lo) |
534 | else | 536 | else |
535 | x = format("0x%08x", imm) | 537 | x = "0x"..tohex(imm) |
536 | end | 538 | end |
537 | elseif p == "R" then | 539 | elseif p == "R" then |
538 | local r = byte(code, pos-1, pos-1)%8 | 540 | local r = byte(code, pos-1, pos-1)%8 |