diff options
author | Jan Beulich <jbeulich@suse.com> | 2021-07-22 13:03:53 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2021-07-22 13:03:53 +0200 |
commit | 4454883ff0ee338b1f6aab7f65ab1081af307e7c (patch) | |
tree | cbb6ab59314320ea41385d751ce8cf01041b2490 /opcodes/i386-dis.c | |
parent | 5f6b8397a40ca30460464e115c6aed8b7b6679f8 (diff) | |
download | gdb-4454883ff0ee338b1f6aab7f65ab1081af307e7c.zip gdb-4454883ff0ee338b1f6aab7f65ab1081af307e7c.tar.gz gdb-4454883ff0ee338b1f6aab7f65ab1081af307e7c.tar.bz2 |
x86: fold duplicate code in MOVSXD_Fixup()
There's no need to have two paths printing the "xd" mnemonic suffix.
Diffstat (limited to 'opcodes/i386-dis.c')
-rw-r--r-- | opcodes/i386-dis.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index 725b38b..ddb659f 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -13601,31 +13601,25 @@ MOVSXD_Fixup (int bytemode, int sizeflag) switch (bytemode) { case movsxd_mode: - if (intel_syntax) + if (!intel_syntax) { - *p++ = 'x'; - *p++ = 'd'; - goto skip; + USED_REX (REX_W); + if (rex & REX_W) + { + *p++ = 'l'; + *p++ = 'q'; + break; + } } - USED_REX (REX_W); - if (rex & REX_W) - { - *p++ = 'l'; - *p++ = 'q'; - } - else - { - *p++ = 'x'; - *p++ = 'd'; - } + *p++ = 'x'; + *p++ = 'd'; break; default: oappend (INTERNAL_DISASSEMBLER_ERROR); break; } - skip: mnemonicendp = p; *p = '\0'; OP_E (bytemode, sizeflag); |