+ support the xlat x86 instruction syntax with a memory operand. This allows

specifying the address size (e.g. xlat byte ptr [bx] or xlat byte ptr [ebx])

git-svn-id: trunk@37478 -
This commit is contained in:
nickysn 2017-10-17 16:40:06 +00:00
parent 2ffad85470
commit e8bbc4eef9
11 changed files with 78 additions and 3 deletions

View File

@ -1,2 +1,2 @@
{ don't edit, this file is generated from x86ins.dat }
1976;
1977;

View File

@ -5810,6 +5810,13 @@
code : #1#215;
flags : [if_8086]
),
(
opcode : A_XLAT;
ops : 1;
optypes : (ot_memory or ot_bits8,ot_none,ot_none,ot_none);
code : #1#215;
flags : [if_8086]
),
(
opcode : A_XLATB;
ops : 0;

View File

@ -1,2 +1,2 @@
{ don't edit, this file is generated from x86ins.dat }
2008;
2009;

View File

@ -5824,6 +5824,13 @@
code : #1#215;
flags : [if_8086]
),
(
opcode : A_XLAT;
ops : 1;
optypes : (ot_memory or ot_bits8,ot_none,ot_none,ot_none);
code : #1#215;
flags : [if_8086]
),
(
opcode : A_XLATB;
ops : 0;

View File

@ -985,6 +985,23 @@ interface
end;
if fixed_opcode=A_FWAIT then
writer.AsmWriteln(#9#9'DB'#9'09bh')
else if (fixed_opcode=A_XLAT) and (taicpu(hp).ops=1) and
(taicpu(hp).oper[0]^.typ=top_ref) then
begin
writer.AsmWrite(#9#9);
if (taicpu(hp).oper[0]^.ref^.segment<>NR_NO) and
(taicpu(hp).oper[0]^.ref^.segment<>NR_DS) then
writer.AsmWrite(std_regname(taicpu(hp).oper[0]^.ref^.segment)+' ');
case get_ref_address_size(taicpu(hp).oper[0]^.ref^) of
16:
writer.AsmWrite('a16 ');
32:
writer.AsmWrite('a32 ');
64:
writer.AsmWrite('a64 ');
end;
writer.AsmWriteLn('xlatb');
end
else if is_x86_parameterized_string_op(fixed_opcode) then
begin
writer.AsmWrite(#9#9);

View File

@ -2074,6 +2074,7 @@ mem8,reg8 \1\x86\101 8086
[XLAT]
(Ch_WEAX, Ch_REBX)
void \1\xD7 8086
mem8 \1\xD7 8086
[XLATB]
(Ch_WEAX, Ch_REBX)

View File

@ -1,2 +1,2 @@
{ don't edit, this file is generated from x86ins.dat }
2027;
2028;

View File

@ -5866,6 +5866,13 @@
code : #1#215;
flags : [if_8086]
),
(
opcode : A_XLAT;
ops : 1;
optypes : (ot_memory or ot_bits8,ot_none,ot_none,ot_none);
code : #1#215;
flags : [if_8086]
),
(
opcode : A_XLATB;
ops : 0;

View File

@ -39,7 +39,13 @@ begin
outsw
outsd
xlat
xlatb
{ no segment overrides }
xlat byte ptr [rbx]
xlat byte ptr [ebx]
movs byte ptr [rdi], byte ptr [rsi]
movs byte ptr [edi], byte ptr [esi]
movs word ptr [rdi], word ptr [rsi]
@ -100,6 +106,9 @@ begin
outs dx, dword ptr [esi]
{ es:di }
xlat byte ptr ds:[rbx]
xlat byte ptr ds:[ebx]
movs byte ptr es:[rdi], byte ptr [rsi]
movs byte ptr es:[edi], byte ptr [esi]
movs word ptr es:[rdi], word ptr [rsi]
@ -160,6 +169,9 @@ begin
outs dx, dword ptr [esi]
{ es:di, fs:si }
xlat byte ptr fs:[rbx]
xlat byte ptr fs:[ebx]
movs byte ptr es:[rdi], byte ptr fs:[rsi]
movs byte ptr es:[edi], byte ptr fs:[esi]
movs word ptr es:[rdi], word ptr fs:[rsi]

View File

@ -34,7 +34,13 @@ begin
outsw
outsd
xlat
xlatb
{ no segment overrides }
xlat byte ptr [ebx]
xlat byte ptr [bx]
movs byte ptr [edi], byte ptr [esi]
movs byte ptr [di], byte ptr [si]
movs word ptr [edi], word ptr [esi]
@ -85,6 +91,9 @@ begin
outs dx, dword ptr [si]
{ es:di }
xlat byte ptr ds:[ebx]
xlat byte ptr ds:[bx]
movs byte ptr es:[edi], byte ptr [esi]
movs byte ptr es:[di], byte ptr [si]
movs word ptr es:[edi], word ptr [esi]
@ -135,6 +144,9 @@ begin
outs dx, dword ptr [si]
{ es:di, fs:si }
xlat byte ptr fs:[ebx]
xlat byte ptr fs:[bx]
movs byte ptr es:[edi], byte ptr fs:[esi]
movs byte ptr es:[di], byte ptr fs:[si]
movs word ptr es:[edi], word ptr fs:[esi]

View File

@ -35,7 +35,13 @@ begin
outsw
outsd
xlat
xlatb
{ no segment overrides }
xlat byte ptr [ebx]
xlat byte ptr [bx]
movs byte ptr [edi], byte ptr [esi]
movs byte ptr [di], byte ptr [si]
movs word ptr [edi], word ptr [esi]
@ -86,6 +92,9 @@ begin
outs dx, dword ptr [si]
{ es:di }
xlat byte ptr ds:[ebx]
xlat byte ptr ds:[bx]
movs byte ptr es:[edi], byte ptr [esi]
movs byte ptr es:[di], byte ptr [si]
movs word ptr es:[edi], word ptr [esi]
@ -136,6 +145,9 @@ begin
outs dx, dword ptr [si]
{ es:di, fs:si }
xlat byte ptr fs:[ebx]
xlat byte ptr fs:[bx]
movs byte ptr es:[edi], byte ptr fs:[esi]
movs byte ptr es:[di], byte ptr fs:[si]
movs word ptr es:[edi], word ptr fs:[esi]