aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mips/mips.md
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.md
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.md')
-rw-r--r--gcc/config/mips/mips.md79
1 files changed, 17 insertions, 62 deletions
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index 46ec8cf..b0179d9 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -5975,73 +5975,28 @@ beq\t%2,%.,1b\;\
;;
-(define_expand "prefetch"
- [(prefetch (match_operand 0 "address_operand")
- (match_operand 1 "const_int_operand")
- (match_operand 2 "const_int_operand"))]
- "ISA_HAS_PREFETCH"
-{
- if (symbolic_operand (operands[0], GET_MODE (operands[0])))
- operands[0] = force_reg (GET_MODE (operands[0]), operands[0]);
-})
-
-(define_insn "prefetch_si_address"
- [(prefetch (plus:SI (match_operand:SI 0 "register_operand" "r")
- (match_operand:SI 3 "const_int_operand" "I"))
- (match_operand:SI 1 "const_int_operand" "n")
- (match_operand:SI 2 "const_int_operand" "n"))]
- "ISA_HAS_PREFETCH && Pmode == SImode"
- { return mips_emit_prefetch (operands); }
- [(set_attr "type" "prefetch")])
-
-(define_insn "prefetch_indexed_si"
- [(prefetch (plus:SI (match_operand:SI 0 "register_operand" "r")
- (match_operand:SI 3 "register_operand" "r"))
- (match_operand:SI 1 "const_int_operand" "n")
- (match_operand:SI 2 "const_int_operand" "n"))]
- "ISA_HAS_PREFETCHX && TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT && Pmode == SImode"
- { return mips_emit_prefetch (operands); }
- [(set_attr "type" "prefetchx")])
-
-(define_insn "prefetch_si"
- [(prefetch (match_operand:SI 0 "register_operand" "r")
- (match_operand:SI 1 "const_int_operand" "n")
- (match_operand:SI 2 "const_int_operand" "n"))]
- "ISA_HAS_PREFETCH && Pmode == SImode"
-{
- operands[3] = const0_rtx;
- return mips_emit_prefetch (operands);
+(define_insn "prefetch"
+ [(prefetch (match_operand:QI 0 "address_operand" "p")
+ (match_operand 1 "const_int_operand" "n")
+ (match_operand 2 "const_int_operand" "n"))]
+ "ISA_HAS_PREFETCH && TARGET_EXPLICIT_RELOCS"
+{
+ operands[1] = mips_prefetch_cookie (operands[1], operands[2]);
+ return "pref\t%1,%a0";
}
[(set_attr "type" "prefetch")])
-(define_insn "prefetch_di_address"
- [(prefetch (plus:DI (match_operand:DI 0 "register_operand" "r")
- (match_operand:DI 3 "const_int_operand" "I"))
- (match_operand:DI 1 "const_int_operand" "n")
- (match_operand:DI 2 "const_int_operand" "n"))]
- "ISA_HAS_PREFETCH && Pmode == DImode"
- { return mips_emit_prefetch (operands); }
- [(set_attr "type" "prefetch")])
-
-(define_insn "prefetch_indexed_di"
- [(prefetch (plus:DI (match_operand:DI 0 "register_operand" "r")
- (match_operand:DI 3 "register_operand" "r"))
- (match_operand:DI 1 "const_int_operand" "n")
- (match_operand:DI 2 "const_int_operand" "n"))]
- "ISA_HAS_PREFETCHX && TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT && Pmode == DImode"
- { return mips_emit_prefetch (operands); }
- [(set_attr "type" "prefetchx")])
-
-(define_insn "prefetch_di"
- [(prefetch (match_operand:DI 0 "register_operand" "r")
- (match_operand:DI 1 "const_int_operand" "n")
- (match_operand:DI 2 "const_int_operand" "n"))]
- "ISA_HAS_PREFETCH && Pmode == DImode"
+(define_insn "*prefetch_indexed_<mode>"
+ [(prefetch (plus:P (match_operand:P 0 "register_operand" "d")
+ (match_operand:P 1 "register_operand" "d"))
+ (match_operand 2 "const_int_operand" "n")
+ (match_operand 3 "const_int_operand" "n"))]
+ "ISA_HAS_PREFETCHX && TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT"
{
- operands[3] = const0_rtx;
- return mips_emit_prefetch (operands);
+ operands[2] = mips_prefetch_cookie (operands[2], operands[3]);
+ return "prefx\t%2,%1(%0)";
}
- [(set_attr "type" "prefetch")])
+ [(set_attr "type" "prefetchx")])
(define_insn "nop"
[(const_int 0)]