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
21b2a157
Commit
21b2a157
authored
Apr 15, 1996
by
Jim Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(do_store_flag): Before calling exact_log2, remove any
sign extension bits. From-SVN: r11803
parent
34f1bdc7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
gcc/expr.c
+13
-2
No files found.
gcc/expr.c
View file @
21b2a157
...
...
@@ -10558,10 +10558,21 @@ do_store_flag (exp, target, mode, only_cheap)
&&
TYPE_PRECISION
(
type
)
<=
HOST_BITS_PER_WIDE_INT
)
{
tree
inner
=
TREE_OPERAND
(
arg0
,
0
);
int
bitnum
=
exact_log2
(
INTVAL
(
expand_expr
(
TREE_OPERAND
(
arg0
,
1
),
NULL_RTX
,
VOIDmode
,
0
)))
;
HOST_WIDE_INT
tem
;
int
bitnum
;
int
ops_unsignedp
;
tem
=
INTVAL
(
expand_expr
(
TREE_OPERAND
(
arg0
,
1
),
NULL_RTX
,
VOIDmode
,
0
));
/* In this case, immed_double_const will sign extend the value to make
it look the same on the host and target. We must remove the
sign-extension before calling exact_log2, since exact_log2 will
fail for negative values. */
if
(
BITS_PER_WORD
<
HOST_BITS_PER_WIDE_INT
&&
BITS_PER_WORD
==
GET_MODE_BITSIZE
(
TYPE_MODE
(
type
)))
tem
=
tem
&
(((
HOST_WIDE_INT
)
1
<<
BITS_PER_WORD
)
-
1
);
bitnum
=
exact_log2
(
tem
);
/* If INNER is a right shift of a constant and it plus BITNUM does
not overflow, adjust BITNUM and INNER. */
...
...
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