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
23bd99ae
Commit
23bd99ae
authored
Nov 16, 1996
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(optimize_bit_field_compare, decode_field_reference): Pass new arg to
get_inner_reference. From-SVN: r13188
parent
839c4796
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
gcc/fold-const.c
+6
-4
No files found.
gcc/fold-const.c
View file @
23bd99ae
...
...
@@ -2312,6 +2312,7 @@ optimize_bit_field_compare (code, compare_type, lhs, rhs)
enum
machine_mode
lmode
,
rmode
,
lnmode
,
rnmode
;
int
lunsignedp
,
runsignedp
;
int
lvolatilep
=
0
,
rvolatilep
=
0
;
int
alignment
;
tree
linner
,
rinner
;
tree
mask
;
tree
offset
;
...
...
@@ -2320,7 +2321,7 @@ optimize_bit_field_compare (code, compare_type, lhs, rhs)
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
,
&
offset
,
&
lmode
,
&
lunsignedp
,
&
lvolatilep
);
&
lunsignedp
,
&
lvolatilep
,
&
alignment
);
if
(
linner
==
lhs
||
lbitsize
==
GET_MODE_BITSIZE
(
lmode
)
||
lbitsize
<
0
||
offset
!=
0
)
return
0
;
...
...
@@ -2329,8 +2330,8 @@ optimize_bit_field_compare (code, compare_type, lhs, rhs)
{
/* 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
,
&
offset
,
&
r
mode
,
&
runsignedp
,
&
rvolatilep
);
rinner
=
get_inner_reference
(
rhs
,
&
rbitsize
,
&
rbitpos
,
&
offset
,
&
rmode
,
&
r
unsignedp
,
&
rvolatilep
,
&
alignment
);
if
(
rinner
==
rhs
||
lbitpos
!=
rbitpos
||
lbitsize
!=
rbitsize
||
lunsignedp
!=
runsignedp
||
offset
!=
0
)
...
...
@@ -2503,6 +2504,7 @@ decode_field_reference (exp, pbitsize, pbitpos, pmode, punsignedp,
tree
mask
,
inner
,
offset
;
tree
unsigned_type
;
int
precision
;
int
alignment
;
/* All the optimizations using this function assume integer fields.
There are problems with FP fields since the type_for_size call
...
...
@@ -2523,7 +2525,7 @@ decode_field_reference (exp, pbitsize, pbitpos, pmode, punsignedp,
inner
=
get_inner_reference
(
exp
,
pbitsize
,
pbitpos
,
&
offset
,
pmode
,
punsignedp
,
pvolatilep
);
punsignedp
,
pvolatilep
,
&
alignment
);
if
((
inner
==
exp
&&
and_mask
==
0
)
||
*
pbitsize
<
0
||
offset
!=
0
)
return
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