* config/h8300/h8300.c (print_operand): Update the use of
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 19 Nov 2002 15:17:24 +0000 (15:17 +0000)
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 19 Nov 2002 15:17:24 +0000 (15:17 +0000)
EIGHTBIT_CONSTANT_ADDRESS_P.
(h8300_adjust_insn_length): Likewise.
(h8300_eightbit_constant_address_p): Check if the given rtx is
a variable with __attribute__((eightbit_data)).
* config/h8300/h8300.h (OK_FOR_U): Update the use of
EIGHTBIT_CONSTANT_ADDRESS_P.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59263 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/h8300/h8300.c
gcc/config/h8300/h8300.h

index 9822bed..a4f11ed 100644 (file)
@@ -1,3 +1,13 @@
+2002-11-19  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * config/h8300/h8300.c (print_operand): Update the use of
+       EIGHTBIT_CONSTANT_ADDRESS_P.
+       (h8300_adjust_insn_length): Likewise.
+       (h8300_eightbit_constant_address_p): Check if the given rtx is
+       a variable with __attribute__((eightbit_data)).
+       * config/h8300/h8300.h (OK_FOR_U): Update the use of
+       EIGHTBIT_CONSTANT_ADDRESS_P.
+
 2002-11-19  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
 
        * doc/contrib.texi (Contributors): Add self as second contact in
index 003fafe..c5bfb13 100644 (file)
@@ -1434,9 +1434,7 @@ print_operand (file, x, code)
        case MEM:
          {
            rtx addr = XEXP (x, 0);
-           int eightbit_ok = ((GET_CODE (addr) == SYMBOL_REF
-                               && SYMBOL_REF_FLAG (addr))
-                              || EIGHTBIT_CONSTANT_ADDRESS_P (addr));
+           int eightbit_ok = EIGHTBIT_CONSTANT_ADDRESS_P (addr);
            int tiny_ok = ((GET_CODE (addr) == SYMBOL_REF
                            && TINY_DATA_NAME_P (XSTR (addr, 0)))
                           || TINY_CONSTANT_ADDRESS_P (addr));
@@ -3721,8 +3719,7 @@ h8300_adjust_insn_length (insn, length)
 
          /* @aa:8 is 2 bytes shorter than the longest.  */
          if (GET_MODE (SET_SRC (pat)) == QImode
-             && ((GET_CODE (addr) == SYMBOL_REF && SYMBOL_REF_FLAG (addr))
-                 || EIGHTBIT_CONSTANT_ADDRESS_P (addr)))
+             && EIGHTBIT_CONSTANT_ADDRESS_P (addr))
            return -2;
        }
       else
@@ -3875,6 +3872,10 @@ h8300_eightbit_constant_address_p (x)
 
   unsigned HOST_WIDE_INT addr;
 
+  /* We accept symbols declared with eightbit_data.  */
+  if (GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_FLAG (x))
+    return 1;
+
   if (GET_CODE (x) != CONST_INT)
     return 0;
 
index 075ddb8..79898aa 100644 (file)
@@ -863,7 +863,7 @@ struct cum_arg
    || (GET_CODE (OP) == MEM && GET_CODE (XEXP (OP, 0)) == REG          \
        && REG_OK_FOR_BASE_P (XEXP (OP, 0)))                            \
    || (GET_CODE (OP) == MEM && GET_CODE (XEXP (OP, 0)) == SYMBOL_REF   \
-       && (TARGET_H8300S || SYMBOL_REF_FLAG (XEXP (OP, 0))))           \
+       && TARGET_H8300S)                                               \
    || ((GET_CODE (OP) == MEM && GET_CODE (XEXP (OP, 0)) == CONST       \
         && GET_CODE (XEXP (XEXP (OP, 0), 0)) == PLUS                   \
         && GET_CODE (XEXP (XEXP (XEXP (OP, 0), 0), 0)) == SYMBOL_REF   \