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
c8679567
Commit
c8679567
authored
Mar 24, 2011
by
Eric Botcazou
Committed by
Eric Botcazou
Mar 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* dojump.c (do_jump_by_parts_greater_rtx): Optimize in specific cases.
From-SVN: r171425
parent
27173058
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
8 deletions
+34
-8
gcc/ChangeLog
+4
-0
gcc/dojump.c
+30
-8
No files found.
gcc/ChangeLog
View file @
c8679567
2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
* dojump.c (do_jump_by_parts_greater_rtx): Optimize in specific cases.
2011-03-24 Uros Bizjak <ubizjak@gmail.com>
2011-03-24 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (ix86_print_operand): Output DFmode const_double
* config/i386/i386.md (ix86_print_operand): Output DFmode const_double
...
...
gcc/dojump.c
View file @
c8679567
...
@@ -637,14 +637,33 @@ do_jump_by_parts_greater_rtx (enum machine_mode mode, int unsignedp, rtx op0,
...
@@ -637,14 +637,33 @@ do_jump_by_parts_greater_rtx (enum machine_mode mode, int unsignedp, rtx op0,
{
{
int
nwords
=
(
GET_MODE_SIZE
(
mode
)
/
UNITS_PER_WORD
);
int
nwords
=
(
GET_MODE_SIZE
(
mode
)
/
UNITS_PER_WORD
);
rtx
drop_through_label
=
0
;
rtx
drop_through_label
=
0
;
bool
drop_through_if_true
=
false
,
drop_through_if_false
=
false
;
enum
rtx_code
code
=
GT
;
int
i
;
int
i
;
if
(
!
if_true_label
||
!
if_false_label
)
if
(
!
if_true_label
||
!
if_false_label
)
drop_through_label
=
gen_label_rtx
();
drop_through_label
=
gen_label_rtx
();
if
(
!
if_true_label
)
if
(
!
if_true_label
)
if_true_label
=
drop_through_label
;
{
if_true_label
=
drop_through_label
;
drop_through_if_true
=
true
;
}
if
(
!
if_false_label
)
if
(
!
if_false_label
)
if_false_label
=
drop_through_label
;
{
if_false_label
=
drop_through_label
;
drop_through_if_false
=
true
;
}
/* Deal with the special case 0 > x: only one comparison is necessary and
we reverse it to avoid jumping to the drop-through label. */
if
(
op0
==
const0_rtx
&&
drop_through_if_true
&&
!
drop_through_if_false
)
{
code
=
LE
;
if_true_label
=
if_false_label
;
if_false_label
=
drop_through_label
;
drop_through_if_true
=
false
;
drop_through_if_false
=
true
;
}
/* Compare a word at a time, high order first. */
/* Compare a word at a time, high order first. */
for
(
i
=
0
;
i
<
nwords
;
i
++
)
for
(
i
=
0
;
i
<
nwords
;
i
++
)
...
@@ -663,17 +682,20 @@ do_jump_by_parts_greater_rtx (enum machine_mode mode, int unsignedp, rtx op0,
...
@@ -663,17 +682,20 @@ do_jump_by_parts_greater_rtx (enum machine_mode mode, int unsignedp, rtx op0,
}
}
/* All but high-order word must be compared as unsigned. */
/* All but high-order word must be compared as unsigned. */
do_compare_rtx_and_jump
(
op0_word
,
op1_word
,
GT
,
do_compare_rtx_and_jump
(
op0_word
,
op1_word
,
code
,
(
unsignedp
||
i
>
0
),
(
unsignedp
||
i
>
0
),
word_mode
,
NULL_RTX
,
word_mode
,
NULL_RTX
,
NULL_RTX
,
if_true_label
,
NULL_RTX
,
if_true_label
,
prob
);
prob
);
/* Emit only one comparison for 0. Do not emit the last cond jump. */
if
(
op0
==
const0_rtx
||
i
==
nwords
-
1
)
break
;
/* Consider lower words only if these are equal. */
/* Consider lower words only if these are equal. */
do_compare_rtx_and_jump
(
op0_word
,
op1_word
,
NE
,
unsignedp
,
word_mode
,
do_compare_rtx_and_jump
(
op0_word
,
op1_word
,
NE
,
unsignedp
,
word_mode
,
NULL_RTX
,
NULL_RTX
,
if_false_label
,
NULL_RTX
,
NULL_RTX
,
if_false_label
,
inv
(
prob
));
inv
(
prob
));
}
}
if
(
if_false_label
)
if
(
!
drop_through_if_false
)
emit_jump
(
if_false_label
);
emit_jump
(
if_false_label
);
if
(
drop_through_label
)
if
(
drop_through_label
)
emit_label
(
drop_through_label
);
emit_label
(
drop_through_label
);
...
...
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