diff options
author | Jan Beulich <jbeulich@novell.com> | 2018-03-08 08:50:13 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2018-03-08 08:50:13 +0100 |
commit | 8819ada6c48777c0dd0835d46f4a9dd3ecf2b0ec (patch) | |
tree | 56d219d638ad2ea5301611ea141ff481d3baef3d /gas/config | |
parent | 548d0ee6e726c366fda3f37251f329ec51decc6d (diff) | |
download | gdb-8819ada6c48777c0dd0835d46f4a9dd3ecf2b0ec.zip gdb-8819ada6c48777c0dd0835d46f4a9dd3ecf2b0ec.tar.gz gdb-8819ada6c48777c0dd0835d46f4a9dd3ecf2b0ec.tar.bz2 |
x86: fold redundant expressions in process_suffix()
There's no point repeatedly evaluating i.types[op].bitfield.reg.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-i386.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 67e8069..83fd18c 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -5736,26 +5736,19 @@ process_suffix (void) if (!i.tm.operand_types[op].bitfield.inoutportreg && !i.tm.operand_types[op].bitfield.shiftcount) { - if (i.types[op].bitfield.reg && i.types[op].bitfield.byte) - { - i.suffix = BYTE_MNEM_SUFFIX; - break; - } - if (i.types[op].bitfield.reg && i.types[op].bitfield.word) - { - i.suffix = WORD_MNEM_SUFFIX; - break; - } - if (i.types[op].bitfield.reg && i.types[op].bitfield.dword) - { - i.suffix = LONG_MNEM_SUFFIX; - break; - } - if (i.types[op].bitfield.reg && i.types[op].bitfield.qword) - { - i.suffix = QWORD_MNEM_SUFFIX; - break; - } + if (!i.types[op].bitfield.reg) + continue; + if (i.types[op].bitfield.byte) + i.suffix = BYTE_MNEM_SUFFIX; + else if (i.types[op].bitfield.word) + i.suffix = WORD_MNEM_SUFFIX; + else if (i.types[op].bitfield.dword) + i.suffix = LONG_MNEM_SUFFIX; + else if (i.types[op].bitfield.qword) + i.suffix = QWORD_MNEM_SUFFIX; + else + continue; + break; } } } |