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
b50a024d
Commit
b50a024d
authored
Mar 31, 1995
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(expand_asm_operands): Properly handle output that can't be directly
written into. From-SVN: r9272
parent
d161fae4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
20 deletions
+19
-20
gcc/stmt.c
+19
-20
No files found.
gcc/stmt.c
View file @
b50a024d
...
@@ -1402,6 +1402,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
...
@@ -1402,6 +1402,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
for
(
i
=
0
,
tail
=
outputs
;
tail
;
tail
=
TREE_CHAIN
(
tail
),
i
++
)
for
(
i
=
0
,
tail
=
outputs
;
tail
;
tail
=
TREE_CHAIN
(
tail
),
i
++
)
{
{
tree
val
=
TREE_VALUE
(
tail
);
tree
val
=
TREE_VALUE
(
tail
);
tree
type
=
TREE_TYPE
(
val
);
tree
val1
;
tree
val1
;
int
j
;
int
j
;
int
found_equal
;
int
found_equal
;
...
@@ -1429,31 +1430,29 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
...
@@ -1429,31 +1430,29 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
return
;
return
;
}
}
/* If an output operand is not a variable or indirect ref,
/* If an output operand is not a decl or indirect ref,
or a part of one,
make a temporary to act as an intermediate. Make the asm insn
create a SAVE_EXPR which is a pseudo-reg
write into that, then our caller will copy it to the real output
to act as an intermediate temporary.
operand. Likewise for promoted variables. */
Make the asm insn write into that, then copy it to
the real output operand. */
while
(
TREE_CODE
(
val
)
==
COMPONENT_REF
if
(
TREE_CODE
(
val
)
==
INDIRECT_REF
||
TREE_CODE
(
val
)
==
ARRAY_REF
)
||
(
TREE_CODE_CLASS
(
TREE_CODE
(
val
))
==
'd'
val
=
TREE_OPERAND
(
val
,
0
);
&&
!
(
GET_CODE
(
DECL_RTL
(
val
))
==
REG
&&
GET_MODE
(
DECL_RTL
(
val
))
!=
TYPE_MODE
(
type
))))
if
(
TREE_CODE
(
val
)
!=
VAR_DECL
output_rtx
[
i
]
=
expand_expr
(
TREE_VALUE
(
tail
),
NULL_RTX
,
VOIDmode
,
0
);
&&
TREE_CODE
(
val
)
!=
PARM_DECL
else
&&
TREE_CODE
(
val
)
!=
INDIRECT_REF
)
{
{
TREE_VALUE
(
tail
)
=
save_expr
(
TREE_VALUE
(
tail
));
if
(
TYPE_MODE
(
type
)
==
BLKmode
)
/* If it's a constant, print error now so don't crash later. */
if
(
TREE_CODE
(
TREE_VALUE
(
tail
))
!=
SAVE_EXPR
)
{
{
error
(
"invalid output in `asm'"
);
output_rtx
[
i
]
=
assign_stack_temp
(
BLKmode
,
return
;
int_size_in_bytes
(
type
),
0
);
MEM_IN_STRUCT_P
(
output_rtx
[
i
])
=
AGGREGATE_TYPE_P
(
type
);
}
}
}
else
output_rtx
[
i
]
=
gen_reg_rtx
(
TYPE_MODE
(
type
));
output_rtx
[
i
]
=
expand_expr
(
TREE_VALUE
(
tail
),
NULL_RTX
,
VOIDmode
,
0
);
TREE_VALUE
(
tail
)
=
make_tree
(
type
,
output_rtx
[
i
]);
}
}
}
if
(
ninputs
+
noutputs
>
MAX_RECOG_OPERANDS
)
if
(
ninputs
+
noutputs
>
MAX_RECOG_OPERANDS
)
...
...
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