Browse Source

x86: Improve disassembly of BMI2 instructions.

Thanks to Peter Cawley.
Mike Pall 9 years ago
parent
commit
ac9193cfeb
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/jit/dis_x86.lua

+ 4 - 4
src/jit/dis_x86.lua

@@ -244,7 +244,7 @@ nil,"||psrlvVSXrvm","||psravdXrvm","||psllvVSXrvm",
 [0xde] = "||aesdecXrvm", [0xdf] = "||aesdeclastXrvm",
 [0xde] = "||aesdecXrvm", [0xdf] = "||aesdeclastXrvm",
 --Fx
 --Fx
 [0xf0] = "|||crc32TrBmt",[0xf1] = "|||crc32TrVmt",
 [0xf0] = "|||crc32TrBmt",[0xf1] = "|||crc32TrVmt",
-[0xf7] = "|sarxVrmv|shlxVrmv|shrxVrmv",
+[0xf7] = "| sarxVrmv| shlxVrmv| shrxVrmv",
 },
 },
 
 
 ["3a"] = { -- [66] 0f 3a xx
 ["3a"] = { -- [66] 0f 3a xx
@@ -275,7 +275,7 @@ nil,nil,nil,nil,
 [0x62] = "||pcmpistrmXrmu",[0x63] = "||pcmpistriXrmu",
 [0x62] = "||pcmpistrmXrmu",[0x63] = "||pcmpistriXrmu",
 [0xdf] = "||aeskeygenassistXrmu",
 [0xdf] = "||aeskeygenassistXrmu",
 --Fx
 --Fx
-[0xf0] = "|||rorxVrmu",
+[0xf0] = "||| rorxVrmu",
 },
 },
 }
 }
 
 
@@ -417,8 +417,8 @@ local function putop(ctx, text, operands)
 	      (ctx.rexx and "x" or "")..(ctx.rexb and "b" or "")..
 	      (ctx.rexx and "x" or "")..(ctx.rexb and "b" or "")..
 	      (ctx.vexl and "l" or "")
 	      (ctx.vexl and "l" or "")
     if ctx.vexv and ctx.vexv ~= 0 then t = t.."v"..ctx.vexv end
     if ctx.vexv and ctx.vexv ~= 0 then t = t.."v"..ctx.vexv end
-    if t ~= "" then text = ctx.rex.."."..t.." "..text
-    elseif ctx.rex == "vex" then text = "v"..text end
+    if t ~= "" then text = ctx.rex.."."..t.." "..gsub(text, "^ ", "")
+    elseif ctx.rex == "vex" then text = gsub("v"..text, "^v ", "") end
     ctx.rexw = false; ctx.rexr = false; ctx.rexx = false; ctx.rexb = false
     ctx.rexw = false; ctx.rexr = false; ctx.rexx = false; ctx.rexb = false
     ctx.rex = false; ctx.vexl = false; ctx.vexv = false
     ctx.rex = false; ctx.vexl = false; ctx.vexv = false
   end
   end