x86: fix expansion of %XV
authorJan Beulich <jbeulich@suse.com>
Wed, 21 Jun 2023 06:32:13 +0000 (08:32 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 21 Jun 2023 06:32:13 +0000 (08:32 +0200)
Only %LV should continue on to S handling; avoid emitting a stray 'l'
(typically) in suffix-always mode.

opcodes/i386-dis.c

index 6161bf72459f71cee94117c825fecb8fff85feb3..15a0e1b1080fc456aba9d2366a3a3249a4a7b723 100644 (file)
@@ -11055,19 +11055,20 @@ putop (instr_info *ins, const char *in_template, int sizeflag)
                  *ins->obufp++ = ' ';
                  break;
                case 'L':
-                 if (!(ins->rex & REX_W))
-                   break;
-                 *ins->obufp++ = 'a';
-                 *ins->obufp++ = 'b';
-                 *ins->obufp++ = 's';
-                 break;
+                 if (ins->rex & REX_W)
+                   {
+                     *ins->obufp++ = 'a';
+                     *ins->obufp++ = 'b';
+                     *ins->obufp++ = 's';
+                   }
+                 goto case_S;
                default:
                  abort ();
                }
            }
          else
            abort ();
-         goto case_S;
+         break;
        case 'W':
          if (l == 0)
            {