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
2e5ec6cf
Commit
2e5ec6cf
authored
Nov 15, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(do_jump_by_parts_greater_rtx): No longer static.
(expand_expr): Delete code for plain `abs'. From-SVN: r8443
parent
69f61901
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
66 deletions
+4
-66
gcc/expr.c
+4
-66
No files found.
gcc/expr.c
View file @
2e5ec6cf
...
@@ -180,7 +180,7 @@ void bc_load_localaddr PROTO((rtx));
...
@@ -180,7 +180,7 @@ void bc_load_localaddr PROTO((rtx));
void
bc_load_parmaddr
PROTO
((
rtx
));
void
bc_load_parmaddr
PROTO
((
rtx
));
static
void
preexpand_calls
PROTO
((
tree
));
static
void
preexpand_calls
PROTO
((
tree
));
static
void
do_jump_by_parts_greater
PROTO
((
tree
,
int
,
rtx
,
rtx
));
static
void
do_jump_by_parts_greater
PROTO
((
tree
,
int
,
rtx
,
rtx
));
static
void
do_jump_by_parts_greater_rtx
PROTO
((
enum
machine_mode
,
int
,
rtx
,
rtx
,
rtx
,
rtx
));
void
do_jump_by_parts_greater_rtx
PROTO
((
enum
machine_mode
,
int
,
rtx
,
rtx
,
rtx
,
rtx
));
static
void
do_jump_by_parts_equality
PROTO
((
tree
,
rtx
,
rtx
));
static
void
do_jump_by_parts_equality
PROTO
((
tree
,
rtx
,
rtx
));
static
void
do_jump_by_parts_equality_rtx
PROTO
((
rtx
,
rtx
,
rtx
));
static
void
do_jump_by_parts_equality_rtx
PROTO
((
rtx
,
rtx
,
rtx
));
static
void
do_jump_for_compare
PROTO
((
rtx
,
rtx
,
rtx
));
static
void
do_jump_for_compare
PROTO
((
rtx
,
rtx
,
rtx
));
...
@@ -5216,70 +5216,8 @@ expand_expr (exp, target, tmode, modifier)
...
@@ -5216,70 +5216,8 @@ expand_expr (exp, target, tmode, modifier)
if
(
TREE_UNSIGNED
(
type
))
if
(
TREE_UNSIGNED
(
type
))
return
op0
;
return
op0
;
/* First try to do it with a special abs instruction. */
return
expand_abs
(
mode
,
op0
,
target
,
unsignedp
,
temp
=
expand_unop
(
mode
,
abs_optab
,
op0
,
target
,
0
);
safe_from_p
(
target
,
TREE_OPERAND
(
exp
,
0
)));
if
(
temp
!=
0
)
return
temp
;
/* If this machine has expensive jumps, we can do integer absolute
value of X as (((signed) x >> (W-1)) ^ x) - ((signed) x >> (W-1)),
where W is the width of MODE. */
if
(
GET_MODE_CLASS
(
mode
)
==
MODE_INT
&&
BRANCH_COST
>=
2
)
{
rtx
extended
=
expand_shift
(
RSHIFT_EXPR
,
mode
,
op0
,
size_int
(
GET_MODE_BITSIZE
(
mode
)
-
1
),
NULL_RTX
,
0
);
temp
=
expand_binop
(
mode
,
xor_optab
,
extended
,
op0
,
target
,
0
,
OPTAB_LIB_WIDEN
);
if
(
temp
!=
0
)
temp
=
expand_binop
(
mode
,
sub_optab
,
temp
,
extended
,
target
,
0
,
OPTAB_LIB_WIDEN
);
if
(
temp
!=
0
)
return
temp
;
}
/* If that does not win, use conditional jump and negate. */
target
=
original_target
;
op1
=
gen_label_rtx
();
if
(
target
==
0
||
!
safe_from_p
(
target
,
TREE_OPERAND
(
exp
,
0
))
||
GET_MODE
(
target
)
!=
mode
||
(
GET_CODE
(
target
)
==
MEM
&&
MEM_VOLATILE_P
(
target
))
||
(
GET_CODE
(
target
)
==
REG
&&
REGNO
(
target
)
<
FIRST_PSEUDO_REGISTER
))
target
=
gen_reg_rtx
(
mode
);
emit_move_insn
(
target
,
op0
);
NO_DEFER_POP
;
/* 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
))
do_jump_by_parts_greater_rtx
(
mode
,
0
,
target
,
const0_rtx
,
NULL_RTX
,
op1
);
else
{
temp
=
compare_from_rtx
(
target
,
CONST0_RTX
(
mode
),
GE
,
0
,
mode
,
NULL_RTX
,
0
);
if
(
temp
==
const1_rtx
)
return
target
;
else
if
(
temp
!=
const0_rtx
)
{
if
(
bcc_gen_fctn
[(
int
)
GET_CODE
(
temp
)]
!=
0
)
emit_jump_insn
((
*
bcc_gen_fctn
[(
int
)
GET_CODE
(
temp
)])
(
op1
));
else
abort
();
}
}
op0
=
expand_unop
(
mode
,
neg_optab
,
target
,
target
,
0
);
if
(
op0
!=
target
)
emit_move_insn
(
target
,
op0
);
emit_label
(
op1
);
OK_DEFER_POP
;
return
target
;
case
MAX_EXPR
:
case
MAX_EXPR
:
case
MIN_EXPR
:
case
MIN_EXPR
:
...
@@ -9026,7 +8964,7 @@ do_jump_by_parts_greater (exp, swap, if_false_label, if_true_label)
...
@@ -9026,7 +8964,7 @@ do_jump_by_parts_greater (exp, swap, if_false_label, if_true_label)
UNSIGNEDP says to do unsigned comparison.
UNSIGNEDP says to do unsigned comparison.
Jump to IF_TRUE_LABEL if OP0 is greater, IF_FALSE_LABEL otherwise. */
Jump to IF_TRUE_LABEL if OP0 is greater, IF_FALSE_LABEL otherwise. */
static
void
void
do_jump_by_parts_greater_rtx
(
mode
,
unsignedp
,
op0
,
op1
,
if_false_label
,
if_true_label
)
do_jump_by_parts_greater_rtx
(
mode
,
unsignedp
,
op0
,
op1
,
if_false_label
,
if_true_label
)
enum
machine_mode
mode
;
enum
machine_mode
mode
;
int
unsignedp
;
int
unsignedp
;
...
...
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