Home | History | Annotate | Download | only in XCore
      1 ; RUN: llc -march=xcore < %s | FileCheck %s
      2 
      3 declare i8 addrspace(1)* @llvm.xcore.getst.p1i8.p1i8(i8 addrspace(1)* %r)
      4 declare void @llvm.xcore.msync.p1i8(i8 addrspace(1)* %r)
      5 declare void @llvm.xcore.ssync()
      6 declare void @llvm.xcore.mjoin.p1i8(i8 addrspace(1)* %r)
      7 declare void @llvm.xcore.initsp.p1i8(i8 addrspace(1)* %r, i8* %value)
      8 declare void @llvm.xcore.initpc.p1i8(i8 addrspace(1)* %r, i8* %value)
      9 declare void @llvm.xcore.initlr.p1i8(i8 addrspace(1)* %r, i8* %value)
     10 declare void @llvm.xcore.initcp.p1i8(i8 addrspace(1)* %r, i8* %value)
     11 declare void @llvm.xcore.initdp.p1i8(i8 addrspace(1)* %r, i8* %value)
     12 
     13 define i8 addrspace(1)* @test_getst(i8 addrspace(1)* %r) {
     14 ; CHECK-LABEL: test_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 
     20 define void @test_ssync() {
     21 ; CHECK-LABEL: test_ssync:
     22 ; CHECK: ssync
     23 	call void @llvm.xcore.ssync()
     24 	ret void
     25 }
     26 
     27 define void @test_mjoin(i8 addrspace(1)* %r) {
     28 ; CHECK-LABEL: test_mjoin:
     29 ; CHECK: mjoin res[r0]
     30 	call void @llvm.xcore.mjoin.p1i8(i8 addrspace(1)* %r)
     31 	ret void
     32 }
     33 
     34 define void @test_initsp(i8 addrspace(1)* %t, i8* %src) {
     35 ; CHECK-LABEL: test_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 
     41 define void @test_initpc(i8 addrspace(1)* %t, i8* %src) {
     42 ; CHECK-LABEL: test_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 
     48 define void @test_initlr(i8 addrspace(1)* %t, i8* %src) {
     49 ; CHECK-LABEL: test_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 
     55 define void @test_initcp(i8 addrspace(1)* %t, i8* %src) {
     56 ; CHECK-LABEL: test_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 
     62 define void @test_initdp(i8 addrspace(1)* %t, i8* %src) {
     63 ; CHECK-LABEL: test_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