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
3296aff4
Commit
3296aff4
authored
Feb 06, 1995
by
Torbjorn Granlund
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(RTX_COSTS): Add special cases for a plain 68000.
From-SVN: r8869
parent
71af73bb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
gcc/config/m68k/m68k.h
+20
-2
No files found.
gcc/config/m68k/m68k.h
View file @
3296aff4
...
...
@@ -1371,8 +1371,10 @@ __transfer_from_trampoline () \
work properly in synth_mult on the 68020,
relative to an average of the time for add and the time for shift,
taking away a little more because sometimes move insns are needed. */
/* div?.w is relatively cheaper on 68000 counted in COSTS_N_INSNS terms. */
#define MULL_COST (TARGET_68040 ? 5 : 13)
#define MULW_COST (TARGET_68040 ? 3 : 8)
#define MULW_COST (TARGET_68040 ? 3 : TARGET_68020 ? 8 : 5)
#define DIVW_COST (TARGET_68020 ? 27 : 12)
#define RTX_COSTS(X,CODE,OUTER_CODE) \
case PLUS: \
...
...
@@ -1390,6 +1392,18 @@ __transfer_from_trampoline () \
case ASHIFT: \
case ASHIFTRT: \
case LSHIFTRT: \
if (! TARGET_68020) \
{ \
if (GET_CODE (XEXP (X, 1)) == CONST_INT) \
{ \
if (INTVAL (XEXP (X, 1)) < 16) \
return COSTS_N_INSNS (2) + INTVAL (XEXP (X, 1)) / 2; \
else \
/* We're using clrw + swap for these cases. */
\
return COSTS_N_INSNS (4) + (INTVAL (XEXP (X, 1)) - 16) / 2; \
}
\
return
COSTS_N_INSNS
(
10
);
/* worst case */
\
}
\
/* A shift by a big integer takes an extra instruction. */
\
if
(
GET_CODE
(
XEXP
(
X
,
1
))
==
CONST_INT
\
&&
(
INTVAL
(
XEXP
(
X
,
1
))
==
16
))
\
...
...
@@ -1400,6 +1414,10 @@ __transfer_from_trampoline () \
return
COSTS_N_INSNS
(
3
);
/* lsr #i,dn */
\
break
;
\
case
MULT
:
\
if
((
GET_CODE
(
XEXP
(
X
,
0
))
==
ZERO_EXTEND
\
||
GET_CODE
(
XEXP
(
X
,
0
))
==
SIGN_EXTEND
)
\
&&
GET_MODE
(
X
)
==
SImode
)
\
return
COSTS_N_INSNS
(
MULW_COST
);
\
if
(
GET_MODE
(
X
)
==
QImode
||
GET_MODE
(
X
)
==
HImode
)
\
return
COSTS_N_INSNS
(
MULW_COST
);
\
else
\
...
...
@@ -1409,7 +1427,7 @@ __transfer_from_trampoline () \
case
MOD
:
\
case
UMOD
:
\
if
(
GET_MODE
(
X
)
==
QImode
||
GET_MODE
(
X
)
==
HImode
)
\
return COSTS_N_INSNS (
27);
/* div.w */
\
return
COSTS_N_INSNS
(
DIVW_COST
);
/* div.w */
\
return
COSTS_N_INSNS
(
43
);
/* div.l */
/* Tell final.c how to eliminate redundant test instructions. */
...
...
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