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
c3c2cb37
Commit
c3c2cb37
authored
Sep 23, 1992
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(significant_bits, num_sign_bit_copies): Handle SUBREGs made for promoted
variables. From-SVN: r2215
parent
d6749dec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
gcc/combine.c
+16
-0
No files found.
gcc/combine.c
View file @
c3c2cb37
...
...
@@ -6083,6 +6083,14 @@ significant_bits (x, mode)
break
;
case
SUBREG
:
/* If this is a SUBREG formed for a promoted variable that has
been zero-extended, we know that at least the high-order bits
are zero, though others might be too. */
if
(
SUBREG_PROMOTED_VAR_P
(
x
)
&&
SUBREG_PROMOTED_UNSIGNED_P
(
x
))
significant
=
(
GET_MODE_MASK
(
GET_MODE
(
x
))
&
significant_bits
(
SUBREG_REG
(
x
),
GET_MODE
(
x
)));
/* If the inner mode is a single word for both the host and target
machines, we can compute this from which bits of the inner
object are known significant. */
...
...
@@ -6220,6 +6228,14 @@ num_sign_bit_copies (x, mode)
return
(
sig
==
0
?
bitwidth
:
bitwidth
-
floor_log2
(
sig
)
-
1
);
case
SUBREG
:
/* If this is a SUBREG for a promoted object that is sign-extended
and we are looking at it in a wider mode, we know that at least the
high-order bits are known to be sign bit copies. */
if
(
SUBREG_PROMOTED_VAR_P
(
x
)
&&
!
SUBREG_PROMOTED_UNSIGNED_P
(
x
))
return
(
GET_MODE_BITSIZE
(
mode
)
-
GET_MODE_BITSIZE
(
GET_MODE
(
x
))
+
num_sign_bit_copies
(
SUBREG_REG
(
x
),
GET_MODE
(
x
)));
/* For a smaller object, just ignore the high bits. */
if
(
bitwidth
<=
GET_MODE_BITSIZE
(
GET_MODE
(
SUBREG_REG
(
x
))))
{
...
...
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