This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] add operand constraint for ix86 prefetch; fixes PR target/5379
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: Richard Henderson <rth at redhat dot com>, Janis Johnson <janis187 at us dot ibm dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 22 Jan 2002 13:41:37 -0800
- Subject: Re: [PATCH] add operand constraint for ix86 prefetch; fixes PR target/5379
- References: <20020121105944.B1890@us.ibm.com> <20020121161528.R19335@redhat.com>
OK, here's what I checked in, after making the corrections Richard
suggested and another bootstrap and test run on i686-pc-linux-gnu.
2002-01-22 Janis Johnson <janis187@us.ibm.com>
PR target/5379
* config/i386/i386.md (prefetch_sse): Specify "p" as a constraint
for the address operand.
testsuite:
PR target/5379
* gcc.dg/20020122-2.c: New test.
Index: config/i386/i386.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v
retrieving revision 1.331
retrieving revision 1.332
diff -u -p -r1.331 -r1.332
--- i386.md 2002/01/16 17:16:42 1.331
+++ i386.md 2002/01/22 21:19:27 1.332
@@ -19624,7 +19624,7 @@
})
(define_insn "*prefetch_sse"
- [(prefetch (match_operand:SI 0 "address_operand" "")
+ [(prefetch (match_operand:SI 0 "address_operand" "p")
(const_int 0)
(match_operand:SI 1 "const_int_operand" ""))]
"TARGET_PREFETCH_SSE"
--- /dev/null Tue May 23 09:27:54 2000
+++ gcc.dg/20020122-2.c Tue Jan 22 08:53:30 2002
@@ -0,0 +1,41 @@
+/* This test was supplied with PR target/5379. It caused the compiler
+ to get a segmentation fault. */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -fprefetch-loop-arrays -w" } */
+/* { dg-options "-O2 -fprefetch-loop-arrays -march=athlon" { target i?86-*-* } } */
+
+extern int access( char* );
+extern int a();
+char* foocp();
+
+void
+_KDE_IceGetPoValidAuthIndices (protocol_name, num_indices_ret, indices_ret)
+const char *protocol_name;
+int *num_indices_ret;
+int *indices_ret;
+{
+ int auth_file;
+ char *filename;
+ int index_ret, i;
+
+ if (!(filename = foocp ()))
+ return;
+
+ if (access (filename))
+ return;
+
+ if (auth_file = access (filename))
+ return;
+
+ for (;;)
+ {
+ if (strcmp (protocol_name, protocol_name) == 0 )
+ {
+ for (i = 0; i < *num_indices_ret; i++)
+ if (index_ret == indices_ret[i])
+ break;
+ }
+ }
+}
+