This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH,i386] cpuid function for prefetchw
On Mon, Aug 13, 2012 at 11:45:36AM +0200, Jakub Jelinek wrote:
> On Mon, Aug 13, 2012 at 09:29:45AM +0000, Gopalasubramanian, Ganesh wrote:
> > To get the prefetchw cpuid flag, cpuid
> > function 0x80000001 needs to be called.
> > Previous to patch, function 0x7 is called.
> >
> > Bootstrapping and "make -k check" passes without failures.
> > Ok for trunk?
>
> IMHO you move it to a wrong spot, ecx bits of CPUID 0x80000001 are tested
> earlier.
>
> So I think you want this instead (bootstrap/regtest in progress):
>
> 2012-08-13 Ganesh Gopalasubramanian <Ganesh.Gopalasubramanian@amd.com>
> Jakub Jelinek <jakub@redhat.com>
>
> PR driver/54210
> * config/i386/driver-i386.c (host_detect_local_cpu): Test bit_PRFCHW
> bit of CPUID 0x80000001 %ecx instead of CPUID 7 %ecx.
> * config/i386/cpuid.h (bits_PRFCHW): Move definition to CPUID
> 0x80000001 %ecx flags.
Now bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
Jakub