From 5b316d90e4ec9845a890fd21ad86cf1043fb2ca3 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 5 Oct 2020 05:27:58 -0700 Subject: x86-64: Always display suffix for %LQ in 64bit In 64bit, assembler generates a warning for "sysret": $ echo sysret | as --64 -o x.o - {standard input}: Assembler messages: {standard input}:1: Warning: no instruction mnemonic suffix given and no register operands; using default for `sysret' Always display suffix for %LQ in 64bit to display "sysretl". gas/ PR binutils/26704 * testsuite/gas/i386/noreg64-data16.d: Expect sysretl instead of sysret. * testsuite/gas/i386/noreg64.d: Likewise. * testsuite/gas/i386/x86-64-intel64.d: Likewise. * testsuite/gas/i386/x86-64-opcode.d: Likewise. opcodes/ PR binutils/26704 * i386-dis.c (putop): Always display suffix for %LQ in 64bit. --- opcodes/ChangeLog | 5 +++++ opcodes/i386-dis.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'opcodes') diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index f1b4273..3c74fbf 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,5 +1,10 @@ 2020-10-05 H.J. Lu + PR binutils/26704 + * i386-dis.c (putop): Always display suffix for %LQ in 64bit. + +2020-10-05 H.J. Lu + PR binutils/26705 * i386-dis.c (print_insn): Clear modrm if not needed. (putop): Check need_modrm for modrm.mod != 3. Don't check diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index f4f35bc..4d8f4f4 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -10870,7 +10870,7 @@ putop (const char *in_template, int sizeflag) USED_REX (REX_W); *obufp++ = 'q'; } - else if((address_mode == mode_64bit && need_modrm && cond) + else if((address_mode == mode_64bit && cond) || (sizeflag & SUFFIX_ALWAYS)) *obufp++ = intel_syntax? 'd' : 'l'; } -- cgit v1.1