]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2003-08-19 Chris Demetriou <cgd@broadcom.com>
authorcgd <cgd@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 19 Aug 2003 18:09:06 +0000 (18:09 +0000)
committercgd <cgd@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 19 Aug 2003 18:09:06 +0000 (18:09 +0000)
        * config/mips/mips.md: Adjust SI-mode "trap_if" instruction
        to use better predicates and constraints.  Define new
        instruction to handle "trap_if" with DI-mode arguments.
        (conditional_trap): FAIL if trap code is not 0.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70570 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/mips/mips.md

index f323db25c7b6433fa5e6e1270e654c04a6629311..0f48a0d4eaa50546a429e27d364e41905d64f443 100644 (file)
@@ -1,3 +1,10 @@
+2003-08-19  Chris Demetriou  <cgd@broadcom.com>
+
+       * config/mips/mips.md: Adjust SI-mode "trap_if" instruction
+       to use better predicates and constraints.  Define new
+       instruction to handle "trap_if" with DI-mode arguments.
+       (conditional_trap): FAIL if trap code is not 0.
+
 2003-08-19  Andrew Pinski  <pinskia@physics.uc.edu>
 
        * config/i386/i386.c (legitimate_pic_address_disp_p): Change the
index 6e6deb8fcba6a4223471f651fca14fa42ed903f9..832140e409e35809370f6d796e5cc2892eee69f6 100644 (file)
            (match_operand 1 "const_int_operand" ""))]
   "ISA_HAS_COND_TRAP"
 {
-  mips_gen_conditional_trap (operands);
-  DONE;
+  if (operands[1] == const0_rtx)
+    {
+      mips_gen_conditional_trap (operands);
+      DONE;
+    }
+  else
+    FAIL;
 })
 
 (define_insn ""
   [(trap_if (match_operator 0 "trap_cmp_op"
-                            [(match_operand:SI 1 "reg_or_0_operand" "d")
-                             (match_operand:SI 2 "nonmemory_operand" "dI")])
+                            [(match_operand:SI 1 "reg_or_0_operand" "dJ")
+                             (match_operand:SI 2 "arith_operand" "dI")])
            (const_int 0))]
   "ISA_HAS_COND_TRAP"
   "t%C0\t%z1,%z2")
+
+(define_insn ""
+  [(trap_if (match_operator 0 "trap_cmp_op"
+                            [(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")
 \f
 ;;
 ;;  ....................