[llvm] r202171 - [XCore] Add intrinsic for EDU (event disable unconditional) instruction.
Richard Osborne
richard at xmos.com
Tue Feb 25 09:31:06 PST 2014
Author: friedgold
Date: Tue Feb 25 11:31:06 2014
New Revision: 202171
URL: http://llvm.org/viewvc/llvm-project?rev=202171&view=rev
Log:
[XCore] Add intrinsic for EDU (event disable unconditional) instruction.
Modified:
llvm/trunk/include/llvm/IR/IntrinsicsXCore.td
llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td
llvm/trunk/test/CodeGen/XCore/resources.ll
Modified: llvm/trunk/include/llvm/IR/IntrinsicsXCore.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/IntrinsicsXCore.td?rev=202171&r1=202170&r2=202171&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/IntrinsicsXCore.td (original)
+++ llvm/trunk/include/llvm/IR/IntrinsicsXCore.td Tue Feb 25 11:31:06 2014
@@ -78,6 +78,7 @@ let TargetPrefix = "xcore" in { // All
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],
Modified: llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td?rev=202171&r1=202170&r2=202171&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td (original)
+++ llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td Tue Feb 25 11:31:06 2014
@@ -1013,7 +1013,8 @@ def SETEV_1r : _F1R<0b001111, (outs), (i
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]",
Modified: llvm/trunk/test/CodeGen/XCore/resources.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/resources.ll?rev=202171&r1=202170&r2=202171&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/XCore/resources.ll (original)
+++ llvm/trunk/test/CodeGen/XCore/resources.ll Tue Feb 25 11:31:06 2014
@@ -21,6 +21,7 @@ declare void @llvm.xcore.syncr.p1i8(i8 a
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,
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]
More information about the llvm-commits
mailing list