Commit 9f9f0e4f by Kazu Hirata Committed by Jeff Law

h8300.c (print_operand): Print ":8" when the 'R' operand is suitable for 8-bit absolute.

        * 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.

From-SVN: r35278
parent ec1bff50
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)
......
......@@ -1419,6 +1419,9 @@ print_operand (file, x, code)
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:
......
......@@ -836,6 +836,13 @@ struct cum_arg
(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).
......@@ -851,7 +858,11 @@ struct cum_arg
&& 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) : \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment