This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] x86: drop redundant SYSCALL/SYSRET templates


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]