h8300.c (print_operand): Update the use of EIGHTBIT_CONSTANT_ADDRESS_P.
authorKazu Hirata <kazu@cs.umass.edu>
Tue, 19 Nov 2002 15:17:24 +0000 (15:17 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Tue, 19 Nov 2002 15:17:24 +0000 (15:17 +0000)
* 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.

From-SVN: r59263

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

index 9822bed18e77a3fc36d06318a996bccfa1251e80..a4f11ed0d80c1f403bfa0e13a5e3b5c474ab00be 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 003fafe5b1b2c6a0dae7c9bee0f4f918dfb9cdf0..c5bfb137fe42901c5aed170bc0964586d4300043 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 075ddb8bcb02202b32c6498779eead3e074a8b9a..79898aab4e989fbee9064d5c4dd9b9da826fc50c 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   \