aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>2013-02-18 15:21:32 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2013-02-18 15:21:32 +0000
commitceaca33e28ab08fc6913935bcc50161d211f27b1 (patch)
tree8ba0ef49d9742b4adcda26a5026f5f7d2948ba36 /gcc
parentfe0b4796ad3fe8ec17de328a628d39a100b17d7c (diff)
downloadgcc-ceaca33e28ab08fc6913935bcc50161d211f27b1.zip
gcc-ceaca33e28ab08fc6913935bcc50161d211f27b1.tar.gz
gcc-ceaca33e28ab08fc6913935bcc50161d211f27b1.tar.bz2
re PR target/56214 (FAIL: gcc.c-torture/execute/20050121-1.c compilation, ICE)
PR target/56214 * config/pa/predicates.md (base14_operand): Except for BLKmode, QImode and HImode, require all displacements to be an integer multiple of the mode size. * config/pa/pa.c (pa_legitimate_address_p): For REG+BASE addresses, only allow QImode and HImode when reload is in progress and strict is true. Likewise for symbolic addresses. Use base14_operand to check displacements in REG+BASE addresses. From-SVN: r196122
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/config/pa/pa.c30
-rw-r--r--gcc/config/pa/predicates.md13
3 files changed, 24 insertions, 30 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0caa412..4b53af8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,14 @@
+2013-02-18 John David Anglin <dave.anglin@nrc-cnrc.ca>
+
+ PR target/56214
+ * config/pa/predicates.md (base14_operand): Except for BLKmode, QImode
+ and HImode, require all displacements to be an integer multiple of their
+ mode size.
+ * config/pa/pa.c (pa_legitimate_address_p): For REG+BASE addresses,
+ only allow QImode and HImode when reload is in progress and strict is
+ true. Likewise for symbolic addresses. Use base14_operand to check
+ displacements in REG+BASE addresses.
+
2013-02-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/56366
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 36eba24..0d39483 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -10517,21 +10517,13 @@ pa_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
the majority of accesses will use floating point instructions
that don't support 14-bit offsets. */
if (!INT14_OK_STRICT
- && (GET_MODE_CLASS (mode) == MODE_FLOAT
- || (reload_in_progress
- && strict
- && (mode == SImode || mode == DImode))))
- return false;
-
- if (INT_14_BITS (index)
- && (mode == BLKmode
- || mode == QImode
- || mode == HImode
- /* Displacement must be a multiple of its size. */
- || (INTVAL (index) % GET_MODE_SIZE (mode)) == 0))
- return true;
+ && reload_in_progress
+ && strict
+ && mode != QImode
+ && mode != HImode)
+ return false;
- return false;
+ return base14_operand (index, mode);
}
if (!TARGET_DISABLE_INDEXING
@@ -10586,11 +10578,11 @@ pa_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
return true;
if (!INT14_OK_STRICT
- && (GET_MODE_CLASS (mode) == MODE_FLOAT
- || (reload_in_progress
- && strict
- && (mode == SImode || mode == DImode))))
- return false;
+ && reload_in_progress
+ && strict
+ && mode != QImode
+ && mode != HImode)
+ return false;
if (CONSTANT_P (XEXP (x, 1)))
return true;
diff --git a/gcc/config/pa/predicates.md b/gcc/config/pa/predicates.md
index 8823706..ba105f2 100644
--- a/gcc/config/pa/predicates.md
+++ b/gcc/config/pa/predicates.md
@@ -272,22 +272,13 @@
assumed in the instruction encoding. */
switch (mode)
{
+ case BLKmode:
case QImode:
case HImode:
return true;
- case SImode:
- case SFmode:
- case SCmode:
- return (INTVAL (op) % 4) == 0;
-
- case DImode:
- case DFmode:
- case DCmode:
- return (INTVAL (op) % 8) == 0;
-
default:
- break;
+ return (INTVAL (op) % GET_MODE_SIZE (mode)) == 0;
}
return false;