aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2018-04-26 08:28:38 +0200
committerJan Beulich <jbeulich@suse.com>2018-04-26 08:28:38 +0200
commit6b8d358865b10f3f8269d0d89ece1b19b114be0d (patch)
treeff6a4cb561b3fde55333e8e56baebb9a3c916f64 /gas
parentc47b0ff06d0d17be67ec76cb5e661083901cfb40 (diff)
downloadfsf-binutils-gdb-6b8d358865b10f3f8269d0d89ece1b19b114be0d.zip
fsf-binutils-gdb-6b8d358865b10f3f8269d0d89ece1b19b114be0d.tar.gz
fsf-binutils-gdb-6b8d358865b10f3f8269d0d89ece1b19b114be0d.tar.bz2
x86: drop dead code from build_modrm_byte()
There are no templates with VexImmExt and ImmExt set at the same time. There are also no VEX3SOURCES templates with CpuFMA. I assume both are left-overs from the implementation of an early specification which was later revised.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-i386.c23
2 files changed, 10 insertions, 19 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index ce832e9..057a45f 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2018-04-26 Jan Beulich <jbeulich@suse.com>
+
+ * config/tc-i386.c (build_modrm_byte): Drop code dealing with
+ .veximmext and .immext set at the same time. Drop code dealing
+ with .cpufma when .vexsources == VEX3SOURCES.
+
2018-04-25 Christophe Lyon <christophe.lyon@st.com>
Mickaël Guêné <mickael.guene@st.com>
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 9bfec10..014720e 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -6567,22 +6567,16 @@ build_modrm_byte (void)
unsigned int source, dest;
int vex_3_sources;
- /* The first operand of instructions with VEX prefix and 3 sources
- must be VEX_Imm4. */
vex_3_sources = i.tm.opcode_modifier.vexsources == VEX3SOURCES;
if (vex_3_sources)
{
unsigned int nds, reg_slot;
expressionS *exp;
- if (i.tm.opcode_modifier.veximmext
- && i.tm.opcode_modifier.immext)
- {
- dest = i.operands - 2;
- gas_assert (dest == 3);
- }
- else
- dest = i.operands - 1;
+ gas_assert (!i.tm.opcode_modifier.veximmext
+ || !i.tm.opcode_modifier.immext);
+
+ dest = i.operands - 1;
nds = dest - 1;
/* There are 2 kinds of instructions:
@@ -6623,15 +6617,6 @@ build_modrm_byte (void)
reg_slot = 0;
}
- /* FMA swaps REG and NDS. */
- if (i.tm.cpu_flags.bitfield.cpufma)
- {
- unsigned int tmp;
- tmp = reg_slot;
- reg_slot = nds;
- nds = tmp;
- }
-
gas_assert (i.tm.operand_types[reg_slot].bitfield.regsimd);
exp->X_op = O_constant;
exp->X_add_number = register_number (i.op[reg_slot].regs) << 4;