aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2012-10-26 19:11:02 -0400
committerDJ Delorie <dj@gcc.gnu.org>2012-10-26 19:11:02 -0400
commitf5ac80f86a6b0b29dfdd1a4ad129c8268d341c32 (patch)
tree1910290cbd09ce54d1b9d019d10f6c5c97300c0f /gcc
parent1f8c354b9857de87d28f96424d90b09a2503adcf (diff)
downloadgcc-f5ac80f86a6b0b29dfdd1a4ad129c8268d341c32.zip
gcc-f5ac80f86a6b0b29dfdd1a4ad129c8268d341c32.tar.gz
gcc-f5ac80f86a6b0b29dfdd1a4ad129c8268d341c32.tar.bz2
rl78.c (rl78_as_legitimate_address): Do not allow reg+addend addresses for the _far namespace.
* config/rl78/rl78.c (rl78_as_legitimate_address): Do not allow reg+addend addresses for the _far namespace. From-SVN: r192866
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/rl78/rl78.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1668c54..8b3c2b2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-26 DJ Delorie <dj@redhat.com>
+
+ * config/rl78/rl78.c (rl78_as_legitimate_address): Do not allow
+ reg+addend addresses for the _far namespace.
+
2012-10-26 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/sync.md (ATOMIC): Correct DI condition.
diff --git a/gcc/config/rl78/rl78.c b/gcc/config/rl78/rl78.c
index 990c1bb..5e5050b 100644
--- a/gcc/config/rl78/rl78.c
+++ b/gcc/config/rl78/rl78.c
@@ -686,6 +686,13 @@ rl78_as_legitimate_address (enum machine_mode mode ATTRIBUTE_UNUSED, rtx x,
if (! characterize_address (x, &base, &index, &addend))
return false;
+ /* We can't extract the high/low portions of a PLUS address
+ involving a register during devirtualization, so make sure all
+ such __far addresses do not have addends. This forces GCC to do
+ the sum separately. */
+ if (addend && base && as == ADDR_SPACE_FAR)
+ return false;
+
if (base && index)
{
int ir = REGNO (index);