This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] x86: drop redundant SYSCALL/SYSRET templates
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jan Beulich <jbeulich at suse dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Mon, 11 Nov 2019 09:15:22 -0800
- Subject: Re: [PATCH] x86: drop redundant SYSCALL/SYSRET templates
- References: <34aba8af-9287-beea-03b3-7442134f1a31@suse.com>
On Mon, Nov 11, 2019 at 4:01 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> The Cpu64 forms are no different in their attributes except for the CPU
> flags; there's no need to key these off of anything other than
> CpuSYSCALL even for the 64-bit forms. Dropping these improves the
> diagnostic on SYSRETQ used in 32-bit code from "unsupported instruction
> `sysret'" to "invalid instruction suffix for `sysret'".
>
> opcodes/
> 2019-11-XX Jan Beulich <jbeulich@suse.com>
>
> * i386-opc.tbl (syscall, sysret): Drop Cpu64 forms.
> * i386-tbl.h: Re-generate.
>
> --- a/opcodes/i386-opc.tbl
> +++ b/opcodes/i386-opc.tbl
> @@ -2797,9 +2797,7 @@ pswapd, 2, 0xf0f, 0xbb, 2, Cpu3dnowA, Mo
>
> // AMD extensions.
> syscall, 0, 0xf05, None, 2, CpuSYSCALL, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { 0 }
> -syscall, 0, 0xf05, None, 2, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { 0 }
> sysret, 0, 0xf07, None, 2, CpuSYSCALL, DefaultSize|No_bSuf|No_wSuf|No_sSuf|No_ldSuf, { 0 }
> -sysret, 0, 0xf07, None, 2, Cpu64, DefaultSize|No_bSuf|No_wSuf|No_sSuf|No_ldSuf, { 0 }
> swapgs, 0, 0xf01f8, None, 3, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { 0 }
> rdtscp, 0, 0xf01f9, None, 3, CpuRdtscp, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf, { 0 }
>
Can you add a testcase?
Thanks.
--
H.J.