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
e6d8c385
Commit
e6d8c385
authored
Jan 14, 1995
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(get_inner_reference): Only treat offset of PLUS_EXPR as special if
second arg is integer constant. From-SVN: r8762
parent
32e2dec7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
31 deletions
+15
-31
gcc/expr.c
+15
-31
No files found.
gcc/expr.c
View file @
e6d8c385
/* Convert tree expression to rtl instructions, for GNU compiler.
Copyright (C) 1988, 1992, 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1988, 1992, 1993, 1994
, 1995
Free Software Foundation, Inc.
This file is part of GNU CC.
...
...
@@ -3522,6 +3522,7 @@ get_inner_reference (exp, pbitsize, pbitpos, poffset, pmode,
tree
pos
=
(
TREE_CODE
(
exp
)
==
COMPONENT_REF
?
DECL_FIELD_BITPOS
(
TREE_OPERAND
(
exp
,
1
))
:
TREE_OPERAND
(
exp
,
2
));
tree
constant
=
integer_zero_node
,
var
=
pos
;
/* If this field hasn't been filled in yet, don't go
past it. This should only happen when folding expressions
...
...
@@ -3529,37 +3530,20 @@ get_inner_reference (exp, pbitsize, pbitpos, poffset, pmode,
if
(
pos
==
0
)
break
;
if
(
TREE_CODE
(
pos
)
==
PLUS_EXPR
)
{
tree
constant
,
var
;
if
(
TREE_CODE
(
TREE_OPERAND
(
pos
,
0
))
==
INTEGER_CST
)
{
constant
=
TREE_OPERAND
(
pos
,
0
);
var
=
TREE_OPERAND
(
pos
,
1
);
}
else
if
(
TREE_CODE
(
TREE_OPERAND
(
pos
,
1
))
==
INTEGER_CST
)
{
constant
=
TREE_OPERAND
(
pos
,
1
);
var
=
TREE_OPERAND
(
pos
,
0
);
}
else
abort
();
*
pbitpos
+=
TREE_INT_CST_LOW
(
constant
);
offset
=
size_binop
(
PLUS_EXPR
,
offset
,
size_binop
(
EXACT_DIV_EXPR
,
var
,
size_int
(
BITS_PER_UNIT
)));
}
/* Assume here that the offset is a multiple of a unit.
If not, there should be an explicitly added constant. */
if
(
TREE_CODE
(
pos
)
==
PLUS_EXPR
&&
TREE_CODE
(
TREE_OPERAND
(
pos
,
1
))
==
INTEGER_CST
)
constant
=
TREE_OPERAND
(
pos
,
1
),
var
=
TREE_OPERAND
(
pos
,
0
);
else
if
(
TREE_CODE
(
pos
)
==
INTEGER_CST
)
*
pbitpos
+=
TREE_INT_CST_LOW
(
pos
);
else
{
/* Assume here that the offset is a multiple of a unit.
If not, there should be an explicitly added constant. */
offset
=
size_binop
(
PLUS_EXPR
,
offset
,
size_binop
(
EXACT_DIV_EXPR
,
pos
,
size_int
(
BITS_PER_UNIT
)));
}
constant
=
pos
,
var
=
integer_zero_node
;
*
pbitpos
+=
TREE_INT_CST_LOW
(
constant
);
if
(
var
)
offset
=
size_binop
(
PLUS_EXPR
,
offset
,
size_binop
(
EXACT_DIV_EXPR
,
var
,
size_int
(
BITS_PER_UNIT
)));
}
else
if
(
TREE_CODE
(
exp
)
==
ARRAY_REF
)
...
...
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