]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
opcodes/x86: fix minor missed styling case
authorAndrew Burgess <aburgess@redhat.com>
Tue, 23 Jul 2024 16:10:22 +0000 (17:10 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Wed, 24 Jul 2024 13:32:35 +0000 (14:32 +0100)
I noticed that the x86 instruction:

  sar    $1,%rsi

would fail to style the '$0x1' as an immediate.  This commit fixes
that case.

opcodes/i386-dis.c

index bc141f317707569584492e154748fb25c83b3457..59ec771369ab68de93f4cc622b6488824037f7c1 100644 (file)
@@ -12415,9 +12415,9 @@ OP_I (instr_info *ins, int bytemode, int sizeflag)
       break;
     case const_1_mode:
       if (ins->intel_syntax)
-       oappend (ins, "1");
+       oappend_with_style (ins, "1", dis_style_immediate);
       else
-       oappend (ins, "$1");
+       oappend_with_style (ins, "$1", dis_style_immediate);
       return true;
     default:
       oappend (ins, INTERNAL_DISASSEMBLER_ERROR);