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
6bacc7b0
Commit
6bacc7b0
authored
Jan 23, 2002
by
Nick Clifton
Committed by
Nick Clifton
Jan 23, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use an UNSPEC instead of a USE to prevent prologue/epilogue insns from being
deleted. From-SVN: r49130
parent
a415f7bc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
7 deletions
+28
-7
gcc/ChangeLog
+11
-0
gcc/config/arm/arm.c
+5
-5
gcc/config/arm/arm.md
+12
-2
No files found.
gcc/ChangeLog
View file @
6bacc7b0
2002-01-23 Nick Clifton <nickc@cambridge.redhat.com>
* config/arm/arm.md (UNSPEC_PROLOGUE_USE): New unspec constant.
(prologue_use): New pattern.
* config/arm/arm.c (expand_prologue): Use gen_prologue_use in
preference to gen_rtx_USE.
(thumb_expand_prologue): Use gen_prologue_use in preference to
gen_rtx_USE.
(thumb_expand_epilogue): Use gen_prologue_use in preference to
gen_rtx_USE.
2002-01-23 Hans-Peter Nilsson <hp@bitrange.com>
2002-01-23 Hans-Peter Nilsson <hp@bitrange.com>
* loop.c [!HAVE_prefetch] (CODE_FOR_prefetch): Define to 0.
* loop.c [!HAVE_prefetch] (CODE_FOR_prefetch): Define to 0.
...
...
gcc/config/arm/arm.c
View file @
6bacc7b0
...
@@ -8331,7 +8331,7 @@ arm_expand_prologue ()
...
@@ -8331,7 +8331,7 @@ arm_expand_prologue ()
emit_insn
(
gen_rtx_SET
(
SImode
,
ip_rtx
,
insn
));
emit_insn
(
gen_rtx_SET
(
SImode
,
ip_rtx
,
insn
));
/* Add a USE to stop propagate_one_insn() from barfing. */
/* Add a USE to stop propagate_one_insn() from barfing. */
emit_insn
(
gen_
rtx_USE
(
VOIDmode
,
ip_rtx
));
emit_insn
(
gen_
prologue_use
(
ip_rtx
));
}
}
}
}
...
@@ -8377,7 +8377,7 @@ arm_expand_prologue ()
...
@@ -8377,7 +8377,7 @@ arm_expand_prologue ()
then make sure that it does not get reused by the ce2 pass. */
then make sure that it does not get reused by the ce2 pass. */
if
((
live_regs_mask
&
(
1
<<
LR_REGNUM
))
==
0
)
if
((
live_regs_mask
&
(
1
<<
LR_REGNUM
))
==
0
)
{
{
emit_insn
(
gen_
rtx_USE
(
VOIDmode
,
gen_rtx_REG
(
SImode
,
LR_REGNUM
)));
emit_insn
(
gen_
prologue_use
(
gen_rtx_REG
(
SImode
,
LR_REGNUM
)));
cfun
->
machine
->
lr_save_eliminated
=
1
;
cfun
->
machine
->
lr_save_eliminated
=
1
;
}
}
}
}
...
@@ -10186,7 +10186,7 @@ thumb_expand_prologue ()
...
@@ -10186,7 +10186,7 @@ thumb_expand_prologue ()
/* Save it by copying it into a high, scratch register. */
/* Save it by copying it into a high, scratch register. */
emit_insn
(
gen_movsi
(
spare
,
reg
));
emit_insn
(
gen_movsi
(
spare
,
reg
));
/* Add a USE to stop propagate_one_insn() from barfing. */
/* Add a USE to stop propagate_one_insn() from barfing. */
emit_insn
(
gen_
rtx_USE
(
VOIDmode
,
spare
));
emit_insn
(
gen_
prologue_use
(
spare
));
/* Decrement the stack. */
/* Decrement the stack. */
emit_insn
(
gen_movsi
(
reg
,
GEN_INT
(
-
amount
)));
emit_insn
(
gen_movsi
(
reg
,
GEN_INT
(
-
amount
)));
...
@@ -10200,7 +10200,7 @@ thumb_expand_prologue ()
...
@@ -10200,7 +10200,7 @@ thumb_expand_prologue ()
analysis will not consider the restore redundant. The
analysis will not consider the restore redundant. The
register won't be used again in this function and isn't
register won't be used again in this function and isn't
restored by the epilogue. */
restored by the epilogue. */
emit_insn
(
gen_
rtx_USE
(
VOIDmode
,
reg
));
emit_insn
(
gen_
prologue_use
(
reg
));
}
}
else
else
{
{
...
@@ -10248,7 +10248,7 @@ thumb_expand_epilogue ()
...
@@ -10248,7 +10248,7 @@ thumb_expand_epilogue ()
/* Emit a USE (stack_pointer_rtx), so that
/* Emit a USE (stack_pointer_rtx), so that
the stack adjustment will not be deleted. */
the stack adjustment will not be deleted. */
emit_insn
(
gen_
rtx_USE
(
VOIDmode
,
stack_pointer_rtx
));
emit_insn
(
gen_
prologue_use
(
stack_pointer_rtx
));
if
(
current_function_profile
||
TARGET_NO_SCHED_PRO
)
if
(
current_function_profile
||
TARGET_NO_SCHED_PRO
)
emit_insn
(
gen_blockage
());
emit_insn
(
gen_blockage
());
...
...
gcc/config/arm/arm.md
View file @
6bacc7b0
;;- Machine description for ARM for GNU compiler
;;- Machine description for ARM for GNU compiler
;; Copyright 1991, 1993, 1994, 1995, 1996, 1996, 1997, 1998, 1999, 2000,
2001
;; Copyright 1991, 1993, 1994, 1995, 1996, 1996, 1997, 1998, 1999, 2000,
;; Free Software Foundation, Inc.
;;
2001, 2002
Free Software Foundation, Inc.
;; Contributed by Pieter
`Tiggr' Schoenmakers (rcpieter@win.tue.nl)
;; Contributed by Pieter
`Tiggr' Schoenmakers (rcpieter@win.tue.nl)
;; and Martin Simmons (@harleqn.co.uk).
;; and Martin Simmons (@harleqn.co.uk).
;; More major hacks by Richard Earnshaw (rearnsha@arm.com).
;; More major hacks by Richard Earnshaw (rearnsha@arm.com).
...
@@ -64,6 +64,11 @@
...
@@ -64,6 +64,11 @@
(UNSPEC_CLZ 5) ;
`clz' instruction, count leading zeros (SImode):
(UNSPEC_CLZ 5) ;
`clz' instruction, count leading zeros (SImode):
; operand 0 is the result,
; operand 0 is the result,
; operand 1 is the parameter.
; operand 1 is the parameter.
(UNSPEC_PROLOGUE_USE 6) ; As USE insns are not meaningful after reload,
; this unspec is used to prevent the deletion of
; instructions setting registers for EH handling
; and stack frame generation. Operand 0 is the
; register to "use".
]
]
)
)
...
@@ -9187,3 +9192,8 @@
...
@@ -9187,3 +9192,8 @@
""
""
)
)
(define_insn "prologue_use"
[
(unspec:SI [(match_operand:SI 0 "register_operand" "")
]
UNSPEC_PROLOGUE_USE)]
""
"%@ %0 needed for prologue"
)
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