mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
Enable Intel MOVDIRI, MOVDIR64B instructions.
gas/ * config/tc-i386.c (cpu_arch): Add .movdir, .movdir64b. (cpu_noarch): Likewise. (process_suffix): Add check for register size. * doc/c-i386.texi: Document movdiri, movdir64b. * testsuite/gas/i386/i386.exp: Run MOVDIR{I,64B} tests. * testsuite/gas/i386/movdir-intel.d: New test. * testsuite/gas/i386/movdir.d: Likewise. * testsuite/gas/i386/movdir.s: Likewise. * testsuite/gas/i386/movdir64b-reg.s: Likewise. * testsuite/gas/i386/movdir64b-reg.l: Likewise. * testsuite/gas/i386/x86-64-movdir-intel.d: Likewise. * testsuite/gas/i386/x86-64-movdir.d: Likewise. * testsuite/gas/i386/x86-64-movdir.s: Likewise. * testsuite/gas/i386/x86-64-movdir64b-reg.s: Likewise. * testsuite/gas/i386/x86-64-movdir64b-reg.l: Likewise. opcodes/ * i386-dis.c (enum): Add PREFIX_0F38F8, PREFIX_0F38F9. (prefix_table): New instructions (see prefix above). Add Gva macro and handling in OP_G. * i386-gen.c (cpu_flag_init): Add CPU_MOVDIRI_FLAGS, CPU_MOVDIR64B_FLAGS. (cpu_flags): Likewise. (opcode_modifiers): Add AddrPrefixOpReg. (i386_opcode_modifier): Likewise. * i386-opc.h (enum): Add CpuMOVDIRI, CpuMOVDIR64B. (i386_cpu_flags): Likewise. * i386-opc.tbl: Add movidir{i,64b}. * i386-init.h: Regenerate. * i386-tbl.h: Likewise.
This commit is contained in:
@ -1,3 +1,21 @@
|
||||
2018-04-26 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
|
||||
|
||||
* i386-dis.c (enum): Add PREFIX_0F38F8, PREFIX_0F38F9,
|
||||
MOD_0F38F8_PREFIX_2, MOD_0F38F9_PREFIX_0.
|
||||
(prefix_table): New instructions (see prefix above).
|
||||
(mod_table): New instructions (see prefix above).
|
||||
Add Gva macro and handle in OP_G.
|
||||
* i386-gen.c (cpu_flag_init): Add CPU_MOVDIRI_FLAGS,
|
||||
CPU_MOVDIR64B_FLAGS.
|
||||
(cpu_flags): Likewise.
|
||||
(opcode_modifiers): Add AddrPrefixOpReg.
|
||||
(i386_opcode_modifier): Likewise.
|
||||
* i386-opc.h (enum): Add CpuMOVDIRI, CpuMOVDIR64B.
|
||||
(i386_cpu_flags): Likewise.
|
||||
* i386-opc.tbl: Add movidir{i,64b}.
|
||||
* i386-init.h: Regenerate.
|
||||
* i386-tbl.h: Likewise.
|
||||
|
||||
2018-04-26 Jan Beulich <jbeulich@suse.com>
|
||||
|
||||
* i386-opc.tbl: Fold various non-memory operand AVX512VL
|
||||
|
@ -281,6 +281,7 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
|
||||
#define Gd { OP_G, d_mode }
|
||||
#define Gdq { OP_G, dq_mode }
|
||||
#define Gm { OP_G, m_mode }
|
||||
#define Gva { OP_G, va_mode }
|
||||
#define Gw { OP_G, w_mode }
|
||||
#define Rd { OP_R, d_mode }
|
||||
#define Rdq { OP_R, dq_mode }
|
||||
@ -835,6 +836,8 @@ enum
|
||||
MOD_0F382A_PREFIX_2,
|
||||
MOD_0F38F5_PREFIX_2,
|
||||
MOD_0F38F6_PREFIX_0,
|
||||
MOD_0F38F8_PREFIX_2,
|
||||
MOD_0F38F9_PREFIX_0,
|
||||
MOD_62_32BIT,
|
||||
MOD_C4_32BIT,
|
||||
MOD_C5_32BIT,
|
||||
@ -1081,6 +1084,8 @@ enum
|
||||
PREFIX_0F38F1,
|
||||
PREFIX_0F38F5,
|
||||
PREFIX_0F38F6,
|
||||
PREFIX_0F38F8,
|
||||
PREFIX_0F38F9,
|
||||
PREFIX_0F3A08,
|
||||
PREFIX_0F3A09,
|
||||
PREFIX_0F3A0A,
|
||||
@ -4680,6 +4685,18 @@ static const struct dis386 prefix_table[][4] = {
|
||||
{ Bad_Opcode },
|
||||
},
|
||||
|
||||
/* PREFIX_0F38F8 */
|
||||
{
|
||||
{ Bad_Opcode },
|
||||
{ Bad_Opcode },
|
||||
{ MOD_TABLE (MOD_0F38F8_PREFIX_2) },
|
||||
},
|
||||
|
||||
/* PREFIX_0F38F9 */
|
||||
{
|
||||
{ MOD_TABLE (MOD_0F38F9_PREFIX_0) },
|
||||
},
|
||||
|
||||
/* PREFIX_0F3A08 */
|
||||
{
|
||||
{ Bad_Opcode },
|
||||
@ -7444,8 +7461,8 @@ static const struct dis386 three_byte_table[][256] = {
|
||||
{ PREFIX_TABLE (PREFIX_0F38F6) },
|
||||
{ Bad_Opcode },
|
||||
/* f8 */
|
||||
{ Bad_Opcode },
|
||||
{ Bad_Opcode },
|
||||
{ PREFIX_TABLE (PREFIX_0F38F8) },
|
||||
{ PREFIX_TABLE (PREFIX_0F38F9) },
|
||||
{ Bad_Opcode },
|
||||
{ Bad_Opcode },
|
||||
{ Bad_Opcode },
|
||||
@ -11836,6 +11853,14 @@ static const struct dis386 mod_table[][2] = {
|
||||
/* MOD_0F38F6_PREFIX_0 */
|
||||
{ "wrssK", { M, Gdq }, PREFIX_OPCODE },
|
||||
},
|
||||
{
|
||||
/* MOD_0F38F8_PREFIX_2 */
|
||||
{ "movdir64b", { Gva, M }, PREFIX_OPCODE },
|
||||
},
|
||||
{
|
||||
/* MOD_0F38F9_PREFIX_0 */
|
||||
{ "movdiri", { Em, Gm }, PREFIX_OPCODE },
|
||||
},
|
||||
{
|
||||
/* MOD_62_32BIT */
|
||||
{ "bound{S|}", { Gv, Ma }, 0 },
|
||||
@ -15152,8 +15177,10 @@ OP_E_register (int bytemode, int sizeflag)
|
||||
names = (address_mode == mode_64bit
|
||||
? names64 : names32);
|
||||
if (!(prefixes & PREFIX_ADDR))
|
||||
names = (address_mode == mode_16bit
|
||||
? names16 : names);
|
||||
{
|
||||
if (address_mode == mode_16bit)
|
||||
names = names16;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Remove "addr16/addr32". */
|
||||
@ -15652,6 +15679,7 @@ static void
|
||||
OP_G (int bytemode, int sizeflag)
|
||||
{
|
||||
int add = 0;
|
||||
const char **names;
|
||||
USED_REX (REX_R);
|
||||
if (rex & REX_R)
|
||||
add += 8;
|
||||
@ -15700,6 +15728,24 @@ OP_G (int bytemode, int sizeflag)
|
||||
used_prefixes |= (prefixes & PREFIX_DATA);
|
||||
}
|
||||
break;
|
||||
case va_mode:
|
||||
names = (address_mode == mode_64bit
|
||||
? names64 : names32);
|
||||
if (!(prefixes & PREFIX_ADDR))
|
||||
{
|
||||
if (address_mode == mode_16bit)
|
||||
names = names16;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Remove "addr16/addr32". */
|
||||
all_prefixes[last_addr_prefix] = 0;
|
||||
names = (address_mode != mode_32bit
|
||||
? names32 : names16);
|
||||
used_prefixes |= PREFIX_ADDR;
|
||||
}
|
||||
oappend (names[modrm.reg + add]);
|
||||
break;
|
||||
case m_mode:
|
||||
if (address_mode == mode_64bit)
|
||||
oappend (names64[modrm.reg + add]);
|
||||
|
@ -283,6 +283,10 @@ static initializer cpu_flag_init[] =
|
||||
"CpuWAITPKG" },
|
||||
{ "CPU_CLDEMOTE_FLAGS",
|
||||
"CpuCLDEMOTE" },
|
||||
{ "CPU_MOVDIRI_FLAGS",
|
||||
"CpuMOVDIRI" },
|
||||
{ "CPU_MOVDIR64B_FLAGS",
|
||||
"CpuMOVDIR64B" },
|
||||
{ "CPU_ANY_X87_FLAGS",
|
||||
"CPU_ANY_287_FLAGS|Cpu8087" },
|
||||
{ "CPU_ANY_287_FLAGS",
|
||||
@ -343,6 +347,10 @@ static initializer cpu_flag_init[] =
|
||||
"CpuAVX512_VNNI" },
|
||||
{ "CPU_ANY_AVX512_BITALG_FLAGS",
|
||||
"CpuAVX512_BITALG" },
|
||||
{ "CPU_ANY_MOVDIRI_FLAGS",
|
||||
"CpuMOVDIRI" },
|
||||
{ "CPU_ANY_MOVDIR64B_FLAGS",
|
||||
"CpuMOVDIR64B" },
|
||||
};
|
||||
|
||||
static const initializer operand_type_shorthands[] =
|
||||
@ -577,6 +585,13 @@ static bitfield cpu_flags[] =
|
||||
BITFIELD (CpuPCONFIG),
|
||||
BITFIELD (CpuWAITPKG),
|
||||
BITFIELD (CpuCLDEMOTE),
|
||||
BITFIELD (CpuMOVDIRI),
|
||||
BITFIELD (CpuMOVDIR64B),
|
||||
BITFIELD (CpuRegMMX),
|
||||
BITFIELD (CpuRegXMM),
|
||||
BITFIELD (CpuRegYMM),
|
||||
BITFIELD (CpuRegZMM),
|
||||
BITFIELD (CpuRegMask),
|
||||
#ifdef CpuUnused
|
||||
BITFIELD (CpuUnused),
|
||||
#endif
|
||||
@ -619,6 +634,7 @@ static bitfield opcode_modifiers[] =
|
||||
BITFIELD (ToDword),
|
||||
BITFIELD (ToQword),
|
||||
BITFIELD (AddrPrefixOp0),
|
||||
BITFIELD (AddrPrefixOpReg),
|
||||
BITFIELD (IsPrefix),
|
||||
BITFIELD (ImmExt),
|
||||
BITFIELD (NoRex64),
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -231,6 +231,20 @@ enum
|
||||
CpuWAITPKG,
|
||||
/* CLDEMOTE instruction required */
|
||||
CpuCLDEMOTE,
|
||||
/* MOVDIRI instruction support required */
|
||||
CpuMOVDIRI,
|
||||
/* MOVDIRR64B instruction required */
|
||||
CpuMOVDIR64B,
|
||||
/* MMX register support required */
|
||||
CpuRegMMX,
|
||||
/* XMM register support required */
|
||||
CpuRegXMM,
|
||||
/* YMM register support required */
|
||||
CpuRegYMM,
|
||||
/* ZMM register support required */
|
||||
CpuRegZMM,
|
||||
/* Mask register support required */
|
||||
CpuRegMask,
|
||||
/* 64bit support required */
|
||||
Cpu64,
|
||||
/* Not supported in the 64bit mode */
|
||||
@ -354,6 +368,13 @@ typedef union i386_cpu_flags
|
||||
unsigned int cpupconfig:1;
|
||||
unsigned int cpuwaitpkg:1;
|
||||
unsigned int cpucldemote:1;
|
||||
unsigned int cpumovdiri:1;
|
||||
unsigned int cpumovdir64b:1;
|
||||
unsigned int cpuregmmx:1;
|
||||
unsigned int cpuregxmm:1;
|
||||
unsigned int cpuregymm:1;
|
||||
unsigned int cpuregzmm:1;
|
||||
unsigned int cpuregmask:1;
|
||||
unsigned int cpu64:1;
|
||||
unsigned int cpuno64:1;
|
||||
#ifdef CpuUnused
|
||||
@ -447,6 +468,8 @@ enum
|
||||
ToQword,
|
||||
/* Address prefix changes operand 0 */
|
||||
AddrPrefixOp0,
|
||||
/* Address prefix changes register operand */
|
||||
AddrPrefixOpReg,
|
||||
/* opcode is a prefix */
|
||||
IsPrefix,
|
||||
/* instruction has extension in 8 bit imm */
|
||||
@ -628,6 +651,7 @@ typedef struct i386_opcode_modifier
|
||||
unsigned int todword:1;
|
||||
unsigned int toqword:1;
|
||||
unsigned int addrprefixop0:1;
|
||||
unsigned int addrprefixopreg:1;
|
||||
unsigned int isprefix:1;
|
||||
unsigned int immext:1;
|
||||
unsigned int norex64:1;
|
||||
|
@ -5829,3 +5829,13 @@ umwait, 1, 0xf20fae, 0x6, 2, CpuWAITPKG, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|N
|
||||
cldemote, 1, 0x0f1c, 0x0, 2, CpuCLDEMOTE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { Anysize|BaseIndex }
|
||||
|
||||
// CLDEMOTE instructions end.
|
||||
|
||||
// MOVDIR[I,64B] instructions.
|
||||
|
||||
movdiri, 2, 0xf38f9, None, 3, CpuMOVDIRI, Modrm|CheckRegSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { Reg32, Dword|Qword|Unspecified|BaseIndex|Disp8|Disp32|Disp32S }
|
||||
movdiri, 2, 0xf38f9, None, 3, CpuMOVDIRI|Cpu64, Modrm|CheckRegSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf|Rex64, { Reg64, Dword|Qword|Unspecified|BaseIndex|Disp8|Disp32|Disp32S }
|
||||
|
||||
movdir64b, 2, 0x660f38f8, None, 3, CpuMOVDIR64B|CpuNo64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf|AddrPrefixOpReg, { Unspecified|ZMMword|BaseIndex|Disp8|Disp32|Disp32S, Reg16|Reg32 }
|
||||
movdir64b, 2, 0x660f38f8, None, 3, CpuMOVDIR64B|Cpu64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf|NoRex64|AddrPrefixOpReg, { Unspecified|ZMMword|BaseIndex|Disp8|Disp32|Disp32S, Reg32|Reg64 }
|
||||
|
||||
// MOVEDIR instructions end.
|
||||
|
29952
opcodes/i386-tbl.h
29952
opcodes/i386-tbl.h
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user