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
f0dbe372
Commit
f0dbe372
authored
Oct 08, 1993
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(expand_expr, MAX_EXPR and MIN_EXPR case):
Don't store in TARGET twice if it's volatile. From-SVN: r5688
parent
a8513030
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
11 deletions
+25
-11
gcc/expr.c
+25
-11
No files found.
gcc/expr.c
View file @
f0dbe372
...
...
@@ -5041,42 +5041,56 @@ expand_expr (exp, target, tmode, modifier)
if
(
temp
!=
0
)
return
temp
;
if
(
target
!=
op0
)
emit_move_insn
(
target
,
op0
);
/* If TARGET is volatile, do the work into a pseudo,
then store it (just once!) into TARGET. */
subtarget
=
target
;
if
(
GET_CODE
(
subtarget
)
==
MEM
&&
MEM_VOLATILE_P
(
subtarget
))
subtarget
=
gen_rtx
(
GET_MODE
(
subtarget
));
/* First, copy operand 0. */
if
(
subtarget
!=
op0
)
emit_move_insn
(
subtarget
,
op0
);
op0
=
gen_label_rtx
();
/* Then, if operand 1 is better, copy that. */
/* If this mode is an integer too wide to compare properly,
compare word by word. Rely on cse to optimize constant cases. */
if
(
GET_MODE_CLASS
(
mode
)
==
MODE_INT
&&
!
can_compare_p
(
mode
))
{
if
(
code
==
MAX_EXPR
)
do_jump_by_parts_greater_rtx
(
mode
,
TREE_UNSIGNED
(
type
),
target
,
op1
,
NULL
,
op0
);
do_jump_by_parts_greater_rtx
(
mode
,
TREE_UNSIGNED
(
type
),
sub
target
,
op1
,
NULL
,
op0
);
else
do_jump_by_parts_greater_rtx
(
mode
,
TREE_UNSIGNED
(
type
),
op1
,
target
,
NULL
,
op0
);
emit_move_insn
(
target
,
op1
);
do_jump_by_parts_greater_rtx
(
mode
,
TREE_UNSIGNED
(
type
),
op1
,
sub
target
,
NULL
,
op0
);
emit_move_insn
(
sub
target
,
op1
);
}
else
{
if
(
code
==
MAX_EXPR
)
temp
=
(
TREE_UNSIGNED
(
TREE_TYPE
(
TREE_OPERAND
(
exp
,
1
)))
?
compare_from_rtx
(
target
,
op1
,
GEU
,
1
,
mode
,
NULL_RTX
,
0
)
:
compare_from_rtx
(
target
,
op1
,
GE
,
0
,
mode
,
NULL_RTX
,
0
));
?
compare_from_rtx
(
sub
target
,
op1
,
GEU
,
1
,
mode
,
NULL_RTX
,
0
)
:
compare_from_rtx
(
sub
target
,
op1
,
GE
,
0
,
mode
,
NULL_RTX
,
0
));
else
temp
=
(
TREE_UNSIGNED
(
TREE_TYPE
(
TREE_OPERAND
(
exp
,
1
)))
?
compare_from_rtx
(
target
,
op1
,
LEU
,
1
,
mode
,
NULL_RTX
,
0
)
:
compare_from_rtx
(
target
,
op1
,
LE
,
0
,
mode
,
NULL_RTX
,
0
));
?
compare_from_rtx
(
sub
target
,
op1
,
LEU
,
1
,
mode
,
NULL_RTX
,
0
)
:
compare_from_rtx
(
sub
target
,
op1
,
LE
,
0
,
mode
,
NULL_RTX
,
0
));
if
(
temp
==
const0_rtx
)
emit_move_insn
(
target
,
op1
);
emit_move_insn
(
sub
target
,
op1
);
else
if
(
temp
!=
const_true_rtx
)
{
if
(
bcc_gen_fctn
[(
int
)
GET_CODE
(
temp
)]
!=
0
)
emit_jump_insn
((
*
bcc_gen_fctn
[(
int
)
GET_CODE
(
temp
)])
(
op0
));
else
abort
();
emit_move_insn
(
target
,
op1
);
emit_move_insn
(
sub
target
,
op1
);
}
}
emit_label
(
op0
);
/* Store into the real target. */
if
(
target
!=
subtarget
)
emit_move_insn
(
target
,
subtarget
);
return
target
;
/* ??? Can optimize when the operand of this is a bitwise operation,
...
...
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