diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2018-08-11 14:37:14 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2018-08-11 14:37:32 -0700 |
commit | d871f3f48388d57721d8077e281041ed16a745cf (patch) | |
tree | 31db918f0c563c84b09de4674bb4af3548b1483c /opcodes/i386-gen.c | |
parent | ab9e342807d132182892de1be1a92d6e91a5c1da (diff) | |
download | binutils-gdb-d871f3f48388d57721d8077e281041ed16a745cf.tar.gz |
x86: Add CpuCMOV and CpuFXSR
There are separate CPUID feature bits for fxsave/fxrstor and cmovCC
instructions. This patch adds CpuCMOV and CpuFXSR to replace Cpu686
on corresponding instructions.
gas/
* config/tc-i386.c (cpu_arch): Add .cmov and .fxsr.
(cpu_noarch): Add nocmov and nofxsr.
* doc/c-i386.texi: Document cmov and fxsr.
opcodes/
* i386-gen.c (cpu_flag_init): Add CpuCMOV and CpuFXSR to
CPU_I686_FLAGS. Add CPU_CMOV_FLAGS, CPU_FXSR_FLAGS,
CPU_ANY_CMOV_FLAGS and CPU_ANY_FXSR_FLAGS.
(cpu_flags): Add CpuCMOV and CpuFXSR.
* i386-opc.tbl: Replace Cpu686 with CpuFXSR on fxsave, fxsave64,
fxrstor and fxrstor64. Replace Cpu686 with CpuCMOV on cmovCC.
* i386-init.h: Regenerated.
* i386-tbl.h: Likewise.
Diffstat (limited to 'opcodes/i386-gen.c')
-rw-r--r-- | opcodes/i386-gen.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c index 28bf92674f4..b958e8b3951 100644 --- a/opcodes/i386-gen.c +++ b/opcodes/i386-gen.c @@ -60,7 +60,7 @@ static initializer cpu_flag_init[] = { "CPU_I586_FLAGS", "CPU_I486_FLAGS|Cpu387|Cpu586" }, { "CPU_I686_FLAGS", - "CPU_I586_FLAGS|Cpu686|Cpu687" }, + "CPU_I586_FLAGS|Cpu686|Cpu687|CpuCMOV|CpuFXSR" }, { "CPU_PENTIUMPRO_FLAGS", "CPU_I686_FLAGS|CpuNop" }, { "CPU_P2_FLAGS", @@ -111,6 +111,10 @@ static initializer cpu_flag_init[] = "Cpu387" }, { "CPU_687_FLAGS", "CPU_387_FLAGS|Cpu687" }, + { "CPU_CMOV_FLAGS", + "CpuCMOV" }, + { "CPU_FXSR_FLAGS", + "CpuFXSR" }, { "CPU_CLFLUSH_FLAGS", "CpuClflush" }, { "CPU_NOP_FLAGS", @@ -297,6 +301,10 @@ static initializer cpu_flag_init[] = "CPU_ANY_687_FLAGS|Cpu387" }, { "CPU_ANY_687_FLAGS", "Cpu687|CpuFISTTP" }, + { "CPU_ANY_CMOV_FLAGS", + "CpuCMOV" }, + { "CPU_ANY_FXSR_FLAGS", + "CpuFXSR" }, { "CPU_ANY_MMX_FLAGS", "CPU_3DNOWA_FLAGS" }, { "CPU_ANY_SSE_FLAGS", @@ -487,6 +495,8 @@ static bitfield cpu_flags[] = BITFIELD (Cpu486), BITFIELD (Cpu586), BITFIELD (Cpu686), + BITFIELD (CpuCMOV), + BITFIELD (CpuFXSR), BITFIELD (CpuClflush), BITFIELD (CpuNop), BITFIELD (CpuSYSCALL), |