OSDN Git Service

gcc/
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Sep 2011 19:38:20 +0000 (19:38 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Sep 2011 19:38:20 +0000 (19:38 +0000)
* config/mips/mips.c (mips_gimplify_va_arg_expr): Unshare off.
Fix the type of the BIT_AND_EXPR.

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

gcc/ChangeLog
gcc/config/mips/mips.c

index c8c9872..08dd4a4 100644 (file)
@@ -1,3 +1,8 @@
+2011-09-05  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * config/mips/mips.c (mips_gimplify_va_arg_expr): Unshare off.
+       Fix the type of the BIT_AND_EXPR.
+
 2011-09-05  David S. Miller  <davem@davemloft.net>
 
        * config.host: Add driver-sparc.o and sparc/x-sparc on
 2011-09-05  David S. Miller  <davem@davemloft.net>
 
        * config.host: Add driver-sparc.o and sparc/x-sparc on
index f5c4cbe..a5d1eed 100644 (file)
@@ -5601,7 +5601,7 @@ mips_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
        }
 
       /* [2] Emit code to branch if off == 0.  */
        }
 
       /* [2] Emit code to branch if off == 0.  */
-      t = build2 (NE_EXPR, boolean_type_node, off,
+      t = build2 (NE_EXPR, boolean_type_node, unshare_expr (off),
                  build_int_cst (TREE_TYPE (off), 0));
       addr = build3 (COND_EXPR, ptr_type_node, t, NULL_TREE, NULL_TREE);
 
                  build_int_cst (TREE_TYPE (off), 0));
       addr = build3 (COND_EXPR, ptr_type_node, t, NULL_TREE, NULL_TREE);
 
@@ -5624,7 +5624,7 @@ mips_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
          /* [9] Emit: ovfl = ((intptr_t) ovfl + osize - 1) & -osize.  */
          t = fold_build_pointer_plus_hwi (unshare_expr (ovfl), osize - 1);
          u = build_int_cst (TREE_TYPE (t), -osize);
          /* [9] Emit: ovfl = ((intptr_t) ovfl + osize - 1) & -osize.  */
          t = fold_build_pointer_plus_hwi (unshare_expr (ovfl), osize - 1);
          u = build_int_cst (TREE_TYPE (t), -osize);
-         t = build2 (BIT_AND_EXPR, sizetype, t, u);
+         t = build2 (BIT_AND_EXPR, TREE_TYPE (t), t, u);
          align = build2 (MODIFY_EXPR, TREE_TYPE (ovfl),
                          unshare_expr (ovfl), t);
        }
          align = build2 (MODIFY_EXPR, TREE_TYPE (ovfl),
                          unshare_expr (ovfl), t);
        }