OSDN Git Service

* config/h8300/h8300.c (print_operand): Use
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Nov 2002 14:09:31 +0000 (14:09 +0000)
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Nov 2002 14:09:31 +0000 (14:09 +0000)
h8300_eightbit_constant_address_p and
h8300_tiny_constant_address_p.
(h8300_adjust_insn_length): Likewise.
* config/h8300/h8300.h (EIGHTBIT_CONSTANT_ADDRESS_P): Remove.
(TINY_CONSTANT_ADDRESS_P): Likewise.
(OK_FOR_U): Use eightbit_constant_address_p.

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

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

index 94e8dde..1e29b8d 100644 (file)
@@ -1,3 +1,13 @@
+2002-11-21  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * config/h8300/h8300.c (print_operand): Use
+       h8300_eightbit_constant_address_p and
+       h8300_tiny_constant_address_p.
+       (h8300_adjust_insn_length): Likewise.
+       * config/h8300/h8300.h (EIGHTBIT_CONSTANT_ADDRESS_P): Remove.
+       (TINY_CONSTANT_ADDRESS_P): Likewise.
+       (OK_FOR_U): Use eightbit_constant_address_p.
+
 2002-11-21  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * config/s390/libgcc-libc.ver: Add multilib support.
index 7edf3f4..607259b 100644 (file)
@@ -1440,10 +1440,9 @@ print_operand (file, x, code)
        case MEM:
          {
            rtx addr = XEXP (x, 0);
-           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));
+                          || h8300_tiny_constant_address_p (addr));
 
            fprintf (file, "@");
            output_address (addr);
@@ -1454,7 +1453,7 @@ print_operand (file, x, code)
              {
              case 'R':
                /* Used for mov.b and bit operations.  */
-               if (eightbit_ok)
+               if (h8300_eightbit_constant_address_p (addr))
                  {
                    fprintf (file, ":8");
                    break;
@@ -3729,7 +3728,7 @@ h8300_adjust_insn_length (insn, length)
 
          /* @aa:8 is 2 bytes shorter than the longest.  */
          if (GET_MODE (SET_SRC (pat)) == QImode
-             && EIGHTBIT_CONSTANT_ADDRESS_P (addr))
+             && h8300_eightbit_constant_address_p (addr))
            return -2;
        }
       else
@@ -3752,14 +3751,13 @@ h8300_adjust_insn_length (insn, length)
 
          /* @aa:8 is 6 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)))
+             && h8300_eightbit_constant_address_p (addr))
            return -6;
 
          /* @aa:16 is 4 bytes shorter than the longest.  */
          if ((GET_CODE (addr) == SYMBOL_REF
               && TINY_DATA_NAME_P (XSTR (addr, 0)))
-             || TINY_CONSTANT_ADDRESS_P (addr))
+             || h8300_tiny_constant_address_p (addr))
            return -4;
 
          /* @aa:24 is 2 bytes shorter than the longest.  */
@@ -3868,6 +3866,9 @@ h8300_asm_named_section (name, flags)
 }
 #endif /* ! OBJECT_FORMAT_ELF */
 
+/* Nonzero if X is a constant address suitable as an 8-bit absolute,
+   which is a special case of the 'R' operand.  */
+
 int
 h8300_eightbit_constant_address_p (x)
      rtx x;
@@ -3897,6 +3898,9 @@ h8300_eightbit_constant_address_p (x)
          || (TARGET_H8300S && IN_RANGE (addr, s1, s2)));
 }
 
+/* Nonzero if X is a constant address suitable as an 16-bit absolute
+   on H8/300H and H8S.  */
+
 int
 h8300_tiny_constant_address_p (x)
      rtx x;
index 7d3a986..29a9ba4 100644 (file)
@@ -858,18 +858,6 @@ struct cum_arg
    ? !h8300_shift_needs_scratch_p (INTVAL (OP), SImode)        \
    : 0)
 
-/* Nonzero if X is a constant address suitable as an 8-bit absolute,
-   which is a special case of the 'R' operand.  */
-
-#define EIGHTBIT_CONSTANT_ADDRESS_P(X)         \
-  h8300_eightbit_constant_address_p (X)
-
-/* Nonzero if X is a constant address suitable as an 16-bit absolute
-   on H8/300H and H8S.  */
-
-#define TINY_CONSTANT_ADDRESS_P(X)             \
-  h8300_tiny_constant_address_p (X)
-
 /* 'U' if valid for a bset destination;
    i.e. a register, register indirect, or the eightbit memory region
    (a SYMBOL_REF with an SYMBOL_REF_FLAG set).
@@ -888,7 +876,7 @@ struct cum_arg
         && (TARGET_H8300S                                              \
            || SYMBOL_REF_FLAG (XEXP (XEXP (XEXP (OP, 0), 0), 0))))     \
    || (GET_CODE (OP) == MEM                                            \
-       && EIGHTBIT_CONSTANT_ADDRESS_P (XEXP (OP, 0)))                  \
+       && h8300_eightbit_constant_address_p (XEXP (OP, 0)))            \
    || (GET_CODE (OP) == MEM && TARGET_H8300S                           \
        && GET_CODE (XEXP (OP, 0)) == CONST_INT))