aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mips/mips.c
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@redhat.com>2004-08-24 20:24:00 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2004-08-24 20:24:00 +0000
commit4767c57080ab5f33eb671904e13b10faf3bc8bdf (patch)
tree053c41789771654d6da9f5340f3288259603d42a /gcc/config/mips/mips.c
parenta657c98a58e32c0112e9800a82256472e6ee49eb (diff)
downloadgcc-4767c57080ab5f33eb671904e13b10faf3bc8bdf.zip
gcc-4767c57080ab5f33eb671904e13b10faf3bc8bdf.tar.gz
gcc-4767c57080ab5f33eb671904e13b10faf3bc8bdf.tar.bz2
* gcc.c-torture/compile/20040824-1.c: New test.
From-SVN: r86513
Diffstat (limited to 'gcc/config/mips/mips.c')
-rw-r--r--gcc/config/mips/mips.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 9f0bf68..022d7b4 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -4836,6 +4836,10 @@ print_operand_address (FILE *file, rtx x)
return;
case ADDRESS_CONST_INT:
+ output_addr_const (file, x);
+ fprintf (file, "(%s)", reg_names[0]);
+ return;
+
case ADDRESS_SYMBOLIC:
output_addr_const (file, x);
return;
@@ -9080,26 +9084,22 @@ mips_multipass_dfa_lookahead (void)
return 0;
}
+/* Given that we have an rtx of the form (prefetch ... WRITE LOCALITY),
+ return the first operand of the associated "pref" or "prefx" insn. */
-const char *
-mips_emit_prefetch (rtx *operands)
-{
- int write = INTVAL (operands[1]);
- int locality = INTVAL (operands[2]);
- int indexed = GET_CODE (operands[3]) == REG;
- int code;
- char buffer[30];
-
- if (locality <= 0)
- code = (write ? 5 : 4); /* store_streamed / load_streamed. */
- else if (locality <= 2)
- code = (write ? 1 : 0); /* store / load. */
- else
- code = (write ? 7 : 6); /* store_retained / load_retained. */
+rtx
+mips_prefetch_cookie (rtx write, rtx locality)
+{
+ /* store_streamed / load_streamed. */
+ if (INTVAL (locality) <= 0)
+ return GEN_INT (INTVAL (write) + 4);
+
+ /* store / load. */
+ if (INTVAL (locality) <= 2)
+ return write;
- sprintf (buffer, "%s\t%d,%%3(%%0)", indexed ? "prefx" : "pref", code);
- output_asm_insn (buffer, operands);
- return "";
+ /* store_retained / load_retained. */
+ return GEN_INT (INTVAL (write) + 6);
}
#include "gt-mips.h"