Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
fbf0fe41
Commit
fbf0fe41
authored
Mar 01, 2002
by
Kazu Hirata
Committed by
Kazu Hirata
Mar 01, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* config/h8300/h8300.c (h8300_adjust_insn_length): Clean up.
From-SVN: r50207
parent
0010687d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
27 deletions
+35
-27
gcc/ChangeLog
+4
-0
gcc/config/h8300/h8300.c
+31
-27
No files found.
gcc/ChangeLog
View file @
fbf0fe41
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>
Fri Mar 1 20:59:14 CET 2002 Jan Hubicka <jh@suse.cz>
* toplev.c (rest_of_compilation): Delete dead jumptables before
* toplev.c (rest_of_compilation): Delete dead jumptables before
...
...
gcc/config/h8300/h8300.c
View file @
fbf0fe41
...
@@ -3367,34 +3367,38 @@ h8300_adjust_insn_length (insn, length)
...
@@ -3367,34 +3367,38 @@ h8300_adjust_insn_length (insn, length)
else
else
addr
=
XEXP
(
SET_DEST
(
pat
),
0
);
addr
=
XEXP
(
SET_DEST
(
pat
),
0
);
/* On the H8/300, only one adjustment is necessary; if the
if
(
TARGET_H8300
)
address mode is register indirect, then this insn is two
{
bytes shorter than indicated in the machine description. */
/* On the H8/300, we subtract the difference between the
if
(
TARGET_H8300
&&
GET_CODE
(
addr
)
==
REG
)
actual length and the longest one, which is @(d:16,ERs). */
return
-
2
;
/* 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
;
/* On the H8/300H and H8/S, reg + d, for small displacements is
/* @Rs is 2 bytes shorter than the longest. */
4 bytes shorter than indicated in the machine description. */
if
(
GET_CODE
(
addr
)
==
REG
)
if
((
TARGET_H8300H
||
TARGET_H8300S
)
return
-
2
;
&&
GET_CODE
(
addr
)
==
PLUS
}
&&
GET_CODE
(
XEXP
(
addr
,
0
))
==
REG
else
&&
GET_CODE
(
XEXP
(
addr
,
1
))
==
CONST_INT
{
&&
INTVAL
(
XEXP
(
addr
,
1
))
>
-
32768
/* On the H8/300H and H8/S, we subtract the difference
&&
INTVAL
(
XEXP
(
addr
,
1
))
<
32767
)
between the actual length and the longest one, which is
return
-
4
;
@(d:24,ERs). */
/* On the H8/300H and H8/S, abs:16 is two bytes shorter than the
/* @ERs is 6 bytes shorter than the longest. */
more general abs:24. */
if
(
GET_CODE
(
addr
)
==
REG
)
if
((
TARGET_H8300H
||
TARGET_H8300S
)
return
-
6
;
&&
GET_CODE
(
addr
)
==
SYMBOL_REF
&&
TINY_DATA_NAME_P
(
XSTR
(
addr
,
0
)))
/* @(d:16,ERs) is 6 bytes shorter than the longest. */
return
-
2
;
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 some constants needs adjustment. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment