aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndreas Krebbel <krebbel@linux.vnet.ibm.com>2015-05-19 14:49:35 +0000
committerAndreas Krebbel <krebbel@gcc.gnu.org>2015-05-19 14:49:35 +0000
commit057021105092a95a712e4237959025683bee7d42 (patch)
tree084d6a7c2fc2a62838a7266fa9e6d26ca16f3e10 /gcc
parent376ee136dd082f25ecd608143e59fb4f24899812 (diff)
downloadgcc-057021105092a95a712e4237959025683bee7d42.zip
gcc-057021105092a95a712e4237959025683bee7d42.tar.gz
gcc-057021105092a95a712e4237959025683bee7d42.tar.bz2
S/390 Fix secondary reload issue with store/load relative operands.
We need a scratch register for loading from or storing to a symbolic memory reference where we cannot use the load/store relative instructions for. However, the check currently fails to handle floating point modes in GPRs correctly. gcc/ * config/s390/s390.c (s390_secondary_reload): Fix check for load/store relative. From-SVN: r223368
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/s390/s390.c16
2 files changed, 12 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2f3b230..8ae08e6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2015-05-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+ * config/s390/s390.c (s390_secondary_reload): Fix check for
+ load/store relative.
+
+2015-05-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
* recog.h: Increase MAX_RECOG_ALTERNATIVES. Change type of
alternative_mask to uint64_t.
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index e9a4e70..2c83c00 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -3141,17 +3141,15 @@ s390_secondary_reload (bool in_p, rtx x, reg_class_t rclass_i,
sri->icode = ((mode == DImode) ? CODE_FOR_reloaddi_larl_odd_addend_z10
: CODE_FOR_reloadsi_larl_odd_addend_z10);
- /* On z10 we need a scratch register when moving QI, TI or floating
- point mode values from or to a memory location with a SYMBOL_REF
- or if the symref addend of a SI or DI move is not aligned to the
- width of the access. */
+ /* Handle all the (mem (symref)) accesses we cannot use the z10
+ instructions for. */
if (MEM_P (x)
&& s390_loadrelative_operand_p (XEXP (x, 0), NULL, NULL)
- && (mode == QImode || mode == TImode || FLOAT_MODE_P (mode)
- || (!TARGET_ZARCH && mode == DImode)
- || ((mode == HImode || mode == SImode || mode == DImode)
- && (!s390_check_symref_alignment (XEXP (x, 0),
- GET_MODE_SIZE (mode))))))
+ && (mode == QImode
+ || !reg_classes_intersect_p (GENERAL_REGS, rclass)
+ || GET_MODE_SIZE (mode) > UNITS_PER_WORD
+ || !s390_check_symref_alignment (XEXP (x, 0),
+ GET_MODE_SIZE (mode))))
{
#define __SECONDARY_RELOAD_CASE(M,m) \
case M##mode: \