This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] backport rs6000 fix for target/35620 to 4.3 branch


This patch fixes a bug that is latent in the 4.3 compiler.  Tested on
powerpc64-linux with -m32/-m64.  OK for the 4.3 branch?

2008-09-18  Janis Johnson  <janis187@us.ibm.com>

	Backport from mainline:
	2008-04-03  Janis Johnson  <janis187@us.ibm.com>

	PR target/35713
	* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Use integer
	constants of the appropriate size for runtime calculations.

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 140235)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -6786,7 +6786,8 @@ rs6000_gimplify_va_arg (tree valist, tre
       else if (reg == fpr && TYPE_MODE (type) == TDmode)
 	{
 	  regalign = 1;
-	  t = build2 (BIT_IOR_EXPR, TREE_TYPE (reg), reg, size_int (1));
+	  t = build2 (BIT_IOR_EXPR, TREE_TYPE (reg), reg,
+		      build_int_cst (TREE_TYPE (reg), 1));
 	  u = build2 (MODIFY_EXPR, void_type_node, reg, t);
 	}
 
@@ -6826,7 +6827,8 @@ rs6000_gimplify_va_arg (tree valist, tre
 	{
 	  /* Ensure that we don't find any more args in regs.
 	     Alignment has taken care of for special cases.  */
-	  t = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (reg), reg, size_int (8));
+	  t = build_gimple_modify_stmt (reg,
+					build_int_cst (TREE_TYPE (reg), 8));
 	  gimplify_and_add (t, pre_p);
 	}
     }



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]