Commited.

        * config/rl78/rl78.c (rl78_as_legitimate_address): Do not allow
        reg+addend addresses for the _far namespace.

Index: gcc/config/rl78/rl78.c
===================================================================
--- gcc/config/rl78/rl78.c      (revision 192862)
+++ gcc/config/rl78/rl78.c      (working copy)
@@ -683,12 +683,19 @@ rl78_as_legitimate_address (enum machine
       && GET_MODE (x) == SImode)
     return false;
 
   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);
       int br = REGNO (base);
 
 #define OK(test, debug) if (test) { /*fprintf(stderr, "%d: OK %s\n", __LINE__, 
debug);*/ return true; }

Reply via email to