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
987c71d9
Commit
987c71d9
authored
Mar 21, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(expand_expr, case ADDR_EXPR): Update temp slot address if we put it
in a register; mark result as pointer. From-SVN: r6842
parent
88bdba96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletions
+18
-1
gcc/expr.c
+18
-1
No files found.
gcc/expr.c
View file @
987c71d9
...
...
@@ -5779,6 +5779,10 @@ expand_expr (exp, target, tmode, modifier)
return
expand_increment
(
exp
,
!
ignore
);
case
ADDR_EXPR
:
/* If nonzero, TEMP will be set to the address of something that might
be a MEM corresponding to a stack slot. */
temp
=
0
;
/* Are we taking the address of a nested function? */
if
(
TREE_CODE
(
TREE_OPERAND
(
exp
,
0
))
==
FUNCTION_DECL
&&
decl_function_context
(
TREE_OPERAND
(
exp
,
0
))
!=
0
)
...
...
@@ -5803,6 +5807,8 @@ expand_expr (exp, target, tmode, modifier)
if
(
CONSTANT_P
(
op0
))
op0
=
force_const_mem
(
TYPE_MODE
(
TREE_TYPE
(
TREE_OPERAND
(
exp
,
0
))),
op0
);
else
if
(
GET_CODE
(
op0
)
==
MEM
)
temp
=
XEXP
(
op0
,
0
);
/* These cases happen in Fortran. Is that legitimate?
Should Fortran work in another way?
...
...
@@ -5827,10 +5833,21 @@ expand_expr (exp, target, tmode, modifier)
if
(
modifier
==
EXPAND_SUM
||
modifier
==
EXPAND_INITIALIZER
)
return
XEXP
(
op0
,
0
);
op0
=
force_operand
(
XEXP
(
op0
,
0
),
target
);
}
if
(
flag_force_addr
&&
GET_CODE
(
op0
)
!=
REG
)
return
force_reg
(
Pmode
,
op0
);
op0
=
force_reg
(
Pmode
,
op0
);
if
(
GET_CODE
(
op0
)
==
REG
)
mark_reg_pointer
(
op0
);
/* If we might have had a temp slot, add an equivalent address
for it. */
if
(
temp
!=
0
)
update_temp_slot_address
(
temp
,
op0
);
return
op0
;
case
ENTRY_VALUE_EXPR
:
...
...
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