aboutsummaryrefslogtreecommitdiff
path: root/src/jit
diff options
context:
space:
mode:
authorMike Pall <mike>2018-06-05 12:23:29 +0200
committerMike Pall <mike>2018-06-05 12:23:29 +0200
commit55f70823242aa4e6acc248bde5cf8194ba1b27e3 (patch)
treebed4140fddc5bb3dd8daa2c8eaa1f3d346c721ad /src/jit
parentcc299958bb412f229844e53473a035c280544ec3 (diff)
downloadluajit-55f70823242aa4e6acc248bde5cf8194ba1b27e3.tar.gz
luajit-55f70823242aa4e6acc248bde5cf8194ba1b27e3.tar.bz2
luajit-55f70823242aa4e6acc248bde5cf8194ba1b27e3.zip
x86: Disassemble FMA3 instructions.
Thanks to Alexander Nasonov.
Diffstat (limited to 'src/jit')
-rw-r--r--src/jit/dis_x86.lua24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/jit/dis_x86.lua b/src/jit/dis_x86.lua
index 4371233d..3a68c933 100644
--- a/src/jit/dis_x86.lua
+++ b/src/jit/dis_x86.lua
@@ -239,6 +239,24 @@ nil,"||psrlvVSXrvm","||psravdXrvm","||psllvVSXrvm",
239--8x 239--8x
240[0x8c] = "||pmaskmovXrvVSm", 240[0x8c] = "||pmaskmovXrvVSm",
241[0x8e] = "||pmaskmovVSmXvr", 241[0x8e] = "||pmaskmovVSmXvr",
242--9x
243[0x96] = "||fmaddsub132pHXrvm",[0x97] = "||fmsubadd132pHXrvm",
244[0x98] = "||fmadd132pHXrvm",[0x99] = "||fmadd132sHXrvm",
245[0x9a] = "||fmsub132pHXrvm",[0x9b] = "||fmsub132sHXrvm",
246[0x9c] = "||fnmadd132pHXrvm",[0x9d] = "||fnmadd132sHXrvm",
247[0x9e] = "||fnmsub132pHXrvm",[0x9f] = "||fnmsub132sHXrvm",
248--Ax
249[0xa6] = "||fmaddsub213pHXrvm",[0xa7] = "||fmsubadd213pHXrvm",
250[0xa8] = "||fmadd213pHXrvm",[0xa9] = "||fmadd213sHXrvm",
251[0xaa] = "||fmsub213pHXrvm",[0xab] = "||fmsub213sHXrvm",
252[0xac] = "||fnmadd213pHXrvm",[0xad] = "||fnmadd213sHXrvm",
253[0xae] = "||fnmsub213pHXrvm",[0xaf] = "||fnmsub213sHXrvm",
254--Bx
255[0xb6] = "||fmaddsub231pHXrvm",[0xb7] = "||fmsubadd231pHXrvm",
256[0xb8] = "||fmadd231pHXrvm",[0xb9] = "||fmadd231sHXrvm",
257[0xba] = "||fmsub231pHXrvm",[0xbb] = "||fmsub231sHXrvm",
258[0xbc] = "||fnmadd231pHXrvm",[0xbd] = "||fnmadd231sHXrvm",
259[0xbe] = "||fnmsub231pHXrvm",[0xbf] = "||fnmsub231sHXrvm",
242--Dx 260--Dx
243[0xdc] = "||aesencXrvm", [0xdd] = "||aesenclastXrvm", 261[0xdc] = "||aesencXrvm", [0xdd] = "||aesenclastXrvm",
244[0xde] = "||aesdecXrvm", [0xdf] = "||aesdeclastXrvm", 262[0xde] = "||aesdecXrvm", [0xdf] = "||aesdeclastXrvm",
@@ -483,7 +501,7 @@ local function putpat(ctx, name, pat)
483 local operands, regs, sz, mode, sp, rm, sc, rx, sdisp 501 local operands, regs, sz, mode, sp, rm, sc, rx, sdisp
484 local code, pos, stop, vexl = ctx.code, ctx.pos, ctx.stop, ctx.vexl 502 local code, pos, stop, vexl = ctx.code, ctx.pos, ctx.stop, ctx.vexl
485 503
486 -- Chars used: 1DFGIMPQRSTUVWXYabcdfgijlmoprstuvwxyz 504 -- Chars used: 1DFGHIMPQRSTUVWXYabcdfgijlmoprstuvwxyz
487 for p in gmatch(pat, ".") do 505 for p in gmatch(pat, ".") do
488 local x = nil 506 local x = nil
489 if p == "V" or p == "U" then 507 if p == "V" or p == "U" then
@@ -506,6 +524,9 @@ local function putpat(ctx, name, pat)
506 sz = ctx.o16 and "X" or "M"; ctx.o16 = false 524 sz = ctx.o16 and "X" or "M"; ctx.o16 = false
507 if sz == "X" and vexl then sz = "Y"; ctx.vexl = false end 525 if sz == "X" and vexl then sz = "Y"; ctx.vexl = false end
508 regs = map_regs[sz] 526 regs = map_regs[sz]
527 elseif p == "H" then
528 name = name..(ctx.rexw and "d" or "s")
529 ctx.rexw = false
509 elseif p == "S" then 530 elseif p == "S" then
510 name = name..lower(sz) 531 name = name..lower(sz)
511 elseif p == "s" then 532 elseif p == "s" then
@@ -735,6 +756,7 @@ map_act = {
735 V = putpat, U = putpat, T = putpat, 756 V = putpat, U = putpat, T = putpat,
736 M = putpat, X = putpat, P = putpat, 757 M = putpat, X = putpat, P = putpat,
737 F = putpat, G = putpat, Y = putpat, 758 F = putpat, G = putpat, Y = putpat,
759 H = putpat,
738 760
739 -- Collect prefixes. 761 -- Collect prefixes.
740 [":"] = function(ctx, name, pat) 762 [":"] = function(ctx, name, pat)