diff options
author | Jan Beulich <jbeulich@suse.com> | 2021-03-11 16:21:48 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2021-03-11 16:21:48 +0100 |
commit | fd1fd0618645c5d4ff4279433360e3a7fd779fba (patch) | |
tree | 9578415a06cff6428e021767ea5c952e9d9230e2 /opcodes/i386-dis.c | |
parent | ac7a231133b5a1eeba16fe93396af86b7c5d7c7a (diff) | |
download | gdb-fd1fd0618645c5d4ff4279433360e3a7fd779fba.zip gdb-fd1fd0618645c5d4ff4279433360e3a7fd779fba.tar.gz gdb-fd1fd0618645c5d4ff4279433360e3a7fd779fba.tar.bz2 |
x86: re-order logic in OP_XMM()
Instead of excluding an increasing number of modes in the initial if(),
check the special modes first.
Diffstat (limited to 'opcodes/i386-dis.c')
-rw-r--r-- | opcodes/i386-dis.c | 66 |
1 files changed, 31 insertions, 35 deletions
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index 10dbe7f..2985e8d 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -12598,39 +12598,8 @@ OP_XMM (int bytemode, int sizeflag ATTRIBUTE_UNUSED) reg += 16; } - if (need_vex - && bytemode != xmm_mode - && bytemode != xmmq_mode - && bytemode != evex_half_bcst_xmmq_mode - && bytemode != ymm_mode - && bytemode != tmm_mode - && bytemode != scalar_mode) - { - switch (vex.length) - { - case 128: - names = names_xmm; - break; - case 256: - if (vex.w - || bytemode != vex_vsib_q_w_dq_mode) - names = names_ymm; - else - names = names_xmm; - break; - case 512: - if (vex.w - || bytemode != vex_vsib_q_w_dq_mode) - names = names_zmm; - else - names = names_ymm; - break; - default: - abort (); - } - } - else if (bytemode == xmmq_mode - || bytemode == evex_half_bcst_xmmq_mode) + if (bytemode == xmmq_mode + || bytemode == evex_half_bcst_xmmq_mode) { switch (vex.length) { @@ -12645,6 +12614,8 @@ OP_XMM (int bytemode, int sizeflag ATTRIBUTE_UNUSED) abort (); } } + else if (bytemode == ymm_mode) + names = names_ymm; else if (bytemode == tmm_mode) { modrm.reg = reg; @@ -12655,8 +12626,33 @@ OP_XMM (int bytemode, int sizeflag ATTRIBUTE_UNUSED) } names = names_tmm; } - else if (bytemode == ymm_mode) - names = names_ymm; + else if (need_vex + && bytemode != xmm_mode + && bytemode != scalar_mode) + { + switch (vex.length) + { + case 128: + names = names_xmm; + break; + case 256: + if (vex.w + || bytemode != vex_vsib_q_w_dq_mode) + names = names_ymm; + else + names = names_xmm; + break; + case 512: + if (vex.w + || bytemode != vex_vsib_q_w_dq_mode) + names = names_zmm; + else + names = names_ymm; + break; + default: + abort (); + } + } else names = names_xmm; oappend (names[reg]); |