1 ; RUN: llc < %s | FileCheck %s
3 target datalayout = "e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:16-a:8-n8:16-S16"
4 target triple = "msp430-generic-generic"
6 @llvm.used = appending global [1 x i8*] [i8* bitcast (void ()* @ISR to i8*)], section "llvm.metadata"
9 ; Interrupt functions must save all the registers that are used, even those
10 ; that are normally considered callee-saved.
12 ; To return from an interrupt function, the function must execute the special
13 ; instruction RETI, which restores the SR register and branches to the PC where
14 ; the interrupt occurred.
16 ; CHECK: .section __interrupt_vector_2,"ax",@progbits
17 ; CHECK-NEXT: .short ISR
21 define msp430_intrcc void @ISR() #0 {
36 %t1 = load volatile float, float* @g
37 %t2 = load volatile float, float* @g
38 %t3 = load volatile float, float* @g
39 %t4 = load volatile float, float* @g
40 %t5 = load volatile float, float* @g
41 %t6 = load volatile float, float* @g
42 %t7 = load volatile float, float* @g
43 store volatile float %t1, float* @g
44 store volatile float %t2, float* @g
45 store volatile float %t3, float* @g
46 store volatile float %t4, float* @g
47 store volatile float %t5, float* @g
48 store volatile float %t6, float* @g
53 ; Functions without 'interrupt' attribute don't get a vector section.
54 ; CHECK-NOT: __interrupt_vector
57 define msp430_intrcc void @NMI() #1 {
61 attributes #0 = { noinline nounwind optnone "interrupt"="2" }
62 attributes #1 = { noinline nounwind optnone }