mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-22 00:22:35 +08:00
h8300.h (EIGHTBIT_CONSTANT_ADDRESS_P): Add support for H8/300, H8/S aa:8 mode.
* config/h8300/h8300.h (EIGHTBIT_CONSTANT_ADDRESS_P): Add support for H8/300, H8/S aa:8 mode. (TINY_CONSTANT_ADDRESS_P): Add support for H8/S aa:16 mode. * config/h8300/h8300.c (h8300_adjust_insn_length): Adjust length for H8/300 aa:8 mode. From-SVN: r57108
This commit is contained in:
parent
69aeba4ed0
commit
d56c04ce52
@ -1,3 +1,11 @@
|
||||
2002-09-13 Dhananjay Deshpande <dhananjayd@kpit.com>
|
||||
|
||||
* config/h8300/h8300.h (EIGHTBIT_CONSTANT_ADDRESS_P): Add support
|
||||
for H8/300, H8/S aa:8 mode.
|
||||
(TINY_CONSTANT_ADDRESS_P): Add support for H8/S aa:16 mode.
|
||||
* config/h8300/h8300.c (h8300_adjust_insn_length): Adjust length
|
||||
for H8/300 aa:8 mode.
|
||||
|
||||
2002-09-13 Hartmut Penner <hpenner@de.ibm.com>
|
||||
|
||||
* config/s390/s390.md ("trap", "conditional_trap", "*trap"): New
|
||||
|
@ -3719,6 +3719,12 @@ h8300_adjust_insn_length (insn, length)
|
||||
/* @Rs is 2 bytes shorter than the longest. */
|
||||
if (GET_CODE (addr) == REG)
|
||||
return -2;
|
||||
|
||||
/* @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)))
|
||||
return -2;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -822,20 +822,30 @@ 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 on
|
||||
the H8/300H, which is a special case of the 'R' operand. */
|
||||
/* 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) \
|
||||
(GET_CODE (X) == CONST_INT && TARGET_H8300H \
|
||||
&& 0xffff00 <= INTVAL (X) && INTVAL (X) <= 0xffffff)
|
||||
#define EIGHTBIT_CONSTANT_ADDRESS_P(X) \
|
||||
((GET_CODE (X) == CONST_INT) \
|
||||
&& ((TARGET_H8300H && 0xffff00 <= INTVAL (X) \
|
||||
&& INTVAL (X) <= 0xffffff) \
|
||||
|| (TARGET_H8300S && 0xffffff00 <= INTVAL (X) \
|
||||
&& INTVAL (X) <= 0xffffffff) \
|
||||
|| (TARGET_H8300 && 0xff00 <= (INTVAL (X) & 0x0000FFFF) \
|
||||
&& (INTVAL (X) & 0x0000FFFF) <= 0xffff)))
|
||||
|
||||
/* Nonzero if X is a constant address suitable as an 16-bit absolute
|
||||
on the H8/300H. */
|
||||
on H8/300H and H8/S. */
|
||||
|
||||
#define TINY_CONSTANT_ADDRESS_P(X) \
|
||||
(GET_CODE (X) == CONST_INT && TARGET_H8300H \
|
||||
&& ((0xff8000 <= INTVAL (X) && INTVAL (X) <= 0xffffff) \
|
||||
|| (0x000000 <= INTVAL (X) && INTVAL (X) <= 0x007fff)))
|
||||
#define TINY_CONSTANT_ADDRESS_P(X) \
|
||||
((GET_CODE (X) == CONST_INT) \
|
||||
&& ((TARGET_H8300H \
|
||||
&& ((0xff8000 <= INTVAL (X) && INTVAL (X) <= 0xffffff) \
|
||||
|| (0x000000 <= INTVAL (X) && INTVAL (X) <= 0x007fff))) \
|
||||
|| (TARGET_H8300S \
|
||||
&& ((0xffff8000 <= INTVAL (X) && INTVAL (X) <= 0xffffffff) \
|
||||
|| (0x00000000 <= INTVAL (X) \
|
||||
&& INTVAL (X) <= 0x00007fff)))))
|
||||
|
||||
/* 'U' if valid for a bset destination;
|
||||
i.e. a register, register indirect, or the eightbit memory region
|
||||
|
Loading…
Reference in New Issue
Block a user