|
 |
006bc1 |
From 55f70823242aa4e6acc248bde5cf8194ba1b27e3 Mon Sep 17 00:00:00 2001
|
|
 |
006bc1 |
From: Mike Pall <mike>
|
|
 |
006bc1 |
Date: Tue, 5 Jun 2018 12:23:29 +0200
|
|
 |
006bc1 |
Subject: [PATCH 43/72] x86: Disassemble FMA3 instructions.
|
|
 |
006bc1 |
|
|
 |
006bc1 |
Thanks to Alexander Nasonov.
|
|
 |
006bc1 |
---
|
|
 |
006bc1 |
src/jit/dis_x86.lua | 24 +++++++++++++++++++++++-
|
|
 |
006bc1 |
1 file changed, 23 insertions(+), 1 deletion(-)
|
|
 |
006bc1 |
|
|
 |
006bc1 |
diff --git a/src/jit/dis_x86.lua b/src/jit/dis_x86.lua
|
|
 |
006bc1 |
index 4371233..3a68c93 100644
|
|
 |
006bc1 |
--- a/src/jit/dis_x86.lua
|
|
 |
006bc1 |
+++ b/src/jit/dis_x86.lua
|
|
 |
006bc1 |
@@ -239,6 +239,24 @@ nil,"||psrlvVSXrvm","||psravdXrvm","||psllvVSXrvm",
|
|
 |
006bc1 |
--8x
|
|
 |
006bc1 |
[0x8c] = "||pmaskmovXrvVSm",
|
|
 |
006bc1 |
[0x8e] = "||pmaskmovVSmXvr",
|
|
 |
006bc1 |
+--9x
|
|
 |
006bc1 |
+[0x96] = "||fmaddsub132pHXrvm",[0x97] = "||fmsubadd132pHXrvm",
|
|
 |
006bc1 |
+[0x98] = "||fmadd132pHXrvm",[0x99] = "||fmadd132sHXrvm",
|
|
 |
006bc1 |
+[0x9a] = "||fmsub132pHXrvm",[0x9b] = "||fmsub132sHXrvm",
|
|
 |
006bc1 |
+[0x9c] = "||fnmadd132pHXrvm",[0x9d] = "||fnmadd132sHXrvm",
|
|
 |
006bc1 |
+[0x9e] = "||fnmsub132pHXrvm",[0x9f] = "||fnmsub132sHXrvm",
|
|
 |
006bc1 |
+--Ax
|
|
 |
006bc1 |
+[0xa6] = "||fmaddsub213pHXrvm",[0xa7] = "||fmsubadd213pHXrvm",
|
|
 |
006bc1 |
+[0xa8] = "||fmadd213pHXrvm",[0xa9] = "||fmadd213sHXrvm",
|
|
 |
006bc1 |
+[0xaa] = "||fmsub213pHXrvm",[0xab] = "||fmsub213sHXrvm",
|
|
 |
006bc1 |
+[0xac] = "||fnmadd213pHXrvm",[0xad] = "||fnmadd213sHXrvm",
|
|
 |
006bc1 |
+[0xae] = "||fnmsub213pHXrvm",[0xaf] = "||fnmsub213sHXrvm",
|
|
 |
006bc1 |
+--Bx
|
|
 |
006bc1 |
+[0xb6] = "||fmaddsub231pHXrvm",[0xb7] = "||fmsubadd231pHXrvm",
|
|
 |
006bc1 |
+[0xb8] = "||fmadd231pHXrvm",[0xb9] = "||fmadd231sHXrvm",
|
|
 |
006bc1 |
+[0xba] = "||fmsub231pHXrvm",[0xbb] = "||fmsub231sHXrvm",
|
|
 |
006bc1 |
+[0xbc] = "||fnmadd231pHXrvm",[0xbd] = "||fnmadd231sHXrvm",
|
|
 |
006bc1 |
+[0xbe] = "||fnmsub231pHXrvm",[0xbf] = "||fnmsub231sHXrvm",
|
|
 |
006bc1 |
--Dx
|
|
 |
006bc1 |
[0xdc] = "||aesencXrvm", [0xdd] = "||aesenclastXrvm",
|
|
 |
006bc1 |
[0xde] = "||aesdecXrvm", [0xdf] = "||aesdeclastXrvm",
|
|
 |
006bc1 |
@@ -483,7 +501,7 @@ local function putpat(ctx, name, pat)
|
|
 |
006bc1 |
local operands, regs, sz, mode, sp, rm, sc, rx, sdisp
|
|
 |
006bc1 |
local code, pos, stop, vexl = ctx.code, ctx.pos, ctx.stop, ctx.vexl
|
|
 |
006bc1 |
|
|
 |
006bc1 |
- -- Chars used: 1DFGIMPQRSTUVWXYabcdfgijlmoprstuvwxyz
|
|
 |
006bc1 |
+ -- Chars used: 1DFGHIMPQRSTUVWXYabcdfgijlmoprstuvwxyz
|
|
 |
006bc1 |
for p in gmatch(pat, ".") do
|
|
 |
006bc1 |
local x = nil
|
|
 |
006bc1 |
if p == "V" or p == "U" then
|
|
 |
006bc1 |
@@ -506,6 +524,9 @@ local function putpat(ctx, name, pat)
|
|
 |
006bc1 |
sz = ctx.o16 and "X" or "M"; ctx.o16 = false
|
|
 |
006bc1 |
if sz == "X" and vexl then sz = "Y"; ctx.vexl = false end
|
|
 |
006bc1 |
regs = map_regs[sz]
|
|
 |
006bc1 |
+ elseif p == "H" then
|
|
 |
006bc1 |
+ name = name..(ctx.rexw and "d" or "s")
|
|
 |
006bc1 |
+ ctx.rexw = false
|
|
 |
006bc1 |
elseif p == "S" then
|
|
 |
006bc1 |
name = name..lower(sz)
|
|
 |
006bc1 |
elseif p == "s" then
|
|
 |
006bc1 |
@@ -735,6 +756,7 @@ map_act = {
|
|
 |
006bc1 |
V = putpat, U = putpat, T = putpat,
|
|
 |
006bc1 |
M = putpat, X = putpat, P = putpat,
|
|
 |
006bc1 |
F = putpat, G = putpat, Y = putpat,
|
|
 |
006bc1 |
+ H = putpat,
|
|
 |
006bc1 |
|
|
 |
006bc1 |
-- Collect prefixes.
|
|
 |
006bc1 |
[":"] = function(ctx, name, pat)
|
|
 |
006bc1 |
--
|
|
 |
006bc1 |
2.20.1
|
|
 |
006bc1 |
|