2020-02-12 15:01:35 +08:00
|
|
|
; RUN: not --crash llc -mtriple riscv32-unknown-elf -o - %s \
|
[RISCV] Add support for _interrupt attribute
- Save/restore only registers that are used.
This includes Callee saved registers and Caller saved registers
(arguments and temporaries) for integer and FP registers.
- If there is a call in the interrupt handler, save/restore all
Caller saved registers (arguments and temporaries) and all FP registers.
- Emit special return instructions depending on "interrupt"
attribute type.
Based on initial patch by Zhaoshi Zheng.
Reviewers: asb
Reviewed By: asb
Subscribers: rkruppe, the_o, MartinMosbeck, brucehoult, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, mgrang, rogfer01, llvm-commits
Differential Revision: https://reviews.llvm.org/D48411
llvm-svn: 338047
2018-07-27 01:49:43 +08:00
|
|
|
; RUN: 2>&1 | FileCheck %s
|
2020-02-12 15:01:35 +08:00
|
|
|
; RUN: not --crash llc -mtriple riscv64-unknown-elf -o - %s \
|
[RISCV] Add support for _interrupt attribute
- Save/restore only registers that are used.
This includes Callee saved registers and Caller saved registers
(arguments and temporaries) for integer and FP registers.
- If there is a call in the interrupt handler, save/restore all
Caller saved registers (arguments and temporaries) and all FP registers.
- Emit special return instructions depending on "interrupt"
attribute type.
Based on initial patch by Zhaoshi Zheng.
Reviewers: asb
Reviewed By: asb
Subscribers: rkruppe, the_o, MartinMosbeck, brucehoult, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, mgrang, rogfer01, llvm-commits
Differential Revision: https://reviews.llvm.org/D48411
llvm-svn: 338047
2018-07-27 01:49:43 +08:00
|
|
|
; RUN: 2>&1 | FileCheck %s
|
|
|
|
|
|
|
|
; CHECK: LLVM ERROR: Functions with the interrupt attribute must have void return type!
|
|
|
|
define i32 @isr1_user() #0 {
|
|
|
|
ret i32 0
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
attributes #0 = { "interrupt"="user" }
|