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]

Re: Ping: Patch to fix bootstrap on IA64 HP-UX


On Tue, Apr 29, 2008 at 10:06:41AM -0700, Steve Ellcey wrote:
> 
> This is a ping for a patch to fix IA64 HP-UX bootstrap.  The bootstrap
> stopped working due to this patch:
> 
>   2007-12-04  Jakub Jelinek  <jakub@redhat.com>
>         PR middle-end/34134
>         * stmt.c (expand_stack_restore): Call expand_normal on var to get
>         rtx for it instead of assuming it will be a VAR_DECL.
> 
> Before this patch the variable sa was always getting created as a DImode
> variable and after the patch the variable became ptr_mode which is
> DImode on Linux or when compiling in 64 bit mode on HP-UX but SImode
> when compiling on HP-UX in 32 bit mode.  Because IA64 tries to save the
> stack pointer as DImode (Pmode) even in 32 bit mode the code started
> failing when it tried to find a move instruction with mismatched (SI/DI)
> operations.

Given that
stack_pointer_rtx = gen_raw_REG (Pmode, STACK_POINTER_REGNUM);
on all targets and STACK_SAVEAREA_MODE (SAVE_BLOCK) is always Pmode,
shouldn't that just use sa = convert_memory_address (Pmode, sa); ?

> 2008-04-17  Steve Ellcey  <sje@cup.hp.com>
> 
> 	* stmt.c (expand_stack_restore): Change sa mode if needed.
> 
> 
> Index: stmt.c
> ===================================================================
> --- stmt.c	(revision 134373)
> +++ stmt.c	(working copy)
> @@ -1996,6 +1996,7 @@ expand_stack_restore (tree var)
>  {
>    rtx sa = expand_normal (var);
>  
> +  sa = convert_memory_address (STACK_SAVEAREA_MODE (SAVE_BLOCK), sa);
>    emit_stack_restore (SAVE_BLOCK, sa, NULL_RTX);
>  }
>  

	Jakub


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