Re: [PATCH] x86: Compile CPUID functions with -mgeneral-regs-only

2021-06-25 Thread Uros Bizjak via Gcc-patches
On Fri, Jun 25, 2021 at 4:51 AM Hongtao Liu wrote: > > On Fri, Jun 25, 2021 at 12:13 AM Uros Bizjak via Gcc-patches > wrote: > > > > On Thu, Jun 24, 2021 at 2:12 PM H.J. Lu wrote: > > > > > > CPUID functions are used to detect CPU features. If vector ISAs > > > are enabled, compiler is free to

Re: [PATCH] x86: Compile CPUID functions with -mgeneral-regs-only

2021-06-24 Thread Hongtao Liu via Gcc-patches
On Fri, Jun 25, 2021 at 12:13 AM Uros Bizjak via Gcc-patches wrote: > > On Thu, Jun 24, 2021 at 2:12 PM H.J. Lu wrote: > > > > CPUID functions are used to detect CPU features. If vector ISAs > > are enabled, compiler is free to use them in these functions. Add > > __attribute__

Re: [PATCH] x86: Compile CPUID functions with -mgeneral-regs-only

2021-06-24 Thread H.J. Lu via Gcc-patches
On Thu, Jun 24, 2021 at 9:12 AM Uros Bizjak wrote: > > On Thu, Jun 24, 2021 at 2:12 PM H.J. Lu wrote: > > > > CPUID functions are used to detect CPU features. If vector ISAs > > are enabled, compiler is free to use them in these functions. Add > > __attribute__ ((target("general-regs-only")))

Re: [PATCH] x86: Compile CPUID functions with -mgeneral-regs-only

2021-06-24 Thread Uros Bizjak via Gcc-patches
On Thu, Jun 24, 2021 at 2:12 PM H.J. Lu wrote: > > CPUID functions are used to detect CPU features. If vector ISAs > are enabled, compiler is free to use them in these functions. Add > __attribute__ ((target("general-regs-only"))) to CPUID functions > to avoid vector instructions. These

Re: [PATCH] x86: Compile CPUID functions with -mgeneral-regs-only

2021-06-24 Thread H.J. Lu via Gcc-patches
On Thu, Jun 24, 2021 at 5:47 AM Richard Biener wrote: > > On Thu, Jun 24, 2021 at 2:42 PM H.J. Lu wrote: > > > > On Thu, Jun 24, 2021 at 5:35 AM Richard Biener > > wrote: > > > > > > On Thu, Jun 24, 2021 at 2:13 PM H.J. Lu via Gcc-patches > > > wrote: > > > > > > > > CPUID functions are used

Re: [PATCH] x86: Compile CPUID functions with -mgeneral-regs-only

2021-06-24 Thread Richard Biener via Gcc-patches
On Thu, Jun 24, 2021 at 2:42 PM H.J. Lu wrote: > > On Thu, Jun 24, 2021 at 5:35 AM Richard Biener > wrote: > > > > On Thu, Jun 24, 2021 at 2:13 PM H.J. Lu via Gcc-patches > > wrote: > > > > > > CPUID functions are used to detect CPU features. If vector ISAs > > > are enabled, compiler is free

Re: [PATCH] x86: Compile CPUID functions with -mgeneral-regs-only

2021-06-24 Thread H.J. Lu via Gcc-patches
On Thu, Jun 24, 2021 at 5:35 AM Richard Biener wrote: > > On Thu, Jun 24, 2021 at 2:13 PM H.J. Lu via Gcc-patches > wrote: > > > > CPUID functions are used to detect CPU features. If vector ISAs > > are enabled, compiler is free to use them in these functions. Add > > __attribute__

Re: [PATCH] x86: Compile CPUID functions with -mgeneral-regs-only

2021-06-24 Thread Richard Biener via Gcc-patches
On Thu, Jun 24, 2021 at 2:13 PM H.J. Lu via Gcc-patches wrote: > > CPUID functions are used to detect CPU features. If vector ISAs > are enabled, compiler is free to use them in these functions. Add > __attribute__ ((target("general-regs-only"))) to CPUID functions > to avoid vector

[PATCH] x86: Compile CPUID functions with -mgeneral-regs-only

2021-06-24 Thread H.J. Lu via Gcc-patches
CPUID functions are used to detect CPU features. If vector ISAs are enabled, compiler is free to use them in these functions. Add __attribute__ ((target("general-regs-only"))) to CPUID functions to avoid vector instructions. gcc/ PR target/101185 * config/i386/cpuid.h