re PR target/44364 (Wrong code with e500 double floating point)

PR target/44364
	* config/rs6000/e500.h (HARD_REGNO_CALLER_SAVE_MODE): Define.
	* caller-save.c (insert_restore, insert_save): Use non-validate
	form of adjust_address.

From-SVN: r161163
This commit is contained in:
Alan Modra 2010-06-22 20:14:11 +09:30 committed by Alan Modra
parent 3a4ec5cc08
commit 8d2547f23f
3 changed files with 17 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2010-06-22 Alan Modra <amodra@gmail.com>
PR target/44364
* config/rs6000/e500.h (HARD_REGNO_CALLER_SAVE_MODE): Define.
* caller-save.c (insert_restore, insert_save): Use non-validate
form of adjust_address.
2010-06-21 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR target/39690

View File

@ -1212,7 +1212,7 @@ insert_restore (struct insn_chain *chain, int before_p, int regno,
/* Check that insn to restore REGNO in save_mode[regno] is
correct. */
&& reg_save_code (regno, save_mode[regno]) >= 0)
mem = adjust_address (mem, save_mode[regno], 0);
mem = adjust_address_nv (mem, save_mode[regno], 0);
else
mem = copy_rtx (mem);
@ -1293,7 +1293,7 @@ insert_save (struct insn_chain *chain, int before_p, int regno,
/* Check that insn to save REGNO in save_mode[regno] is
correct. */
&& reg_save_code (regno, save_mode[regno]) >= 0)
mem = adjust_address (mem, save_mode[regno], 0);
mem = adjust_address_nv (mem, save_mode[regno], 0);
else
mem = copy_rtx (mem);

View File

@ -1,5 +1,5 @@
/* Enable E500 support.
Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009 Free Software
Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010 Free Software
Foundation, Inc.
This file is part of GCC.
@ -46,3 +46,10 @@
error ("E500 and FPRs not supported"); \
} \
} while (0)
/* When setting up caller-save slots (MODE == VOIDmode) ensure we
allocate space for DFmode. Save gprs in the correct mode too. */
#define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \
(TARGET_E500_DOUBLE && ((MODE) == VOIDmode || (MODE) == DFmode) \
? DFmode \
: choose_hard_reg_mode ((REGNO), (NREGS), false))