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
a45cf58c
Commit
a45cf58c
authored
Dec 13, 1995
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(expand_divmod): Don't use TARGET if it's the wrong mode.
From-SVN: r10708
parent
8092a8e8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
gcc/expmed.c
+9
-3
No files found.
gcc/expmed.c
View file @
a45cf58c
...
...
@@ -3188,7 +3188,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
or remainder to get floor rounding, once we have the remainder.
Notice that we compute also the final remainder value here,
and return the result right away. */
if
(
target
==
0
)
if
(
target
==
0
||
GET_MODE
(
target
)
!=
compute_mode
)
target
=
gen_reg_rtx
(
compute_mode
);
if
(
rem_flag
)
...
...
@@ -3315,7 +3315,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
quotient or remainder to get ceiling rounding, once we have the
remainder. Notice that we compute also the final remainder
value here, and return the result right away. */
if
(
target
==
0
)
if
(
target
==
0
||
GET_MODE
(
target
)
!=
compute_mode
)
target
=
gen_reg_rtx
(
compute_mode
);
if
(
rem_flag
)
...
...
@@ -3417,7 +3417,7 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
quotient or remainder to get ceiling rounding, once we have the
remainder. Notice that we compute also the final remainder
value here, and return the result right away. */
if
(
target
==
0
)
if
(
target
==
0
||
GET_MODE
(
target
)
!=
compute_mode
)
target
=
gen_reg_rtx
(
compute_mode
);
if
(
rem_flag
)
{
...
...
@@ -3601,6 +3601,9 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
if
(
quotient
==
0
)
{
if
(
target
&&
GET_MODE
(
target
)
!=
compute_mode
)
target
=
0
;
if
(
rem_flag
)
{
/* Try to produce the remainder directly without a library call. */
...
...
@@ -3652,6 +3655,9 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
if
(
rem_flag
)
{
if
(
target
&&
GET_MODE
(
target
)
!=
compute_mode
)
target
=
0
;
if
(
quotient
==
0
)
/* No divide instruction either. Use library for remainder. */
remainder
=
sign_expand_binop
(
compute_mode
,
umod_optab
,
smod_optab
,
...
...
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