From: J. David Anglin Date: Thu, 7 Dec 2000 01:06:47 +0000 (+0000) Subject: pa.c: Include expr.h before c-tree.h. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=becf16479872926f68706d28a3bd1de74083e530;p=platform%2Fupstream%2Fgcc.git pa.c: Include expr.h before c-tree.h. * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b731a4a..cd11dd8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +2000-11-06 J. David Anglin + + * 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 * final.c (final_addr_vec_align): Fix clipping to BIGGEST_ALIGNMENT. diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 6a4f989..e9211ee 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -34,9 +34,9 @@ Boston, MA 02111-1307, USA. */ #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" @@ -2642,7 +2642,8 @@ remove_useless_addtr_insns (insns, check_notes) /* 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)))); } } } @@ -3921,8 +3922,8 @@ print_operand (file, x, code) 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)) { @@ -3931,13 +3932,29 @@ print_operand (file, x, code) 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 (); } @@ -7046,9 +7063,11 @@ cmpib_comparison_operator (op, mode) && (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)); } diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 536692b..f920c0f 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -2052,4 +2052,6 @@ while (0) {"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}}, diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 3f6f7f7..d2f7ebf 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -1369,6 +1369,126 @@ 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.