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
f4857b9b
Commit
f4857b9b
authored
22 years ago
by
Alan Modra
Committed by
Alan Modra
22 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* config/rs6000/rs6000.c (output_cbranch): Hint differently for power4.
From-SVN: r55967
parent
77ca7b2e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
9 deletions
+22
-9
gcc/ChangeLog
+4
-0
gcc/config/rs6000/rs6000.c
+18
-9
No files found.
gcc/ChangeLog
View file @
f4857b9b
2002-08-02 Alan Modra <amodra@bigpond.net.au>
* config/rs6000/rs6000.c (output_cbranch): Hint differently for power4.
2002-08-01 Daniel Jacobowitz <drow@mvista.com>
* Makefile.in ($(BUILD_PREFIX_1)ggc-none.o): Use $(GGC_H).
...
...
This diff is collapsed.
Click to expand it.
gcc/config/rs6000/rs6000.c
View file @
f4857b9b
...
...
@@ -8438,21 +8438,30 @@ output_cbranch (op, label, reversed, insn)
/* Maybe we have a guess as to how likely the branch is.
The old mnemonics don't have a way to specify this information. */
pred
=
""
;
note
=
find_reg_note
(
insn
,
REG_BR_PROB
,
NULL_RTX
);
if
(
note
!=
NULL_RTX
)
{
/* PROB is the difference from 50%. */
int
prob
=
INTVAL
(
XEXP
(
note
,
0
))
-
REG_BR_PROB_BASE
/
2
;
/* For branches that are very close to 50%, assume not-taken. */
if
(
abs
(
prob
)
>
REG_BR_PROB_BASE
/
20
&&
((
prob
>
0
)
^
need_longbranch
))
pred
=
"+"
;
else
pred
=
"-"
;
bool
always_hint
=
rs6000_cpu
!=
PROCESSOR_POWER4
;
/* Only hint for highly probable/improbable branches on newer
cpus as static prediction overrides processor dynamic
prediction. For older cpus we may as well always hint, but
assume not taken for branches that are very close to 50% as a
mispredicted taken branch is more expensive than a
mispredicted not-taken branch. */
if
(
always_hint
||
abs
(
prob
)
>
REG_BR_PROB_BASE
/
100
*
48
)
{
if
(
abs
(
prob
)
>
REG_BR_PROB_BASE
/
20
&&
((
prob
>
0
)
^
need_longbranch
))
pred
=
"+"
;
else
pred
=
"-"
;
}
}
else
pred
=
""
;
if
(
label
==
NULL
)
s
+=
sprintf
(
s
,
"{b%sr|b%slr%s} "
,
ccode
,
ccode
,
pred
);
...
...
This diff is collapsed.
Click to expand it.
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