This is the mail archive of the gcc-patches@gcc.gnu.org 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: preliminary patch: prefetch support for i386


On Thu, Nov 29, 2001 at 01:01:13PM -0800, Janis Johnson wrote:
> +#define TARGET_PREFETCH_SSE ((x86_prefetch_sse & CPUMASK) || \
> +  TARGET_SSE || TARGET_3DNOW_A)
> +#define TARGET_PREFETCH_3DNOW ((x86_prefetch_3dnow & CPUMASK) || TARGET_3DNOW)

Incorrect -- you want to use ix86_arch not ix86_cpu.

Probably should just leave it as (TARGET_SSE || TARGET_3DNOW_A)
for now.

> +      switch (locality)
> +	{
> +	  case 0:	/* No temporal locality.  */
> +	    i = 0;
> +	    break;
> +	  case 1:	/* Lowest level of temporal locality.  */
> +	    i = 3;
> +	    break;

Should just re-order the elements in prefetch_sse.  Less
confusing that way.  There's a user-level header file that
for some reason never got contributed, xmmintrin.h, that
contains defines for these constants.

>  (define_insn "prefetch_3dnow"
> +  [(prefetch (match_operand:SI 0 "address_operand" "p")
> +	     (match_operand:SI 1 "const_int_operand" "n")
> +	     (const_int 0))]

Shouldn't that be (const_int 3)?  I forget how 3dnow works...


r~


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