This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Ping: Patch to fix bootstrap on IA64 HP-UX
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Steve Ellcey <sje at cup dot hp dot com>
- Cc: gcc-patches at gcc dot gnu dot org, wilson at tuliptree dot org, jakub at redhat dot com
- Date: Tue, 29 Apr 2008 13:42:43 -0400
- Subject: Re: Ping: Patch to fix bootstrap on IA64 HP-UX
- References: <200804291706.KAA25079@hpsje.cup.hp.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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