Patchwork RFA: Fix bootstrap/46358

login
register
mail settings
Submitter Joern Rennecke
Date Nov. 8, 2010, 5:53 p.m.
Message ID <20101108125352.9ijcm6xis8cwwckc-nzlynne@webmail.spamcop.net>
Download mbox | patch
Permalink /patch/70438/
State New
Headers show

Comments

Joern Rennecke - Nov. 8, 2010, 5:53 p.m.
This is the amended patch.

Bootstrapped on i686-pc-linux-gnu.
2010-11-08  Joern Rennecke  <amylaar@spamcop.net>

	PR bootstrap/46358
	* config/i386/i386.c (ix86_expand_split_stack_prologue):
	Avoid warnings when HOST_WIDE_INT is 32 bit.

Patch

Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c	(revision 166429)
+++ config/i386/i386.c	(working copy)
@@ -11171,9 +11171,9 @@  ix86_expand_split_stack_prologue (void)
 	     different function: __morestack_large.  We pass the
 	     argument size in the upper 32 bits of r10 and pass the
 	     frame size in the lower 32 bits.  */
-	  gcc_assert ((allocate & 0xffffffff) == allocate);
-	  gcc_assert (((HOST_WIDE_INT) args_size & 0xffffffff)
-		      == (HOST_WIDE_INT) args_size);
+	  gcc_assert ((allocate & (HOST_WIDE_INT) 0xffffffff) == allocate);
+	  gcc_assert (((unsigned HOST_WIDE_INT) args_size & 0xffffffff)
+		      == (unsigned HOST_WIDE_INT) args_size);
 
 	  if (split_stack_fn_large == NULL_RTX)
 	    split_stack_fn_large =
@@ -11202,7 +11202,7 @@  ix86_expand_split_stack_prologue (void)
 
 	  fn = reg11;
 
-	  argval = ((HOST_WIDE_INT) args_size << 32) + allocate;
+	  argval = (((HOST_WIDE_INT) args_size << 16) << 16) + allocate;
 	  emit_move_insn (reg10, GEN_INT (argval));
 	}
       else