1; RUN: llc < %s -march=xcore | FileCheck %s 2; CHECK-LABEL: f1: 3; CHECK: foo r0 4define i32 @f1() nounwind { 5entry: 6 %asmtmp = tail call i32 asm sideeffect "foo $0", "=r"() nounwind 7 ret i32 %asmtmp 8} 9 10; CHECK-LABEL: f2: 11; CHECK: foo 5 12define void @f2() nounwind { 13entry: 14 tail call void asm sideeffect "foo $0", "i"(i32 5) nounwind 15 ret void 16} 17 18; CHECK-LABEL: f3: 19; CHECK: foo 42 20define void @f3() nounwind { 21entry: 22 tail call void asm sideeffect "foo ${0:c}", "i"(i32 42) nounwind 23 ret void 24} 25 26; CHECK-LABEL: f4: 27; CHECK: foo -99 28define void @f4() nounwind { 29entry: 30 tail call void asm sideeffect "foo ${0:n}", "i"(i32 99) nounwind 31 ret void 32} 33 34@x = external global i32 35@y = external global i32, section ".cp.rodata" 36 37; CHECK-LABEL: f5: 38; CHECK: ldw r0, dp[x] 39; CHECK: retsp 0 40define i32 @f5() nounwind { 41entry: 42 %asmtmp = call i32 asm "ldw $0, $1", "=r,*m"(i32* @x) nounwind 43 ret i32 %asmtmp 44} 45 46; CHECK-LABEL: f6: 47; CHECK: ldw r0, cp[y] 48; CHECK: retsp 0 49define i32 @f6() nounwind { 50entry: 51 %asmtmp = call i32 asm "ldw $0, $1", "=r,*m"(i32* @y) nounwind 52 ret i32 %asmtmp 53} 54