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
3f5cfed6
Commit
3f5cfed6
authored
Mar 21, 1992
by
James Van Artsdalen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r542
parent
31c714e3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
9 deletions
+28
-9
gcc/reg-stack.c
+28
-9
No files found.
gcc/reg-stack.c
View file @
3f5cfed6
...
...
@@ -58,7 +58,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
A store insn is a SET whose SET_DEST is FIRST_STACK_REG, and whose
SET_SRC is REG or MEM.
The case where
both the SET_SRC and SET_DEST
FIRST_STACK_REG
The case where
the SET_SRC and SET_DEST are both
FIRST_STACK_REG
appears ambiguous. As a special case, the presence of a REG_DEAD note
for FIRST_STACK_REG differentiates between a load insn and a pop.
...
...
@@ -809,9 +809,11 @@ record_asm_reg_life (insn, regstack, operands, constraints,
/* Set up CLOBBER_REG. */
n_clobbers
=
0
;
clobber_reg
=
(
rtx
*
)
alloca
(
XVECLEN
(
body
,
0
)
*
sizeof
(
rtx
*
));
if
(
GET_CODE
(
body
)
==
PARALLEL
)
{
clobber_reg
=
(
rtx
*
)
alloca
(
XVECLEN
(
body
,
0
)
*
sizeof
(
rtx
*
));
for
(
i
=
0
;
i
<
XVECLEN
(
body
,
0
);
i
++
)
if
(
GET_CODE
(
XVECEXP
(
body
,
0
,
i
))
==
CLOBBER
)
{
...
...
@@ -827,6 +829,7 @@ record_asm_reg_life (insn, regstack, operands, constraints,
n_clobbers
++
;
}
}
}
/* Enforce rule #4: Output operands must specifically indicate which
reg an output appears in after an asm. "=f" is not allowed: the
...
...
@@ -2130,10 +2133,12 @@ subst_asm_stack_regs (insn, regstack, operands, operands_loc, constraints,
/* Set up CLOBBER_REG and CLOBBER_LOC. */
n_clobbers
=
0
;
if
(
GET_CODE
(
body
)
==
PARALLEL
)
{
clobber_reg
=
(
rtx
*
)
alloca
(
XVECLEN
(
body
,
0
)
*
sizeof
(
rtx
*
));
clobber_loc
=
(
rtx
**
)
alloca
(
XVECLEN
(
body
,
0
)
*
sizeof
(
rtx
**
));
if
(
GET_CODE
(
body
)
==
PARALLEL
)
for
(
i
=
0
;
i
<
XVECLEN
(
body
,
0
);
i
++
)
if
(
GET_CODE
(
XVECEXP
(
body
,
0
,
i
))
==
CLOBBER
)
{
...
...
@@ -2154,6 +2159,7 @@ subst_asm_stack_regs (insn, regstack, operands, operands_loc, constraints,
n_clobbers
++
;
}
}
}
bcopy
(
regstack
,
&
temp_stack
,
sizeof
(
temp_stack
));
...
...
@@ -2287,22 +2293,35 @@ subst_asm_stack_regs (insn, regstack, operands, operands_loc, constraints,
/* Now emit a pop insn for any REG_UNUSED output, or any REG_DEAD
input that the asm didn't implicitly pop. If the asm didn't
implicitly pop a reg, that reg will still be live.
implicitly pop a
n input
reg, that reg will still be live.
Note that we can't use find_regno_note here: the register numbers
in the death notes have already been substituted. */
for
(
i
=
0
;
i
<
n_outputs
+
n_inputs
;
i
++
)
for
(
i
=
0
;
i
<
n_outputs
;
i
++
)
if
(
STACK_REG_P
(
operands
[
i
]))
{
int
j
;
for
(
j
=
0
;
j
<
n_notes
;
j
++
)
if
(
REGNO
(
operands
[
i
])
==
REGNO
(
note_reg
[
j
])
&&
note_kind
[
j
]
==
REG_UNUSED
)
{
insn
=
emit_pop_insn
(
insn
,
regstack
,
operands
[
i
],
emit_insn_after
);
break
;
}
}
for
(
i
=
first_input
;
i
<
first_input
+
n_inputs
;
i
++
)
if
(
STACK_REG_P
(
operands
[
i
]))
{
int
j
;
for
(
j
=
0
;
j
<
n_notes
;
j
++
)
if
(
REGNO
(
operands
[
i
])
==
REGNO
(
note_reg
[
j
])
&&
(
note_kind
[
j
]
==
REG_UNUSED
||
(
note_kind
[
j
]
==
REG_DEAD
&&
TEST_HARD_REG_BIT
(
regstack
->
reg_set
,
REGNO
(
operands
[
i
])))))
&&
note_kind
[
j
]
==
REG_DEAD
&&
TEST_HARD_REG_BIT
(
regstack
->
reg_set
,
REGNO
(
operands
[
i
])))
{
insn
=
emit_pop_insn
(
insn
,
regstack
,
operands
[
i
],
emit_insn_after
);
...
...
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