1 ; RUN: llc < %s | FileCheck %s
3 target datalayout = "e-m:e-p:16:16-i32:16:32-a:16-n8:16"
4 target triple = "msp430---elf"
6 define void @test_no_clobber() {
8 ; CHECK-LABEL: test_no_clobber
10 call void asm sideeffect "", ""()
13 ; CHECK: -- End function
16 define void @test_1() {
18 ; CHECK-LABEL: test_1:
20 ; CHECK: .cfi_def_cfa_offset 4
22 ; CHECK: .cfi_def_cfa_offset 6
24 ; CHECK: .cfi_def_cfa_offset 8
25 ; CHECK: .cfi_offset r4, -4
26 ; CHECK: .cfi_offset r6, -6
27 ; CHECK: .cfi_offset r8, -8
28 call void asm sideeffect "", "~{r4},~{r6},~{r8}"()
30 ; CHECK: .cfi_def_cfa_offset 6
32 ; CHECK: .cfi_def_cfa_offset 4
34 ; CHECK: .cfi_def_cfa_offset 2
35 ; CHECK: .cfi_restore r4
36 ; CHECK: .cfi_restore r6
37 ; CHECK: .cfi_restore r8
41 define void @test_2() {
43 ; CHECK-LABEL: test_2:
45 ; CHECK: .cfi_def_cfa_offset 4
47 ; CHECK: .cfi_def_cfa_offset 6
49 ; CHECK: .cfi_def_cfa_offset 8
50 ; CHECK: .cfi_offset r5, -4
51 ; CHECK: .cfi_offset r7, -6
52 ; CHECK: .cfi_offset r9, -8
53 call void asm sideeffect "", "~{r5},~{r7},~{r9}"()
55 ; CHECK: .cfi_def_cfa_offset 6
57 ; CHECK: .cfi_def_cfa_offset 4
59 ; CHECK: .cfi_def_cfa_offset 2
60 ; CHECK: .cfi_restore r5
61 ; CHECK: .cfi_restore r7
62 ; CHECK: .cfi_restore r9
66 ; The r10 register is special because the sequence
69 ; can be replaced with
70 ; jmp __mspabi_func_epilog_1
71 ; or other such function (depending on previous instructions).
72 ; Still, it is not replaced *yet*.
73 define void @test_r10() {
75 ; CHECK-LABEL: test_r10:
77 ; CHECK: .cfi_def_cfa_offset 4
78 ; CHECK: .cfi_offset r10, -4
79 call void asm sideeffect "", "~{r10}"()
81 ; CHECK: .cfi_def_cfa_offset 2
82 ; CHECK: .cfi_restore r10