aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2018-10-10 08:41:52 +0200
committerJan Beulich <jbeulich@suse.com>2018-10-10 08:41:52 +0200
commit673fe0f0a7a0624819f1b4cdc289f43691567e91 (patch)
treee322ba7542279099e15cdf44862fed1ae9ee4ebc /gas
parent43f6cd0588a735c202934789d67b6ed4302f255d (diff)
downloadgdb-673fe0f0a7a0624819f1b4cdc289f43691567e91.zip
gdb-673fe0f0a7a0624819f1b4cdc289f43691567e91.tar.gz
gdb-673fe0f0a7a0624819f1b4cdc289f43691567e91.tar.bz2
x86: fold Size{16,32,64} template attributes
Only one of them can be set at a time, which means they can be expressed by a single 2-bit field instead of three 1-bit ones.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-i386.c12
2 files changed, 11 insertions, 6 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 6473541..0716916 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2018-10-10 Jan Beulich <jbeulich@suse.com>
+
+ * config/tc-i386.c (parse_insn, process_suffix): Replace
+ opcode_modifier.size<N> uses.
+
2018-10-09 Sudakshina Das <sudi.das@arm.com>
* config/tc-aarch64.c (aarch64_features): Add new "ssbs".
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 2204d00..e808d20 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -4450,10 +4450,10 @@ parse_insn (char *line, char *mnemonic)
}
/* If we are in 16-bit mode, do not allow addr16 or data16.
Similarly, in 32-bit mode, do not allow addr32 or data32. */
- if ((current_templates->start->opcode_modifier.size16
- || current_templates->start->opcode_modifier.size32)
+ if ((current_templates->start->opcode_modifier.size == SIZE16
+ || current_templates->start->opcode_modifier.size == SIZE32)
&& flag_code != CODE_64BIT
- && (current_templates->start->opcode_modifier.size32
+ && ((current_templates->start->opcode_modifier.size == SIZE32)
^ (flag_code == CODE_16BIT)))
{
as_bad (_("redundant %s prefix"),
@@ -6045,11 +6045,11 @@ process_suffix (void)
{
/* If matched instruction specifies an explicit instruction mnemonic
suffix, use it. */
- if (i.tm.opcode_modifier.size16)
+ if (i.tm.opcode_modifier.size == SIZE16)
i.suffix = WORD_MNEM_SUFFIX;
- else if (i.tm.opcode_modifier.size32)
+ else if (i.tm.opcode_modifier.size == SIZE32)
i.suffix = LONG_MNEM_SUFFIX;
- else if (i.tm.opcode_modifier.size64)
+ else if (i.tm.opcode_modifier.size == SIZE64)
i.suffix = QWORD_MNEM_SUFFIX;
else if (i.reg_operands)
{