1; RUN: llc < %s | FileCheck %s
2
3target datalayout = "e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:16-a:8-n8:16-S16"
4target triple = "msp430-generic-generic"
5
6@llvm.used = appending global [1 x i8*] [i8* bitcast (void ()* @ISR to i8*)], section "llvm.metadata"
7
8; MSP430 EABI p. 3.9
9; Interrupt functions must save all the registers that are used, even those
10; that are normally considered callee-saved.
11
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.
15
16@g = global float 0.0
17
18define msp430_intrcc void @ISR() #0 {
19entry:
20; CHECK-LABEL: ISR:
21; CHECK: push	r15
22; CHECK: push	r14
23; CHECK: push	r13
24; CHECK: push	r12
25; CHECK: push	r11
26; CHECK: push	r10
27; CHECK: push	r9
28; CHECK: push	r8
29; CHECK: push	r7
30; CHECK: push	r6
31; CHECK: push	r5
32; CHECK: push	r4
33  %t1 = load volatile float, float* @g
34  %t2 = load volatile float, float* @g
35  %t3 = load volatile float, float* @g
36  %t4 = load volatile float, float* @g
37  %t5 = load volatile float, float* @g
38  %t6 = load volatile float, float* @g
39  %t7 = load volatile float, float* @g
40  store volatile float %t1, float* @g
41  store volatile float %t2, float* @g
42  store volatile float %t3, float* @g
43  store volatile float %t4, float* @g
44  store volatile float %t5, float* @g
45  store volatile float %t6, float* @g
46; CHECK: reti
47  ret void
48}
49
50