summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-26 23:11:02 +0000
committerdj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-26 23:11:02 +0000
commit03e08569a25035389cfe1474fc00d45b577b04c9 (patch)
tree1910290cbd09ce54d1b9d019d10f6c5c97300c0f
parentf0c535509bab75cc41573ce73e99bf9ea42c6dbb (diff)
downloadppe42-gcc-03e08569a25035389cfe1474fc00d45b577b04c9.tar.gz
ppe42-gcc-03e08569a25035389cfe1474fc00d45b577b04c9.zip
* config/rl78/rl78.c (rl78_as_legitimate_address): Do not allow
reg+addend addresses for the _far namespace. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192866 138bc75d-0d04-0410-961f-82ee72b054a4
-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 1668c54a9b4..8b3c2b2670f 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 990c1bb8139..5e5050bca13 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);
OpenPOWER on IntegriCloud