* pa.c: Include expr.h before c-tree.h.
(remove_useless_addtr_insns): Use reverse_condition_maybe_unordered
instead of reverse_condition.
(print_operand): Correct predicates for GT, GE, LT and LE. Add
predicates for LTGT, UNLE, UNLT, UNGE, UNGT, UNEQ, UNORDERED and
ORDERED.
(cmpib_comparison_operator): Add GEU and LTU codes.
* pa.h (PREDICATE_CODES): Add codes for cmpib_comparison_operator.
* pa.md (bltgt, bunle, bunlt, bunge, bungt, buneq, bunordered,
bordered): New float conditional branch patterns.
From-SVN: r38082
+2000-11-06 J. David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * pa.c: Include expr.h before c-tree.h.
+ (remove_useless_addtr_insns): Use reverse_condition_maybe_unordered
+ instead of reverse_condition.
+ (print_operand): Correct predicates for GT, GE, LT and LE. Add
+ predicates for LTGT, UNLE, UNLT, UNGE, UNGT, UNEQ, UNORDERED and
+ ORDERED.
+ (cmpib_comparison_operator): Add GEU and LTU codes.
+ * pa.h (PREDICATE_CODES): Add codes for cmpib_comparison_operator.
+ * pa.md (bltgt, bunle, bunlt, bunge, bungt, buneq, bunordered,
+ bordered): New float conditional branch patterns.
+
Wed Dec 6 21:03:41 2000 J"orn Rennecke <amylaar@redhat.com>
* final.c (final_addr_vec_align): Fix clipping to BIGGEST_ALIGNMENT.
#include "flags.h"
#include "tree.h"
#include "reload.h"
+#include "expr.h"
#include "c-tree.h"
#include "function.h"
-#include "expr.h"
#include "obstack.h"
#include "toplev.h"
#include "ggc.h"
/* Reverse our condition. */
tmp = PATTERN (insn);
PUT_CODE (XEXP (tmp, 1),
- reverse_condition (GET_CODE (XEXP (tmp, 1))));
+ reverse_condition_maybe_unordered (GET_CODE (XEXP (tmp,
+ 1))));
}
}
}
abort ();
}
return;
- /* For floating point comparisons. Need special conditions to deal
- with NaNs properly. */
+ /* For floating point comparisons. Note that the output predicates are the
+ complement of the desired mode. */
case 'Y':
switch (GET_CODE (x))
{
case NE:
fputs ("=", file); break;
case GT:
- fputs ("<=", file); break;
+ fputs ("!>", file); break;
case GE:
- fputs ("<", file); break;
+ fputs ("!>=", file); break;
case LT:
- fputs (">=", file); break;
+ fputs ("!<", file); break;
case LE:
+ fputs ("!<=", file); break;
+ case LTGT:
+ fputs ("!<>", file); break;
+ case UNLE:
fputs (">", file); break;
+ case UNLT:
+ fputs (">=", file); break;
+ case UNGE:
+ fputs ("<", file); break;
+ case UNGT:
+ fputs ("<=", file); break;
+ case UNEQ:
+ fputs ("<>", file); break;
+ case UNORDERED:
+ fputs ("<=>", file); break;
+ case ORDERED:
+ fputs ("!<=>", file); break;
default:
abort ();
}
&& (GET_CODE (op) == EQ
|| GET_CODE (op) == NE
|| GET_CODE (op) == GT
- || GET_CODE (op) == GE
|| GET_CODE (op) == GTU
+ || GET_CODE (op) == GE
+ || GET_CODE (op) == GEU
|| GET_CODE (op) == LT
+ || GET_CODE (op) == LTU
|| GET_CODE (op) == LE
|| GET_CODE (op) == LEU));
}
{"basereg_operand", {REG}}, \
{"div_operand", {REG, CONST_INT}}, \
{"ireg_operand", {REG}}, \
+ {"cmpib_comparison_operator", {EQ, NE, LT, LTU, LE, LEU, \
+ GT, GTU, GE, GEU}}, \
{"movb_comparison_operator", {EQ, NE, LT, GE}},
operands[2] = hppa_compare_op1;
}")
+(define_expand "bltgt"
+ [(set (pc)
+ (if_then_else (ltgt (match_dup 1) (match_dup 2))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+ ""
+ "
+{
+ if (hppa_branch_type == CMP_SI)
+ FAIL;
+ emit_insn (gen_cmp_fp (LTGT, hppa_compare_op0, hppa_compare_op1));
+ emit_bcond_fp (NE, operands[0]);
+ DONE;
+}")
+
+(define_expand "bunle"
+ [(set (pc)
+ (if_then_else (unle (match_dup 1) (match_dup 2))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+ ""
+ "
+{
+ if (hppa_branch_type == CMP_SI)
+ FAIL;
+ emit_insn (gen_cmp_fp (UNLE, hppa_compare_op0, hppa_compare_op1));
+ emit_bcond_fp (NE, operands[0]);
+ DONE;
+}")
+
+(define_expand "bunlt"
+ [(set (pc)
+ (if_then_else (unlt (match_dup 1) (match_dup 2))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+ ""
+ "
+{
+ if (hppa_branch_type == CMP_SI)
+ FAIL;
+ emit_insn (gen_cmp_fp (UNLT, hppa_compare_op0, hppa_compare_op1));
+ emit_bcond_fp (NE, operands[0]);
+ DONE;
+}")
+
+(define_expand "bunge"
+ [(set (pc)
+ (if_then_else (unge (match_dup 1) (match_dup 2))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+ ""
+ "
+{
+ if (hppa_branch_type == CMP_SI)
+ FAIL;
+ emit_insn (gen_cmp_fp (UNGE, hppa_compare_op0, hppa_compare_op1));
+ emit_bcond_fp (NE, operands[0]);
+ DONE;
+}")
+
+(define_expand "bungt"
+ [(set (pc)
+ (if_then_else (ungt (match_dup 1) (match_dup 2))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+ ""
+ "
+{
+ if (hppa_branch_type == CMP_SI)
+ FAIL;
+ emit_insn (gen_cmp_fp (UNGT, hppa_compare_op0, hppa_compare_op1));
+ emit_bcond_fp (NE, operands[0]);
+ DONE;
+}")
+
+(define_expand "buneq"
+ [(set (pc)
+ (if_then_else (uneq (match_dup 1) (match_dup 2))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+ ""
+ "
+{
+ if (hppa_branch_type == CMP_SI)
+ FAIL;
+ emit_insn (gen_cmp_fp (UNEQ, hppa_compare_op0, hppa_compare_op1));
+ emit_bcond_fp (NE, operands[0]);
+ DONE;
+}")
+
+(define_expand "bunordered"
+ [(set (pc)
+ (if_then_else (unordered (match_dup 1) (match_dup 2))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+ ""
+ "
+{
+ if (hppa_branch_type == CMP_SI)
+ FAIL;
+ emit_insn (gen_cmp_fp (UNORDERED, hppa_compare_op0, hppa_compare_op1));
+ emit_bcond_fp (NE, operands[0]);
+ DONE;
+}")
+
+(define_expand "bordered"
+ [(set (pc)
+ (if_then_else (ordered (match_dup 1) (match_dup 2))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+ ""
+ "
+{
+ if (hppa_branch_type == CMP_SI)
+ FAIL;
+ emit_insn (gen_cmp_fp (ORDERED, hppa_compare_op0, hppa_compare_op1));
+ emit_bcond_fp (NE, operands[0]);
+ DONE;
+}")
+
;; Match the branch patterns.