+2000-07-26 Kazu Hirata <kazu@hxi.com>
+
+ * h8300.c (print_operand): Print ":8" when the 'R' operand is
+ suitable for 8-bit absolute.
+ * h8300.h (EIGHTBIT_CONSTANT_ADDRESS_P): New.
+ (OK_FOR_U): Add a case for the 8-bit constant address on the
+ H8/300H.
+
Wed Jul 26 19:26:21 2000 Hans-Peter Nilsson <hp@axis.com>
* varasm.c (assemble_variable) [! defined(ASM_OUTPUT_ALIGNED_COMMON)
else if (GET_CODE (XEXP (x, 0)) == SYMBOL_REF
&& TINY_DATA_NAME_P (XSTR (XEXP (x, 0), 0)))
fprintf (file, ":16");
+ else if ((code == 'R')
+ && EIGHTBIT_CONSTANT_ADDRESS_P (XEXP (x, 0)))
+ fprintf (file, ":8");
break;
case CONST_INT:
(GET_CODE (OP) == CONST_INT \
&& (INTVAL (OP) == -1 || INTVAL (OP) == -2))
+/* Nonzero if X is a constant address suitable as an 8-bit absolute on
+ the H8/300H, which is a special case of the 'R' operand. */
+
+#define EIGHTBIT_CONSTANT_ADDRESS_P(X) \
+ (GET_CODE (X) == CONST_INT && TARGET_H8300H \
+ && 0xffff00 <= INTVAL (X) && INTVAL (X) <= 0xffffff)
+
/* '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).
&& GET_CODE (XEXP (XEXP (OP, 0), 0)) == PLUS \
&& GET_CODE (XEXP (XEXP (XEXP (OP, 0), 0), 0)) == SYMBOL_REF \
&& GET_CODE (XEXP (XEXP (XEXP (OP, 0), 0), 1)) == CONST_INT) \
- && (TARGET_H8300S || SYMBOL_REF_FLAG (XEXP (XEXP (OP, 0), 0)))))
+ && (TARGET_H8300S || SYMBOL_REF_FLAG (XEXP (XEXP (OP, 0), 0)))) \
+ || (GET_CODE (OP) == MEM \
+ && EIGHTBIT_CONSTANT_ADDRESS_P (XEXP (OP, 0))))
+
+
#define EXTRA_CONSTRAINT(OP, C) \
((C) == 'T' ? OK_FOR_T (OP) : \