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
f1e60ec6
Commit
f1e60ec6
authored
May 10, 1992
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r951
parent
95d3562b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
gcc/fold-const.c
+9
-6
No files found.
gcc/fold-const.c
View file @
f1e60ec6
...
...
@@ -2027,24 +2027,26 @@ optimize_bit_field_compare (code, compare_type, lhs, rhs)
int
lvolatilep
=
0
,
rvolatilep
=
0
;
tree
linner
,
rinner
;
tree
mask
;
tree
offset
;
/* Get all the information about the extractions being done. If the bit size
if the same as the size of the underlying object, we aren't doing an
extraction at all and so can do nothing. */
linner
=
get_inner_reference
(
lhs
,
&
lbitsize
,
&
lbitpos
,
&
lmode
,
linner
=
get_inner_reference
(
lhs
,
&
lbitsize
,
&
lbitpos
,
&
offset
,
&
lmode
,
&
lunsignedp
,
&
lvolatilep
);
if
(
lbitsize
==
GET_MODE_BITSIZE
(
lmode
)
||
lbitsize
<
0
)
if
(
lbitsize
==
GET_MODE_BITSIZE
(
lmode
)
||
lbitsize
<
0
||
offset
!=
0
)
return
0
;
if
(
!
const_p
)
{
/* If this is not a constant, we can only do something if bit positions,
sizes, and signedness are the same. */
rinner
=
get_inner_reference
(
rhs
,
&
rbitsize
,
&
rbitpos
,
rinner
=
get_inner_reference
(
rhs
,
&
rbitsize
,
&
rbitpos
,
&
offset
,
&
rmode
,
&
runsignedp
,
&
rvolatilep
);
if
(
lbitpos
!=
rbitpos
||
lbitsize
!=
rbitsize
||
lunsignedp
!=
runsignedp
)
||
lunsignedp
!=
runsignedp
||
offset
!=
0
)
return
0
;
}
...
...
@@ -2204,6 +2206,7 @@ decode_field_reference (exp, pbitsize, pbitpos, pmode, punsignedp,
{
tree
mask
=
0
;
tree
inner
;
tree
offset
;
STRIP_NOPS
(
exp
);
...
...
@@ -2220,9 +2223,9 @@ decode_field_reference (exp, pbitsize, pbitpos, pmode, punsignedp,
&&
TREE_CODE
(
exp
)
!=
BIT_FIELD_REF
)
return
0
;
inner
=
get_inner_reference
(
exp
,
pbitsize
,
pbitpos
,
pmode
,
inner
=
get_inner_reference
(
exp
,
pbitsize
,
pbitpos
,
&
offset
,
pmode
,
punsignedp
,
pvolatilep
);
if
(
*
pbitsize
<
0
)
if
(
*
pbitsize
<
0
||
offset
!=
0
)
return
0
;
if
(
mask
==
0
)
...
...
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