Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/MSP430/interrupt.ll
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

63 lines
1.7 KiB
LLVM

; RUN: llc < %s | FileCheck %s
target datalayout = "e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:16-a:8-n8:16-S16"
target triple = "msp430-generic-generic"
@llvm.used = appending global [1 x ptr] [ptr @ISR], section "llvm.metadata"
; MSP430 EABI p. 3.9
; Interrupt functions must save all the registers that are used, even those
; that are normally considered callee-saved.
; To return from an interrupt function, the function must execute the special
; instruction RETI, which restores the SR register and branches to the PC where
; the interrupt occurred.
; CHECK: .section __interrupt_vector_2,"ax",@progbits
; CHECK-NEXT: .short ISR
@g = global float 0.0
define msp430_intrcc void @ISR() #0 {
entry:
; CHECK-LABEL: ISR:
; CHECK: push r4
; CHECK: push r5
; CHECK: push r6
; CHECK: push r7
; CHECK: push r8
; CHECK: push r9
; CHECK: push r10
; CHECK: push r11
; CHECK: push r12
; CHECK: push r13
; CHECK: push r14
; CHECK: push r15
%t1 = load volatile float, ptr @g
%t2 = load volatile float, ptr @g
%t3 = load volatile float, ptr @g
%t4 = load volatile float, ptr @g
%t5 = load volatile float, ptr @g
%t6 = load volatile float, ptr @g
%t7 = load volatile float, ptr @g
store volatile float %t1, ptr @g
store volatile float %t2, ptr @g
store volatile float %t3, ptr @g
store volatile float %t4, ptr @g
store volatile float %t5, ptr @g
store volatile float %t6, ptr @g
; CHECK: reti
ret void
}
; Functions without 'interrupt' attribute don't get a vector section.
; CHECK-NOT: __interrupt_vector
; CHECK-LABEL: NMI:
; CHECK: reti
define msp430_intrcc void @NMI() #1 {
ret void
}
attributes #0 = { noinline nounwind optnone "interrupt"="2" }
attributes #1 = { noinline nounwind optnone }