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
947255ed
Commit
947255ed
authored
Apr 25, 1999
by
Richard Henderson
Committed by
Richard Henderson
Apr 25, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* stmt.c (expand_asm_operands): Reload in-out reg-only memory operands.
From-SVN: r26628
parent
7e4e2d26
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletions
+18
-1
gcc/ChangeLog
+4
-0
gcc/stmt.c
+14
-1
No files found.
gcc/ChangeLog
View file @
947255ed
Sun
Apr
25
23
:
03
:
32
1999
Richard
Henderson
<
rth
@cygnus
.
com
>
*
stmt
.
c
(
expand_asm_operands
)
:
Reload
in
-
out
reg
-
only
memory
operands
.
Sun
Apr
25
13
:
06
:
13
1999
Richard
Henderson
<
rth
@cygnus
.
com
>
Sun
Apr
25
13
:
06
:
13
1999
Richard
Henderson
<
rth
@cygnus
.
com
>
*
function
.
c
(
assign_parms
/
STACK_BYTES
)
:
Revert
last
change
,
*
function
.
c
(
assign_parms
/
STACK_BYTES
)
:
Revert
last
change
,
...
...
gcc/stmt.c
View file @
947255ed
...
@@ -1183,6 +1183,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
...
@@ -1183,6 +1183,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
/* Vector of RTX's of evaluated output operands. */
/* Vector of RTX's of evaluated output operands. */
rtx
*
output_rtx
=
(
rtx
*
)
alloca
(
noutputs
*
sizeof
(
rtx
));
rtx
*
output_rtx
=
(
rtx
*
)
alloca
(
noutputs
*
sizeof
(
rtx
));
int
*
inout_opnum
=
(
int
*
)
alloca
(
noutputs
*
sizeof
(
int
));
int
*
inout_opnum
=
(
int
*
)
alloca
(
noutputs
*
sizeof
(
int
));
rtx
*
real_output_rtx
=
(
rtx
*
)
alloca
(
noutputs
*
sizeof
(
rtx
));
enum
machine_mode
*
inout_mode
enum
machine_mode
*
inout_mode
=
(
enum
machine_mode
*
)
alloca
(
noutputs
*
sizeof
(
enum
machine_mode
));
=
(
enum
machine_mode
*
)
alloca
(
noutputs
*
sizeof
(
enum
machine_mode
));
/* The insn we have emitted. */
/* The insn we have emitted. */
...
@@ -1360,6 +1361,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
...
@@ -1360,6 +1361,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
Make the asm insn write into that, then our caller will copy it to
Make the asm insn write into that, then our caller will copy it to
the real output operand. Likewise for promoted variables. */
the real output operand. Likewise for promoted variables. */
real_output_rtx
[
i
]
=
NULL_RTX
;
if
((
TREE_CODE
(
val
)
==
INDIRECT_REF
if
((
TREE_CODE
(
val
)
==
INDIRECT_REF
&&
allows_mem
)
&&
allows_mem
)
||
(
TREE_CODE_CLASS
(
TREE_CODE
(
val
))
==
'd'
||
(
TREE_CODE_CLASS
(
TREE_CODE
(
val
))
==
'd'
...
@@ -1379,7 +1381,12 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
...
@@ -1379,7 +1381,12 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
if
(
!
allows_reg
&&
GET_CODE
(
output_rtx
[
i
])
!=
MEM
)
if
(
!
allows_reg
&&
GET_CODE
(
output_rtx
[
i
])
!=
MEM
)
error
(
"output number %d not directly addressable"
,
i
);
error
(
"output number %d not directly addressable"
,
i
);
if
(
!
allows_mem
&&
GET_CODE
(
output_rtx
[
i
])
==
MEM
)
if
(
!
allows_mem
&&
GET_CODE
(
output_rtx
[
i
])
==
MEM
)
error
(
"output number %d not restored to memory"
,
i
);
{
real_output_rtx
[
i
]
=
protect_from_queue
(
output_rtx
[
i
],
1
);
output_rtx
[
i
]
=
gen_reg_rtx
(
GET_MODE
(
output_rtx
[
i
]));
if
(
is_inout
)
emit_move_insn
(
output_rtx
[
i
],
real_output_rtx
[
i
]);
}
}
}
else
else
{
{
...
@@ -1662,6 +1669,12 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
...
@@ -1662,6 +1669,12 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
insn
=
emit_insn
(
body
);
insn
=
emit_insn
(
body
);
}
}
/* For any outputs that needed reloading into registers, spill them
back to where they belong. */
for
(
i
=
0
;
i
<
noutputs
;
++
i
)
if
(
real_output_rtx
[
i
])
emit_move_insn
(
real_output_rtx
[
i
],
output_rtx
[
i
]);
free_temp_slots
();
free_temp_slots
();
}
}
...
...
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