This is the mail archive of the mailing list for the GCC 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: __builtin_prefetch() question

On Sun, May 26, 2002 at 11:41:11AM +0200, Guillermo Ballester Valor wrote:
> Hi,
> On Dom 26 May 2002 11:30, Bryce McKinlay wrote:
> > Guillermo Ballester Valor wrote:
> > >My question is: does __builtin_prefetch() in GCC 3.1 actually insert any
> > >prefetch hint for pentium3 target? or it does nothing with it?
> > >
> > >I listed assembler outputs with -march=pentium3 (and some prefetch calls)
> > > and I can't see any prefetch code, and diffs show me no differences with
> > > __builtin_prefetch() calls and without it.
> >
> > Try -mcpu=pentium3
> >
> I've tried all combinations of '-mcpu=pentium3' and '-march=pentium3' without 
> success. I also read in gcc info that -march=CPU-TYPE implies -mcpu=CPU-TYPE.
> Guillermo

-mcpu=pentium3 works for me with GCC 3.1, and it doesn't require the use
of -O2.

See the comments in gcc/testsuite/gcc.misc-tests/i386-prefetch.exp about
which prefetch instructions are expected to be generated for various x86
variants.  Try compiling the test i386-pf-sse-1.c from that directory;
it should generate a variety of prefetch instructions.


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