mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-05 09:44:10 +08:00
* config/h8300/h8300.c (h8300_adjust_insn_length): Clean up.
From-SVN: r50207
This commit is contained in:
parent
0010687d23
commit
fbf0fe412c
@ -1,3 +1,7 @@
|
||||
2002-03-01 Kazu Hirata <kazu@hxi.com>
|
||||
|
||||
* config/h8300/h8300.c (h8300_adjust_insn_length): Clean up.
|
||||
|
||||
Fri Mar 1 20:59:14 CET 2002 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* toplev.c (rest_of_compilation): Delete dead jumptables before
|
||||
|
@ -3367,34 +3367,38 @@ h8300_adjust_insn_length (insn, length)
|
||||
else
|
||||
addr = XEXP (SET_DEST (pat), 0);
|
||||
|
||||
/* On the H8/300, only one adjustment is necessary; if the
|
||||
address mode is register indirect, then this insn is two
|
||||
bytes shorter than indicated in the machine description. */
|
||||
if (TARGET_H8300 && GET_CODE (addr) == REG)
|
||||
return -2;
|
||||
if (TARGET_H8300)
|
||||
{
|
||||
/* On the H8/300, we subtract the difference between the
|
||||
actual length and the longest one, which is @(d:16,ERs). */
|
||||
|
||||
/* On the H8/300H and H8/S, register indirect is 6 bytes shorter than
|
||||
indicated in the machine description. */
|
||||
if ((TARGET_H8300H || TARGET_H8300S)
|
||||
&& GET_CODE (addr) == REG)
|
||||
return -6;
|
||||
/* @Rs is 2 bytes shorter than the longest. */
|
||||
if (GET_CODE (addr) == REG)
|
||||
return -2;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* On the H8/300H and H8/S, we subtract the difference
|
||||
between the actual length and the longest one, which is
|
||||
@(d:24,ERs). */
|
||||
|
||||
/* On the H8/300H and H8/S, reg + d, for small displacements is
|
||||
4 bytes shorter than indicated in the machine description. */
|
||||
if ((TARGET_H8300H || TARGET_H8300S)
|
||||
&& GET_CODE (addr) == PLUS
|
||||
&& GET_CODE (XEXP (addr, 0)) == REG
|
||||
&& GET_CODE (XEXP (addr, 1)) == CONST_INT
|
||||
&& INTVAL (XEXP (addr, 1)) > -32768
|
||||
&& INTVAL (XEXP (addr, 1)) < 32767)
|
||||
return -4;
|
||||
/* @ERs is 6 bytes shorter than the longest. */
|
||||
if (GET_CODE (addr) == REG)
|
||||
return -6;
|
||||
|
||||
/* On the H8/300H and H8/S, abs:16 is two bytes shorter than the
|
||||
more general abs:24. */
|
||||
if ((TARGET_H8300H || TARGET_H8300S)
|
||||
&& GET_CODE (addr) == SYMBOL_REF
|
||||
&& TINY_DATA_NAME_P (XSTR (addr, 0)))
|
||||
return -2;
|
||||
/* @(d:16,ERs) is 6 bytes shorter than the longest. */
|
||||
if (GET_CODE (addr) == PLUS
|
||||
&& GET_CODE (XEXP (addr, 0)) == REG
|
||||
&& GET_CODE (XEXP (addr, 1)) == CONST_INT
|
||||
&& INTVAL (XEXP (addr, 1)) > -32768
|
||||
&& INTVAL (XEXP (addr, 1)) < 32767)
|
||||
return -4;
|
||||
|
||||
/* @aa:16 is 2 bytes shorter than the longest. */
|
||||
if (GET_CODE (addr) == SYMBOL_REF
|
||||
&& TINY_DATA_NAME_P (XSTR (addr, 0)))
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
|
||||
/* Loading some constants needs adjustment. */
|
||||
|
Loading…
Reference in New Issue
Block a user