Skip to content

Commit ee4bc5a

Browse files
authored
[RISCV] Remove Last Traces of User Interrupts (#129300)
These were left over from when Craig removed `__attribute__((interrupt("user")))` support in 05d0cae. The tests change "interrupt"="user" into "interrupt"="machine" as they are still intending to be interrupt tests. ISelLowering will now reject "interrupt"="user". The docs no longer mention "user" as a possible interrupt attribute argument.
1 parent f9a6ea4 commit ee4bc5a

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

clang/include/clang/Basic/AttrDocs.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2828,8 +2828,8 @@ targets. This attribute may be attached to a function definition and instructs
28282828
the backend to generate appropriate function entry/exit code so that it can be
28292829
used directly as an interrupt service routine.
28302830

2831-
Permissible values for this parameter are ``user``, ``supervisor``,
2832-
and ``machine``. If there is no parameter, then it defaults to machine.
2831+
Permissible values for this parameter are ``supervisor`` and ``machine``. If
2832+
there is no parameter, then it defaults to ``machine``.
28332833

28342834
Repeated interrupt attribute on the same declaration will cause a warning
28352835
to be emitted. In case of repeated declarations, the last one prevails.

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20831,7 +20831,7 @@ SDValue RISCVTargetLowering::LowerFormalArguments(
2083120831
StringRef Kind =
2083220832
MF.getFunction().getFnAttribute("interrupt").getValueAsString();
2083320833

20834-
if (!(Kind == "user" || Kind == "supervisor" || Kind == "machine"))
20834+
if (!(Kind == "supervisor" || Kind == "machine"))
2083520835
report_fatal_error(
2083620836
"Function interrupt attribute argument not supported!");
2083720837
}

llvm/test/CodeGen/RISCV/lpad.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ define internal void @internal2() {
279279
}
280280

281281
; Check interrupt function does not need landing pad.
282-
define void @interrupt() "interrupt"="user" {
282+
define void @interrupt() "interrupt"="machine" {
283283
; CHECK-LABEL: interrupt:
284284
; CHECK: # %bb.0:
285285
; CHECK-NEXT: mret

llvm/test/CodeGen/RISCV/push-pop-popret.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1769,7 +1769,7 @@ define void @alloca(i32 %n) {
17691769
declare i32 @foo_test_irq(...)
17701770
@var_test_irq = global [32 x i32] zeroinitializer
17711771

1772-
define void @foo_with_irq() "interrupt"="user" {
1772+
define void @foo_with_irq() "interrupt"="machine" {
17731773
; RV32IZCMP-LABEL: foo_with_irq:
17741774
; RV32IZCMP: # %bb.0:
17751775
; RV32IZCMP-NEXT: cm.push {ra}, -64
@@ -2273,7 +2273,7 @@ define void @foo_no_irq() {
22732273
ret void
22742274
}
22752275

2276-
define void @callee_with_irq() "interrupt"="user" {
2276+
define void @callee_with_irq() "interrupt"="machine" {
22772277
; RV32IZCMP-LABEL: callee_with_irq:
22782278
; RV32IZCMP: # %bb.0:
22792279
; RV32IZCMP-NEXT: cm.push {ra, s0-s11}, -112

0 commit comments

Comments
 (0)