[XCore] Add intrinsic for EDU (event disable unconditional) instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202171 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Richard Osborne 2014-02-25 17:31:06 +00:00
parent 57edc9d4ff
commit fb2f73acb9
3 changed files with 11 additions and 1 deletions

View File

@ -78,6 +78,7 @@ let TargetPrefix = "xcore" in { // All intrinsics start with "llvm.xcore.".
def int_xcore_setev : Intrinsic<[],[llvm_anyptr_ty, llvm_ptr_ty],
[NoCapture<0>]>;
def int_xcore_eeu : Intrinsic<[],[llvm_anyptr_ty], [NoCapture<0>]>;
def int_xcore_edu : 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],

View File

@ -1013,7 +1013,8 @@ def SETEV_1r : _F1R<0b001111, (outs), (ins GRRegs:$a),
def DGETREG_1r : _F1R<0b001110, (outs GRRegs:$a), (ins), "dgetreg $a", []>;
def EDU_1r : _F1R<0b000000, (outs), (ins GRRegs:$a), "edu res[$a]", []>;
def EDU_1r : _F1R<0b000000, (outs), (ins GRRegs:$a), "edu res[$a]",
[(int_xcore_edu GRRegs:$a)]>;
def EEU_1r : _F1R<0b000001, (outs), (ins GRRegs:$a),
"eeu res[$a]",

View File

@ -21,6 +21,7 @@ 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.setev.p1i8(i8 addrspace(1)* %r, i8* %p)
declare void @llvm.xcore.edu.p1i8(i8 addrspace(1)* %r)
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)
@ -184,6 +185,13 @@ define void @setev(i8 addrspace(1)* %r, i8* %p) {
ret void
}
define void @edu(i8 addrspace(1)* %r) {
; CHECK-LABEL: edu:
; CHECK: edu res[r0]
call void @llvm.xcore.edu.p1i8(i8 addrspace(1)* %r)
ret void
}
define void @eeu(i8 addrspace(1)* %r) {
; CHECK-LABEL: eeu:
; CHECK: eeu res[r0]