[binutils-gdb] x86: fix expansion of %XV

Jan Beulich jbeulich@sourceware.org
Wed Jun 21 06:32:24 GMT 2023


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fffb10b122c58128f604ddabd421db84c99a5eaa

commit fffb10b122c58128f604ddabd421db84c99a5eaa
Author: Jan Beulich <jbeulich@suse.com>
Date:   Wed Jun 21 08:32:13 2023 +0200

    x86: fix expansion of %XV
    
    Only %LV should continue on to S handling; avoid emitting a stray 'l'
    (typically) in suffix-always mode.

Diff:
---
 opcodes/i386-dis.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 6161bf72459..15a0e1b1080 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -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)
 	    {


More information about the Binutils-cvs mailing list