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
dc38b292
Commit
dc38b292
authored
Feb 15, 1997
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(expand_divmod): prefer divmod in same mode over div in wider mode.
From-SVN: r13638
parent
2d204901
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
gcc/expmed.c
+12
-5
No files found.
gcc/expmed.c
View file @
dc38b292
...
...
@@ -3661,11 +3661,18 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
return
gen_lowpart
(
mode
,
remainder
);
}
/* Produce the quotient. */
/* Try a quotient insn, but not a library call. */
quotient
=
sign_expand_binop
(
compute_mode
,
udiv_optab
,
sdiv_optab
,
op0
,
op1
,
rem_flag
?
NULL_RTX
:
target
,
unsignedp
,
OPTAB_WIDEN
);
/* Produce the quotient. Try a quotient insn, but not a library call.
If we have a divmod in this mode, use it in preference to widening
the div (for this test we assume it will not fail). Note that optab2
is set to the one of the two optabs that the call below will use. */
quotient
=
sign_expand_binop
(
compute_mode
,
udiv_optab
,
sdiv_optab
,
op0
,
op1
,
rem_flag
?
NULL_RTX
:
target
,
unsignedp
,
((
optab2
->
handlers
[(
int
)
compute_mode
].
insn_code
!=
CODE_FOR_nothing
)
?
OPTAB_DIRECT
:
OPTAB_WIDEN
));
if
(
quotient
==
0
)
{
/* No luck there. Try a quotient-and-remainder insn,
...
...
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