aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mips/mips.md
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@redhat.com>2004-08-24 20:04:57 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2004-08-24 20:04:57 +0000
commit886ce862cb96d58a91700af29baea916af2aae35 (patch)
tree0aa4c15426cfcf1e9087041bcda79ca3478656f0 /gcc/config/mips/mips.md
parentbe659abd840dffa23f750638381ab0f1251b735d (diff)
downloadgcc-886ce862cb96d58a91700af29baea916af2aae35.zip
gcc-886ce862cb96d58a91700af29baea916af2aae35.tar.gz
gcc-886ce862cb96d58a91700af29baea916af2aae35.tar.bz2
mips.c (mips_gen_conditional_trap): Fix mode.
* config/mips/mips.c (mips_gen_conditional_trap): Fix mode. * config/mips/mips.md (*conditional_trap[sd]i): Name previously unnamed patterns. Redefine using :GPR. Give the match_operator a mode. Use '%2' rather than '%z2' for operand 2. From-SVN: r86511
Diffstat (limited to 'gcc/config/mips/mips.md')
-rw-r--r--gcc/config/mips/mips.md26
1 files changed, 9 insertions, 17 deletions
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index 251ec68..46ec8cf 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -396,7 +396,7 @@
else
return "break";
}
- [(set_attr "type" "trap")])
+ [(set_attr "type" "trap")])
(define_expand "conditional_trap"
[(trap_if (match_operator 0 "comparison_operator"
@@ -404,7 +404,8 @@
(match_operand 1 "const_int_operand"))]
"ISA_HAS_COND_TRAP"
{
- if (operands[1] == const0_rtx)
+ if (GET_MODE_CLASS (GET_MODE (cmp_operands[0])) == MODE_INT
+ && operands[1] == const0_rtx)
{
mips_gen_conditional_trap (operands);
DONE;
@@ -413,23 +414,14 @@
FAIL;
})
-(define_insn ""
- [(trap_if (match_operator 0 "trap_comparison_operator"
- [(match_operand:SI 1 "reg_or_0_operand" "dJ")
- (match_operand:SI 2 "arith_operand" "dI")])
+(define_insn "*conditional_trap<mode>"
+ [(trap_if (match_operator:GPR 0 "trap_comparison_operator"
+ [(match_operand:GPR 1 "reg_or_0_operand" "dJ")
+ (match_operand:GPR 2 "arith_operand" "dI")])
(const_int 0))]
"ISA_HAS_COND_TRAP"
- "t%C0\t%z1,%z2"
- [(set_attr "type" "trap")])
-
-(define_insn ""
- [(trap_if (match_operator 0 "trap_comparison_operator"
- [(match_operand:DI 1 "reg_or_0_operand" "dJ")
- (match_operand:DI 2 "arith_operand" "dI")])
- (const_int 0))]
- "TARGET_64BIT && ISA_HAS_COND_TRAP"
- "t%C0\t%z1,%z2"
- [(set_attr "type" "trap")])
+ "t%C0\t%z1,%2"
+ [(set_attr "type" "trap")])
;;
;; ....................