1; RUN: llc < %s | FileCheck %s 2 3target datalayout = "e-m:e-p:16:16-i32:16:32-a:16-n8:16" 4target triple = "msp430---elf" 5 6define void @test_no_clobber() { 7entry: 8; CHECK-LABEL: test_no_clobber 9; CHECK-NOT: push 10 call void asm sideeffect "", ""() 11; CHECK-NOT: pop 12 ret void 13; CHECK: -- End function 14} 15 16define void @test_1() { 17entry: 18; CHECK-LABEL: test_1: 19; CHECK: push r8 20; CHECK: push r6 21; CHECK: push r4 22 call void asm sideeffect "", "~{r4},~{r6},~{r8}"() 23; CHECK: pop r4 24; CHECK: pop r6 25; CHECK: pop r8 26 ret void 27} 28 29define void @test_2() { 30entry: 31; CHECK-LABEL: test_2: 32; CHECK: push r9 33; CHECK: push r7 34; CHECK: push r5 35 call void asm sideeffect "", "~{r5},~{r7},~{r9}"() 36; CHECK: pop r5 37; CHECK: pop r7 38; CHECK: pop r9 39 ret void 40} 41 42; The r10 register is special because the sequence 43; pop r10 44; ret 45; can be replaced with 46; jmp __mspabi_func_epilog_1 47; or other such function (depending on previous instructions). 48; Still, it is not replaced *yet*. 49define void @test_r10() { 50entry: 51; CHECK-LABEL: test_r10: 52; CHECK: push r10 53 call void asm sideeffect "", "~{r10}"() 54; CHECK: pop r10 55 ret void 56} 57