[5/5] x86: move putop() case labels to restore alphabetic sorting

Message ID ee2e250d-75e1-0d34-4626-7f91fe677c11@suse.com
State New
Headers show
Series
  • x86: (mainly) limit suffix emission for stack accessing and branch insns
Related show

Commit Message

Jan Beulich July 14, 2020, 10:14 a.m.
... as far as non-fall-through behavior permits.

opcodes/
2020-07-XX  Jan Beulich  <jbeulich@suse.com>

	* i386-dis.c (putop): Move 'V' and 'W' handling.

Comments

Jose E. Marchesi via Binutils July 14, 2020, 1:08 p.m. | #1
On Tue, Jul 14, 2020 at 12:14:17PM +0200, Jan Beulich wrote:
> ... as far as non-fall-through behavior permits.

> 

> opcodes/

> 2020-07-XX  Jan Beulich  <jbeulich@suse.com>

> 

> 	* i386-dis.c (putop): Move 'V' and 'W' handling.

> 


OK.

Thanks.

H.J.

Patch

--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -10769,22 +10769,6 @@  putop (const char *in_template, int size
 	  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)
 	    {
@@ -10820,6 +10804,54 @@  putop (const char *in_template, int size
 	  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 ();
@@ -10890,39 +10922,6 @@  putop (const char *in_template, int size
 	    }
 	  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)