Patchwork RFA: Fix bootstrap/46358

login
register
mail settings
Submitter Joern Rennecke
Date Nov. 9, 2010, 9:10 a.m.
Message ID <20101109041051.sjoad16tasow08oc-nzlynne@webmail.spamcop.net>
Download mbox | patch
Permalink /patch/70519/
State New
Headers show

Comments

Joern Rennecke - Nov. 9, 2010, 9:10 a.m.
Quoting Ian Lance Taylor <iant@google.com>:

> I think Richard meant something more like this (this patch is against
> current trunk).

But that would still leave the variable with a type that is not suitable
for all contexts.  How about this patch instead?
2010-11-09  Joern Rennecke  <amylaar@spamcop.net>

	* ix86_expand_split_stack_prologue (args_size): Change type to
	unsigned HOST_WIDE_INT.
Ian Taylor - Nov. 9, 2010, 2:45 p.m.
Joern Rennecke <amylaar@spamcop.net> writes:

> 2010-11-09  Joern Rennecke  <amylaar@spamcop.net>
>
> 	* ix86_expand_split_stack_prologue (args_size): Change type to
> 	unsigned HOST_WIDE_INT.

This is OK if it bootstraps.

Thanks.

Ian

Patch

--- i386.c	2010-11-08 17:56:11.693608704 +0000
+++ i386.c-uhwint	2010-11-09 08:51:18.265358933 +0000
@@ -11063,7 +11063,7 @@  ix86_expand_split_stack_prologue (void)
 {
   struct ix86_frame frame;
   HOST_WIDE_INT allocate;
-  int args_size;
+  unsigned HOST_WIDE_INT args_size;
   rtx label, limit, current, jump_insn, allocate_rtx, call_insn, call_fusage;
   rtx scratch_reg = NULL_RTX;
   rtx varargs_label = NULL_RTX;
@@ -11172,8 +11172,7 @@  ix86_expand_split_stack_prologue (void)
 	     argument size in the upper 32 bits of r10 and pass the
 	     frame size in the lower 32 bits.  */
 	  gcc_assert ((allocate & (HOST_WIDE_INT) 0xffffffff) == allocate);
-	  gcc_assert (((unsigned HOST_WIDE_INT) args_size & 0xffffffff)
-		      == (unsigned HOST_WIDE_INT) args_size);
+	  gcc_assert ((args_size & 0xffffffff) == args_size);
 
 	  if (split_stack_fn_large == NULL_RTX)
 	    split_stack_fn_large =
@@ -11202,7 +11201,7 @@  ix86_expand_split_stack_prologue (void)
 
 	  fn = reg11;
 
-	  argval = (((HOST_WIDE_INT) args_size << 16) << 16) + allocate;
+	  argval = ((args_size << 16) << 16) + allocate;
 	  emit_move_insn (reg10, GEN_INT (argval));
 	}
       else