This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch applied to sh.md: add prefetch pattern
- From: DJ Delorie <dj at redhat dot com>
- To: joern dot rennecke at superh dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 20 May 2004 17:25:09 -0400
- Subject: Re: patch applied to sh.md: add prefetch pattern
- References: <200311121409.hACE9UV31825@linsvr2.uk.superh.com>
One of my internal builds is failing prefetch tests because this "new"
pattern faults on an invalid address. The GCC docs say that this
pattern must not fault on invalid addresses. Is the pattern wrong, or
is the simulator wrong?
> Index: ChangeLog
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v
> retrieving revision 2.1723
> diff -p -r2.1723 ChangeLog
> *** ChangeLog 12 Nov 2003 07:24:09 -0000 2.1723
> --- ChangeLog 12 Nov 2003 14:04:40 -0000
> ***************
> *** 1,3 ****
> --- 1,7 ----
> + 2003-11-12 J"orn Rennecke <joern.rennecke@superh.com>
> +
> + * config/sh/sh.md (prefetch): New pattern.
> +
> 2003-11-11 Eric Christopher <echristo@redhat.com>
>
> * reload1.c (reload): Verify that addresses for
> Index: config/sh/sh.md
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.md,v
> retrieving revision 1.160
> diff -p -r1.160 sh.md
> *** config/sh/sh.md 10 Oct 2003 21:28:55 -0000 1.160
> --- config/sh/sh.md 12 Nov 2003 14:04:40 -0000
> *************** mov.l\\t1f,r0\\n\\
> *** 10689,10694 ****
> --- 10689,10707 ----
> "byterev %1, %0"
> [(set_attr "type" "arith_media")])
>
> + (define_insn "prefetch"
> + [(prefetch (match_operand:QI 0 "address_operand" "p")
> + (match_operand:SI 1 "const_int_operand" "n")
> + (match_operand:SI 2 "const_int_operand" "n"))]
> + "TARGET_SHMEDIA"
> + "*
> + {
> + operands[0] = gen_rtx_MEM (QImode, operands[0]);
> + output_asm_insn (\"ld%M0.b %m0,r63\", operands);
> + return \"\";
> + }"
> + [(set_attr "type" "other")])
> +
> ;; The following description models the
> ;; SH4 pipeline using the DFA based scheduler.
> ;; The DFA based description is better way to model
>