1; RUN: llc -march=xcore < %s | FileCheck %s 2 3declare i8 addrspace(1)* @llvm.xcore.getst.p1i8.p1i8(i8 addrspace(1)* %r) 4declare void @llvm.xcore.msync.p1i8(i8 addrspace(1)* %r) 5declare void @llvm.xcore.ssync() 6declare void @llvm.xcore.mjoin.p1i8(i8 addrspace(1)* %r) 7declare void @llvm.xcore.initsp.p1i8(i8 addrspace(1)* %r, i8* %value) 8declare void @llvm.xcore.initpc.p1i8(i8 addrspace(1)* %r, i8* %value) 9declare void @llvm.xcore.initlr.p1i8(i8 addrspace(1)* %r, i8* %value) 10declare void @llvm.xcore.initcp.p1i8(i8 addrspace(1)* %r, i8* %value) 11declare void @llvm.xcore.initdp.p1i8(i8 addrspace(1)* %r, i8* %value) 12 13define i8 addrspace(1)* @getst(i8 addrspace(1)* %r) { 14; CHECK: getst: 15; CHECK: getst r0, res[r0] 16 %result = call i8 addrspace(1)* @llvm.xcore.getst.p1i8.p1i8(i8 addrspace(1)* %r) 17 ret i8 addrspace(1)* %result 18} 19 20define void @ssync() { 21; CHECK: ssync: 22; CHECK: ssync 23 call void @llvm.xcore.ssync() 24 ret void 25} 26 27define void @mjoin(i8 addrspace(1)* %r) { 28; CHECK: mjoin: 29; CHECK: mjoin res[r0] 30 call void @llvm.xcore.mjoin.p1i8(i8 addrspace(1)* %r) 31 ret void 32} 33 34define void @initsp(i8 addrspace(1)* %t, i8* %src) { 35; CHECK: initsp: 36; CHECK: init t[r0]:sp, r1 37 call void @llvm.xcore.initsp.p1i8(i8 addrspace(1)* %t, i8* %src) 38 ret void 39} 40 41define void @initpc(i8 addrspace(1)* %t, i8* %src) { 42; CHECK: initpc: 43; CHECK: init t[r0]:pc, r1 44 call void @llvm.xcore.initpc.p1i8(i8 addrspace(1)* %t, i8* %src) 45 ret void 46} 47 48define void @initlr(i8 addrspace(1)* %t, i8* %src) { 49; CHECK: initlr: 50; CHECK: init t[r0]:lr, r1 51 call void @llvm.xcore.initlr.p1i8(i8 addrspace(1)* %t, i8* %src) 52 ret void 53} 54 55define void @initcp(i8 addrspace(1)* %t, i8* %src) { 56; CHECK: initcp: 57; CHECK: init t[r0]:cp, r1 58 call void @llvm.xcore.initcp.p1i8(i8 addrspace(1)* %t, i8* %src) 59 ret void 60} 61 62define void @initdp(i8 addrspace(1)* %t, i8* %src) { 63; CHECK: initdp: 64; CHECK: init t[r0]:dp, r1 65 call void @llvm.xcore.initdp.p1i8(i8 addrspace(1)* %t, i8* %src) 66 ret void 67} 68