Commit 8d2547f2 by Alan Modra Committed by Alan Modra

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
parent 3a4ec5cc
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
......
......@@ -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);
......
/* 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))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment