mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-23 04:28:30 +00:00
Add XCore intrinsics for setclk, setrdy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127761 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2589d0aedf
commit
e17139b3e9
@ -53,6 +53,10 @@ let TargetPrefix = "xcore" in { // All intrinsics start with "llvm.xcore.".
|
||||
def int_xcore_setv : Intrinsic<[],[llvm_anyptr_ty, llvm_ptr_ty],
|
||||
[NoCapture<0>]>;
|
||||
def int_xcore_eeu : Intrinsic<[],[llvm_anyptr_ty], [NoCapture<0>]>;
|
||||
def int_xcore_setclk : Intrinsic<[],[llvm_anyptr_ty, llvm_anyptr_ty],
|
||||
[NoCapture<0>, NoCapture<1>]>;
|
||||
def int_xcore_setrdy : Intrinsic<[],[llvm_anyptr_ty, llvm_anyptr_ty],
|
||||
[NoCapture<0>, NoCapture<1>]>;
|
||||
|
||||
// Intrinsics for events.
|
||||
def int_xcore_waitevent : Intrinsic<[llvm_ptr_ty],[], [IntrReadMem]>;
|
||||
|
@ -838,7 +838,7 @@ def SETD_2r : _F2R<(outs), (ins GRRegs:$r, GRRegs:$val),
|
||||
[(int_xcore_setd GRRegs:$r, GRRegs:$val)]>;
|
||||
|
||||
// Two operand long
|
||||
// TODO setclk, setrdy, setpsc, endin, peek,
|
||||
// TODO setpsc, endin, peek,
|
||||
// getd, testlcl, tinitlr
|
||||
def BITREV_l2r : _FL2R<(outs GRRegs:$dst), (ins GRRegs:$src),
|
||||
"bitrev $dst, $src",
|
||||
@ -868,6 +868,14 @@ def SETPS_l2r : _FL2R<(outs), (ins GRRegs:$src1, GRRegs:$src2),
|
||||
"set ps[$src1], $src2",
|
||||
[(int_xcore_setps GRRegs:$src1, GRRegs:$src2)]>;
|
||||
|
||||
def SETCLK_l2r : _FL2R<(outs), (ins GRRegs:$src1, GRRegs:$src2),
|
||||
"setclk res[$src1], $src2",
|
||||
[(int_xcore_setclk GRRegs:$src1, GRRegs:$src2)]>;
|
||||
|
||||
def SETRDY_l2r : _FL2R<(outs), (ins GRRegs:$src1, GRRegs:$src2),
|
||||
"setrdy res[$src1], $src2",
|
||||
[(int_xcore_setrdy GRRegs:$src1, GRRegs:$src2)]>;
|
||||
|
||||
// One operand short
|
||||
// TODO edu, eeu, waitet, waitef, tstart, msync, mjoin, clrtp
|
||||
// setdp, setcp, setev, kcall
|
||||
|
@ -19,6 +19,8 @@ declare void @llvm.xcore.syncr.p1i8(i8 addrspace(1)* %r)
|
||||
declare void @llvm.xcore.settw.p1i8(i8 addrspace(1)* %r, i32 %value)
|
||||
declare void @llvm.xcore.setv.p1i8(i8 addrspace(1)* %r, i8* %p)
|
||||
declare void @llvm.xcore.eeu.p1i8(i8 addrspace(1)* %r)
|
||||
declare void @llvm.xcore.setclk.p1i8.p1i8(i8 addrspace(1)* %a, i8 addrspace(1)* %b)
|
||||
declare void @llvm.xcore.setrdy.p1i8.p1i8(i8 addrspace(1)* %a, i8 addrspace(1)* %b)
|
||||
|
||||
define i8 addrspace(1)* @getr() {
|
||||
; CHECK: getr:
|
||||
@ -174,3 +176,17 @@ define void @eeu(i8 addrspace(1)* %r) {
|
||||
call void @llvm.xcore.eeu.p1i8(i8 addrspace(1)* %r)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @setclk(i8 addrspace(1)* %a, i8 addrspace(1)* %b) {
|
||||
; CHECK: setclk
|
||||
; CHECK: setclk res[r0], r1
|
||||
call void @llvm.xcore.setclk.p1i8.p1i8(i8 addrspace(1)* %a, i8 addrspace(1)* %b)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @setrdy(i8 addrspace(1)* %a, i8 addrspace(1)* %b) {
|
||||
; CHECK: setrdy
|
||||
; CHECK: setrdy res[r0], r1
|
||||
call void @llvm.xcore.setrdy.p1i8.p1i8(i8 addrspace(1)* %a, i8 addrspace(1)* %b)
|
||||
ret void
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user