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
552ecbd9
Commit
552ecbd9
authored
Jun 21, 2001
by
Aldy Hernandez
Committed by
Aldy Hernandez
Jun 21, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle interrupt_handler correctly
From-SVN: r43490
parent
5005dee9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
2 deletions
+28
-2
gcc/ChangeLog
+12
-0
gcc/config/sh/sh.c
+8
-0
gcc/config/sh/sh.h
+4
-0
gcc/config/sh/sh.md
+4
-2
No files found.
gcc/ChangeLog
View file @
552ecbd9
2001
-
06
-
20
Aldy
Hernandez
<
aldyh
@redhat
.
com
>
*
config
/
sh
/
sh
.
md
(
interrupt_function
)
:
Use
current_function_interrupt
.
(
define_delay
)
:
Schedule
in
delay
slot
if
TARGET_SH3
,
even
if
it
is
an
interrupt
function
.
*
config
/
sh
/
sh
.
h
(
current_function_interrupt
)
:
Define
extern
.
*
config
/
sh
/
sh
.
c
(
current_function_interrupt
)
:
New
global
.
(
sh_expand_prologue
)
:
Set
current_function_interrupt
.
2001
-
06
-
21
Phil
Edwards
<
pme
@sources
.
redhat
.
com
>
*
doc
/
install
.
texi
:
Add
'c'
to
list
of
--
enable
-
languages
choices
.
...
...
gcc/config/sh/sh.c
View file @
552ecbd9
...
...
@@ -43,6 +43,9 @@ int code_for_indirect_jump_scratch = CODE_FOR_indirect_jump_scratch;
#define MSW (TARGET_LITTLE_ENDIAN ? 1 : 0)
#define LSW (TARGET_LITTLE_ENDIAN ? 0 : 1)
/* Set to 1 by expand_prologue() when the function is an interrupt handler. */
int
current_function_interrupt
;
/* ??? The pragma interrupt support will not work for SH3. */
/* This is set by #pragma interrupt and #pragma trapa, and causes gcc to
output code for the next function appropriate for an interrupt handler. */
...
...
@@ -4009,6 +4012,11 @@ sh_expand_prologue ()
int
live_regs_mask2
;
int
save_flags
=
target_flags
;
current_function_interrupt
=
lookup_attribute
(
"interrupt_handler"
,
DECL_MACHINE_ATTRIBUTES
(
current_function_decl
))
!=
NULL_TREE
;
/* We have pretend args if we had an object sent partially in registers
and partially on the stack, e.g. a large structure. */
output_stack_adjust
(
-
current_function_pretend_args_size
,
...
...
gcc/config/sh/sh.h
View file @
552ecbd9
...
...
@@ -2299,6 +2299,10 @@ extern enum mdep_reorg_phase_e mdep_reorg_phase;
extern
int
pragma_interrupt
;
/* Set when processing a function with interrupt attribute. */
extern
int
current_function_interrupt
;
/* Set to an RTX containing the address of the stack to switch to
for interrupt functions. */
extern
struct
rtx_def
*
sp_switch
;
...
...
gcc/config/sh/sh.md
View file @
552ecbd9
...
...
@@ -547,7 +547,7 @@
(const_string "yes")))
(define_attr "interrupt_function" "no,yes"
(const (symbol_ref "
pragma
_interrupt")))
(const (symbol_ref "
current_function
_interrupt")))
(define_attr "in_delay_slot" "yes,no"
(cond
[
(eq_attr "type" "cbranch") (const_string "no")
...
...
@@ -577,7 +577,9 @@
(ior (and (eq_attr "interrupt_function" "no")
(eq_attr "type" "!pload,prset"))
(and (eq_attr "interrupt_function" "yes")
(eq_attr "hit_stack" "no")))) (nil) (nil)])
(ior
(ne (symbol_ref "TARGET_SH3") (const_int 0))
(eq_attr "hit_stack" "no"))))) (nil) (nil)])
;; Since a call implicitly uses the PR register, we can't allow
;; a PR register store in a jsr delay slot.
...
...
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