aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2020-07-15 08:55:53 +0200
committerJan Beulich <jbeulich@suse.com>2020-07-15 08:55:53 +0200
commitf0e8d0bae403e33b8a3e8de5817d8f920e063f84 (patch)
tree2b6cc8e17ad3a1fda68419a99969eb9ab179d83c /opcodes
parentc3f5525ff1aca37c64365fb3493e86cae5472ad2 (diff)
downloadgdb-f0e8d0bae403e33b8a3e8de5817d8f920e063f84.zip
gdb-f0e8d0bae403e33b8a3e8de5817d8f920e063f84.tar.gz
gdb-f0e8d0bae403e33b8a3e8de5817d8f920e063f84.tar.bz2
x86: move putop() case labels to restore alphabetic sorting
... as far as non-fall-through behavior permits.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog4
-rw-r--r--opcodes/i386-dis.c97
2 files changed, 52 insertions, 49 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index f5907bc..e4e26a1 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,5 +1,9 @@
2020-07-15 Jan Beulich <jbeulich@suse.com>
+ * i386-dis.c (putop): Move 'V' and 'W' handling.
+
+2020-07-15 Jan Beulich <jbeulich@suse.com>
+
* i386-dis.c (dis386): Adjust 'V' description. Use P-based
construct for push/pop of register.
(putop): Honor cond when handling 'P'. Drop handling of plain
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 2742cf2..cd8a9a8 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -10742,22 +10742,6 @@ putop (const char *in_template, int sizeflag)
if (!(rex & REX_W))
used_prefixes |= (prefixes & PREFIX_DATA);
break;
- case 'V':
- if (l == 0)
- abort ();
- else if (l == 1 && last[0] == 'L')
- {
- if (rex & REX_W)
- {
- *obufp++ = 'a';
- *obufp++ = 'b';
- *obufp++ = 's';
- }
- }
- else
- abort ();
- /* Fall through. */
- goto case_S;
case 'S':
if (l == 0)
{
@@ -10793,6 +10777,54 @@ putop (const char *in_template, int sizeflag)
else
abort ();
break;
+ case 'V':
+ if (l == 0)
+ abort ();
+ else if (l == 1 && last[0] == 'L')
+ {
+ if (rex & REX_W)
+ {
+ *obufp++ = 'a';
+ *obufp++ = 'b';
+ *obufp++ = 's';
+ }
+ }
+ else
+ abort ();
+ goto case_S;
+ case 'W':
+ if (l == 0)
+ {
+ /* operand size flag for cwtl, cbtw */
+ USED_REX (REX_W);
+ if (rex & REX_W)
+ {
+ if (intel_syntax)
+ *obufp++ = 'd';
+ else
+ *obufp++ = 'l';
+ }
+ else if (sizeflag & DFLAG)
+ *obufp++ = 'w';
+ else
+ *obufp++ = 'b';
+ if (!(rex & REX_W))
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ }
+ else if (l == 1)
+ {
+ if (!need_vex)
+ abort ();
+ if (last[0] == 'X')
+ *obufp++ = vex.w ? 'd': 's';
+ else if (last[0] == 'B')
+ *obufp++ = vex.w ? 'w': 'b';
+ else
+ abort ();
+ }
+ else
+ abort ();
+ break;
case 'X':
if (l != 0)
abort ();
@@ -10864,39 +10896,6 @@ putop (const char *in_template, int sizeflag)
else
abort ();
break;
- case 'W':
- if (l == 0)
- {
- /* operand size flag for cwtl, cbtw */
- USED_REX (REX_W);
- if (rex & REX_W)
- {
- if (intel_syntax)
- *obufp++ = 'd';
- else
- *obufp++ = 'l';
- }
- else if (sizeflag & DFLAG)
- *obufp++ = 'w';
- else
- *obufp++ = 'b';
- if (!(rex & REX_W))
- used_prefixes |= (prefixes & PREFIX_DATA);
- }
- else if (l == 1)
- {
- if (!need_vex)
- abort ();
- if (last[0] == 'X')
- *obufp++ = vex.w ? 'd': 's';
- else if (last[0] == 'B')
- *obufp++ = vex.w ? 'w': 'b';
- else
- abort ();
- }
- else
- abort ();
- break;
case '^':
if (intel_syntax)
break;