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
2f64ad0f
Commit
2f64ad0f
authored
Dec 01, 2010
by
Michael Meissner
Committed by
Michael Meissner
Dec 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide FMA costs; enable some debug flags
From-SVN: r167354
parent
6399666b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
57 deletions
+22
-57
gcc/ChangeLog
+6
-0
gcc/config/rs6000/rs6000.c
+16
-57
No files found.
gcc/ChangeLog
View file @
2f64ad0f
2010
-
12
-
01
Michael
Meissner
<
meissner
@linux
.
vnet
.
ibm
.
com
>
*
config
/
rs6000
/
rs6000
.
c
(
rs6000_option_override_internal
)
:
Fix
thinko
regarding
setting
-
mno
-<
xxx
>
debug
switches
.
(
rs6000_rtx_costs
)
:
Add
FMA
.
Delete
old
rtl
based
FMA
costs
.
2010
-
12
-
01
Joseph
Myers
<
joseph
@codesourcery
.
com
>
2010
-
12
-
01
Joseph
Myers
<
joseph
@codesourcery
.
com
>
*
intl
.
c
:
Don
'
t
include
tm
.
h
.
*
intl
.
c
:
Don
'
t
include
tm
.
h
.
gcc/config/rs6000/rs6000.c
View file @
2f64ad0f
...
@@ -3017,14 +3017,15 @@ rs6000_option_override_internal (bool global_init_p)
...
@@ -3017,14 +3017,15 @@ rs6000_option_override_internal (bool global_init_p)
||
rs6000_cpu
==
PROCESSOR_PPCE500MC
||
rs6000_cpu
==
PROCESSOR_PPCE500MC
||
rs6000_cpu
==
PROCESSOR_PPCE500MC64
);
||
rs6000_cpu
==
PROCESSOR_PPCE500MC64
);
/* Allow debug switches to override the above settings. */
/* Allow debug switches to override the above settings. These are set to -1
if
(
TARGET_ALWAYS_HINT
>
0
)
in rs6000.opt to indicate the user hasn't directly set the switch. */
if
(
TARGET_ALWAYS_HINT
>=
0
)
rs6000_always_hint
=
TARGET_ALWAYS_HINT
;
rs6000_always_hint
=
TARGET_ALWAYS_HINT
;
if
(
TARGET_SCHED_GROUPS
>
0
)
if
(
TARGET_SCHED_GROUPS
>
=
0
)
rs6000_sched_groups
=
TARGET_SCHED_GROUPS
;
rs6000_sched_groups
=
TARGET_SCHED_GROUPS
;
if
(
TARGET_ALIGN_BRANCH_TARGETS
>
0
)
if
(
TARGET_ALIGN_BRANCH_TARGETS
>
=
0
)
rs6000_align_branch_targets
=
TARGET_ALIGN_BRANCH_TARGETS
;
rs6000_align_branch_targets
=
TARGET_ALIGN_BRANCH_TARGETS
;
rs6000_sched_restricted_insns_priority
rs6000_sched_restricted_insns_priority
...
@@ -26072,54 +26073,9 @@ rs6000_rtx_costs (rtx x, int code, int outer_code, int *total,
...
@@ -26072,54 +26073,9 @@ rs6000_rtx_costs (rtx x, int code, int outer_code, int *total,
return
true
;
return
true
;
case
PLUS
:
case
PLUS
:
if
(
mode
==
DFmode
)
{
if
(
GET_CODE
(
XEXP
(
x
,
0
))
==
MULT
)
{
/* FNMA accounted in outer NEG. */
if
(
outer_code
==
NEG
)
*
total
=
rs6000_cost
->
dmul
-
rs6000_cost
->
fp
;
else
*
total
=
rs6000_cost
->
dmul
;
}
else
*
total
=
rs6000_cost
->
fp
;
}
else
if
(
mode
==
SFmode
)
{
/* FNMA accounted in outer NEG. */
if
(
outer_code
==
NEG
&&
GET_CODE
(
XEXP
(
x
,
0
))
==
MULT
)
*
total
=
0
;
else
*
total
=
rs6000_cost
->
fp
;
}
else
*
total
=
COSTS_N_INSNS
(
1
);
return
false
;
case
MINUS
:
case
MINUS
:
if
(
mode
==
DFmode
)
if
(
FLOAT_MODE_P
(
mode
))
{
*
total
=
rs6000_cost
->
fp
;
if
(
GET_CODE
(
XEXP
(
x
,
0
))
==
MULT
||
GET_CODE
(
XEXP
(
x
,
1
))
==
MULT
)
{
/* FNMA accounted in outer NEG. */
if
(
outer_code
==
NEG
)
*
total
=
rs6000_cost
->
dmul
-
rs6000_cost
->
fp
;
else
*
total
=
rs6000_cost
->
dmul
;
}
else
*
total
=
rs6000_cost
->
fp
;
}
else
if
(
mode
==
SFmode
)
{
/* FNMA accounted in outer NEG. */
if
(
outer_code
==
NEG
&&
GET_CODE
(
XEXP
(
x
,
0
))
==
MULT
)
*
total
=
0
;
else
*
total
=
rs6000_cost
->
fp
;
}
else
else
*
total
=
COSTS_N_INSNS
(
1
);
*
total
=
COSTS_N_INSNS
(
1
);
return
false
;
return
false
;
...
@@ -26134,20 +26090,23 @@ rs6000_rtx_costs (rtx x, int code, int outer_code, int *total,
...
@@ -26134,20 +26090,23 @@ rs6000_rtx_costs (rtx x, int code, int outer_code, int *total,
else
else
*
total
=
rs6000_cost
->
mulsi_const
;
*
total
=
rs6000_cost
->
mulsi_const
;
}
}
/* FMA accounted in outer PLUS/MINUS. */
else
if
((
mode
==
DFmode
||
mode
==
SFmode
)
&&
(
outer_code
==
PLUS
||
outer_code
==
MINUS
))
*
total
=
0
;
else
if
(
mode
==
DFmode
)
*
total
=
rs6000_cost
->
dmul
;
else
if
(
mode
==
SFmode
)
else
if
(
mode
==
SFmode
)
*
total
=
rs6000_cost
->
fp
;
*
total
=
rs6000_cost
->
fp
;
else
if
(
FLOAT_MODE_P
(
mode
))
*
total
=
rs6000_cost
->
dmul
;
else
if
(
mode
==
DImode
)
else
if
(
mode
==
DImode
)
*
total
=
rs6000_cost
->
muldi
;
*
total
=
rs6000_cost
->
muldi
;
else
else
*
total
=
rs6000_cost
->
mulsi
;
*
total
=
rs6000_cost
->
mulsi
;
return
false
;
return
false
;
case
FMA
:
if
(
mode
==
SFmode
)
*
total
=
rs6000_cost
->
fp
;
else
*
total
=
rs6000_cost
->
dmul
;
break
;
case
DIV
:
case
DIV
:
case
MOD
:
case
MOD
:
if
(
FLOAT_MODE_P
(
mode
))
if
(
FLOAT_MODE_P
(
mode
))
...
...
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