OSDN Git Service

Backport from mainline
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 10 Jun 2013 18:45:02 +0000 (18:45 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 10 Jun 2013 18:45:02 +0000 (18:45 +0000)
2013-06-10  Uros Bizjak  <ubizjak@gmail.com>

* config/alpha/alpha.c (alpha_emit_xfloating_compare): Also use
cmp_code to construct REG_EQUAL note.

Backport from mainline
2013-06-05  Uros Bizjak  <ubizjak@gmail.com>

* config/alpha/alpha.c (alpha_emit_conditional_move): Swap all
GE, GT, GEU and GTU compares, modulo DImode compares with zero.

Backport from mainline
2013-05-23  Uros Bizjak  <ubizjak@gmail.com>

PR target/57379
* config/alpha/alpha.md (unspec): Add UNSPEC_XFLT_COMPARE.
* config/alpha/alpha.c (alpha_emit_xfloating_compare): Construct
REG_EQUAL note as UNSPEC_XFLT_COMPARE unspec.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@199902 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/alpha/alpha.c
gcc/config/alpha/alpha.md

index f74e049..82071ff 100644 (file)
@@ -1,3 +1,25 @@
+2013-06-07  Uros Bizjak  <ubizjak@gmail.com>
+
+       Backport from mainline
+       2013-06-10  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/alpha/alpha.c (alpha_emit_xfloating_compare): Also use
+       cmp_code to construct REG_EQUAL note.
+
+       Backport from mainline
+       2013-06-05  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/alpha/alpha.c (alpha_emit_conditional_move): Swap all
+       GE, GT, GEU and GTU compares, modulo DImode compares with zero.
+
+       Backport from mainline
+       2013-05-23  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/57379
+       * config/alpha/alpha.md (unspec): Add UNSPEC_XFLT_COMPARE.
+       * config/alpha/alpha.c (alpha_emit_xfloating_compare): Construct
+       REG_EQUAL note as UNSPEC_XFLT_COMPARE unspec.
+
 2013-06-09  Jakub Jelinek  <jakub@redhat.com>
 
        PR target/57568
index f27c08a..388e77d 100644 (file)
@@ -2658,12 +2658,12 @@ alpha_emit_conditional_move (rtx cmp, enum machine_mode mode)
       break;
 
     case GE:  case GT:  case GEU:  case GTU:
-      /* These must be swapped.  */
-      if (op1 != CONST0_RTX (cmp_mode))
-       {
-         code = swap_condition (code);
-         tem = op0, op0 = op1, op1 = tem;
-       }
+      /* These normally need swapping, but for integer zero we have
+        special patterns that recognize swapped operands.  */
+      if (cmp_mode == DImode && op1 == const0_rtx)
+       break;
+      code = swap_condition (code);
+      tem = op0, op0 = op1, op1 = tem;
       break;
 
     default:
@@ -3025,12 +3025,9 @@ alpha_emit_xfloating_compare (enum rtx_code *pcode, rtx op0, rtx op1)
   operands[1] = op1;
   out = gen_reg_rtx (DImode);
 
-  /* What's actually returned is -1,0,1, not a proper boolean value,
-     so use an EXPR_LIST as with a generic libcall instead of a 
-     comparison type expression.  */
-  note = gen_rtx_EXPR_LIST (VOIDmode, op1, NULL_RTX);
-  note = gen_rtx_EXPR_LIST (VOIDmode, op0, note);
-  note = gen_rtx_EXPR_LIST (VOIDmode, func, note);
+  /* What's actually returned is -1,0,1, not a proper boolean value.  */
+  note = gen_rtx_fmt_ee (cmp_code, VOIDmode, op0, op1);
+  note = gen_rtx_UNSPEC (DImode, gen_rtvec (1, note), UNSPEC_XFLT_COMPARE);
   alpha_emit_xfloating_libcall (func, out, operands, 2, note);
 
   return out;
index e715cc8..bab04e4 100644 (file)
@@ -25,6 +25,7 @@
 ;; Uses of UNSPEC in this file:
 
 (define_c_enum "unspec" [
+  UNSPEC_XFLT_COMPARE
   UNSPEC_ARG_HOME
   UNSPEC_LDGP1
   UNSPEC_INSXH