aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2002-11-21 14:09:31 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2002-11-21 14:09:31 +0000
commit7c143ed26893366717a402edc90dbdddfb3656ca (patch)
tree86ae65cc653dbf0ad100265e8996768a31051996
parentb5798b2a8b6fa2bd687499d420b9f0a1cd7c8b70 (diff)
downloadgcc-7c143ed26893366717a402edc90dbdddfb3656ca.zip
gcc-7c143ed26893366717a402edc90dbdddfb3656ca.tar.gz
gcc-7c143ed26893366717a402edc90dbdddfb3656ca.tar.bz2
h8300.c (print_operand): Use h8300_eightbit_constant_address_p and h8300_tiny_constant_address_p.
* 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. From-SVN: r59343
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/h8300/h8300.c18
-rw-r--r--gcc/config/h8300/h8300.h14
3 files changed, 22 insertions, 20 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 94e8dde..1e29b8d8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index 7edf3f4..607259b 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -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;
diff --git a/gcc/config/h8300/h8300.h b/gcc/config/h8300/h8300.h
index 7d3a986..29a9ba4 100644
--- a/gcc/config/h8300/h8300.h
+++ b/gcc/config/h8300/h8300.h
@@ -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))