This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: preliminary patch: prefetch support for i386
- From: Richard Henderson <rth at redhat dot com>
- To: Janis Johnson <janis187 at us dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 29 Nov 2001 18:59:15 -0800
- Subject: Re: preliminary patch: prefetch support for i386
- References: <20011129130113.A4811@us.ibm.com>
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~