public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Comitted] S/390: Fix TD/TF mem to reg splitter for -m31 -mzarch
@ 2011-05-09 16:45 Andreas Krebbel
  0 siblings, 0 replies; only message in thread
From: Andreas Krebbel @ 2011-05-09 16:45 UTC (permalink / raw)
  To: gcc-patches

Hi,

the attached patch fixes a testsuite failure with -m31 -mzarch.  The
TD/TF mem to reg move splitter uses the first word mode register of
the target operand as temporary register for storing the address.
This generates an invalid address when having a 64 bit word mode and a
32 bit address mode as it happens with -m31 -mzarch.

Fixed with the attached patch. 

Bootstrapped and regtested with -with-mode=zarch.

Applied to mainline and 4.6.

Bye,

-Andreas-


2011-05-09  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* config/s390/s390.md (TD/TF mem to reg move splitter): Make the
	temporary register to match Pmode.

Index: gcc/config/s390/s390.md
===================================================================
--- gcc/config/s390/s390.md.orig
+++ gcc/config/s390/s390.md
@@ -2026,6 +2026,7 @@
   [(set (match_dup 0) (match_dup 1))]
 {
   rtx addr = operand_subword (operands[0], 1, 0, <MODE>mode);
+  addr = gen_lowpart (Pmode, addr);
   s390_load_address (addr, XEXP (operands[1], 0));
   operands[1] = replace_equiv_address (operands[1], addr);
 })

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-09 14:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-09 16:45 [Comitted] S/390: Fix TD/TF mem to reg splitter for -m31 -mzarch Andreas Krebbel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).