1 #/bin/emblua LUAPREFIX=/*|
5 /*| -----------------------------------
6 /*| local regsacdb = { "A", "C", "D", "B" }
7 /*| local regsx = { "SP", "BP", "SI", "DI" }
8 /*| local function hex2(n) return string.format("%02x", n) end
23 FLAGS = 0x01, FLAGSRC, 16; x32
24 FLAGS = 0x01, FLAGSRC, 48; x64
25 /*| for k,r in ipairs(regsacdb) do
26 %(r)L = 0x%(hex2(32+k-1)), GRC8L, %(k-1)
27 %(r)H = 0x%(hex2(32+4+k-1)), GRC8H, %(k-1)
28 %(r)X = 0x%(hex2(64+k-1)), GRC16, %(k-1)
29 E%(r)X = 0x%(hex2(16+k-1)), GRC32, %(k-1)
30 R%(r)X = 0x%(hex2(80+k-1)), GRC64, %(k-1); x64
32 /*| for k,r in ipairs(regsx) do
33 %(r)L = 0x%(hex2(48+4+k-1)), GRC8X, %(4+k-1); x64
34 %(r) = 0x%(hex2(64+4+k-1)), GRC16, %(4+k-1)
35 E%(r) = 0x%(hex2(16+4+k-1)), GRC32, %(4+k-1)
36 R%(r) = 0x%(hex2(80+4+k-1)), GRC64, %(4+k-1); x64
39 XMM%(k) = 0x%(hex2(96+k)), VRC128, %(8+k); x32
40 YMM%(k) = 0x%(hex2(128+k)), VRC256, %(8+k); x32
41 ZMM%(k) = 0x%(hex2(160+k)), VRC512, %(8+k); x32
42 XMM%(k) = 0x%(hex2(96+k)), VRC128, %(16+k); x64
43 YMM%(k) = 0x%(hex2(128+k)), VRC256, %(16+k); x64
44 ZMM%(k) = 0x%(hex2(160+k)), VRC512, %(16+k); x64
47 R%(k)L = 0x%(hex2(48+k)), GR8X, %(k); x64
48 R%(k)W = 0x%(hex2(64+k)), GR16, %(k); x64
49 R%(k)D = 0x%(hex2(48+k)), GR32, %(k); x64
50 R%(k) = 0x%(hex2(48+k)), GR64, %(k); x64
51 XMM%(k) = 0x%(hex2(96+k)), VR128, %(16+k); x64
52 YMM%(k) = 0x%(hex2(128+k)), VR256, %(16+k); x64
53 ZMM%(k) = 0x%(hex2(160+k)), VR512, %(16+k); x64
56 XMM%(k) = 0x%(hex2(96+k)), VR128, %(16+k); x64
57 YMM%(k) = 0x%(hex2(128+k)), VR256, %(16+k); x64
58 ZMM%(k) = 0x%(hex2(160+k)), VR512, %(16+k); x64
61 /*| for k,r in ipairs(regsacdb) do
70 /*| for k,r in ipairs(regsx) do
74 R%(4+k-1) = E%(r); x32
75 R%(4+k-1) = R%(r); x64
99 GRC8 = 0-3:AL, 8-15:R8L; x64