2011-03-31 23:13:13 +08:00
|
|
|
; RUN: llc -march=xcore < %s | FileCheck %s
|
|
|
|
|
|
|
|
declare i8 addrspace(1)* @llvm.xcore.getst.p1i8.p1i8(i8 addrspace(1)* %r)
|
|
|
|
declare void @llvm.xcore.msync.p1i8(i8 addrspace(1)* %r)
|
|
|
|
declare void @llvm.xcore.ssync()
|
|
|
|
declare void @llvm.xcore.mjoin.p1i8(i8 addrspace(1)* %r)
|
|
|
|
declare void @llvm.xcore.initsp.p1i8(i8 addrspace(1)* %r, i8* %value)
|
|
|
|
declare void @llvm.xcore.initpc.p1i8(i8 addrspace(1)* %r, i8* %value)
|
|
|
|
declare void @llvm.xcore.initlr.p1i8(i8 addrspace(1)* %r, i8* %value)
|
|
|
|
declare void @llvm.xcore.initcp.p1i8(i8 addrspace(1)* %r, i8* %value)
|
|
|
|
declare void @llvm.xcore.initdp.p1i8(i8 addrspace(1)* %r, i8* %value)
|
|
|
|
|
2013-07-19 06:29:15 +08:00
|
|
|
define i8 addrspace(1)* @test_getst(i8 addrspace(1)* %r) {
|
|
|
|
; CHECK-LABEL: test_getst:
|
2011-03-31 23:13:13 +08:00
|
|
|
; CHECK: getst r0, res[r0]
|
|
|
|
%result = call i8 addrspace(1)* @llvm.xcore.getst.p1i8.p1i8(i8 addrspace(1)* %r)
|
|
|
|
ret i8 addrspace(1)* %result
|
|
|
|
}
|
|
|
|
|
2013-07-19 06:29:15 +08:00
|
|
|
define void @test_ssync() {
|
|
|
|
; CHECK-LABEL: test_ssync:
|
2011-03-31 23:13:13 +08:00
|
|
|
; CHECK: ssync
|
|
|
|
call void @llvm.xcore.ssync()
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2013-07-19 06:29:15 +08:00
|
|
|
define void @test_mjoin(i8 addrspace(1)* %r) {
|
|
|
|
; CHECK-LABEL: test_mjoin:
|
2011-03-31 23:13:13 +08:00
|
|
|
; CHECK: mjoin res[r0]
|
|
|
|
call void @llvm.xcore.mjoin.p1i8(i8 addrspace(1)* %r)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2013-07-19 06:29:15 +08:00
|
|
|
define void @test_initsp(i8 addrspace(1)* %t, i8* %src) {
|
|
|
|
; CHECK-LABEL: test_initsp:
|
2011-03-31 23:13:13 +08:00
|
|
|
; CHECK: init t[r0]:sp, r1
|
|
|
|
call void @llvm.xcore.initsp.p1i8(i8 addrspace(1)* %t, i8* %src)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2013-07-19 06:29:15 +08:00
|
|
|
define void @test_initpc(i8 addrspace(1)* %t, i8* %src) {
|
|
|
|
; CHECK-LABEL: test_initpc:
|
2011-03-31 23:13:13 +08:00
|
|
|
; CHECK: init t[r0]:pc, r1
|
|
|
|
call void @llvm.xcore.initpc.p1i8(i8 addrspace(1)* %t, i8* %src)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2013-07-19 06:29:15 +08:00
|
|
|
define void @test_initlr(i8 addrspace(1)* %t, i8* %src) {
|
|
|
|
; CHECK-LABEL: test_initlr:
|
2011-03-31 23:13:13 +08:00
|
|
|
; CHECK: init t[r0]:lr, r1
|
|
|
|
call void @llvm.xcore.initlr.p1i8(i8 addrspace(1)* %t, i8* %src)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2013-07-19 06:29:15 +08:00
|
|
|
define void @test_initcp(i8 addrspace(1)* %t, i8* %src) {
|
|
|
|
; CHECK-LABEL: test_initcp:
|
2011-03-31 23:13:13 +08:00
|
|
|
; CHECK: init t[r0]:cp, r1
|
|
|
|
call void @llvm.xcore.initcp.p1i8(i8 addrspace(1)* %t, i8* %src)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2013-07-19 06:29:15 +08:00
|
|
|
define void @test_initdp(i8 addrspace(1)* %t, i8* %src) {
|
|
|
|
; CHECK-LABEL: test_initdp:
|
2011-03-31 23:13:13 +08:00
|
|
|
; CHECK: init t[r0]:dp, r1
|
|
|
|
call void @llvm.xcore.initdp.p1i8(i8 addrspace(1)* %t, i8* %src)
|
|
|
|
ret void
|
|
|
|
}
|