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
e8031612
Commit
e8031612
authored
Nov 12, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(expand_divmod, case TRUNC_DIV_EXPR): Promote signed division by
0x80000000 to unsigned. From-SVN: r8430
parent
84e24c03
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
gcc/expmed.c
+5
-1
No files found.
gcc/expmed.c
View file @
e8031612
...
@@ -2740,7 +2740,9 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
...
@@ -2740,7 +2740,9 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
case
TRUNC_DIV_EXPR
:
case
TRUNC_DIV_EXPR
:
if
(
op1_is_constant
&&
HOST_BITS_PER_WIDE_INT
>=
size
)
if
(
op1_is_constant
&&
HOST_BITS_PER_WIDE_INT
>=
size
)
{
{
if
(
unsignedp
)
if
(
unsignedp
||
(
INTVAL
(
op1
)
==
(
HOST_WIDE_INT
)
1
<<
(
GET_MODE_BITSIZE
(
compute_mode
)
-
1
)))
{
{
unsigned
HOST_WIDE_INT
mh
,
ml
;
unsigned
HOST_WIDE_INT
mh
,
ml
;
int
pre_shift
,
post_shift
;
int
pre_shift
,
post_shift
;
...
@@ -2901,6 +2903,8 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
...
@@ -2901,6 +2903,8 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
tquotient
,
0
);
tquotient
,
0
);
}
}
/* We have computed OP0 / abs(OP1). If OP1 is negative, negate
the quotient. */
if
(
d
<
0
)
if
(
d
<
0
)
{
{
insn
=
get_last_insn
();
insn
=
get_last_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