[llvm-commits] [llvm] r126322 - in /llvm/trunk: include/llvm/IntrinsicsXCore.td lib/Target/XCore/XCoreInstrInfo.td test/CodeGen/XCore/events.ll
Richard Osborne
richard at xmos.com
Wed Feb 23 10:52:05 PST 2011
Author: friedgold
Date: Wed Feb 23 12:52:05 2011
New Revision: 126322
URL: http://llvm.org/viewvc/llvm-project?rev=126322&view=rev
Log:
Add XCore intrinsic for clre instruction.
Modified:
llvm/trunk/include/llvm/IntrinsicsXCore.td
llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td
llvm/trunk/test/CodeGen/XCore/events.ll
Modified: llvm/trunk/include/llvm/IntrinsicsXCore.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IntrinsicsXCore.td?rev=126322&r1=126321&r2=126322&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IntrinsicsXCore.td (original)
+++ llvm/trunk/include/llvm/IntrinsicsXCore.td Wed Feb 23 12:52:05 2011
@@ -50,4 +50,5 @@
// Intrinsics for events.
def int_xcore_waitevent : Intrinsic<[llvm_ptr_ty],[], [IntrReadMem]>;
+ def int_xcore_clre : Intrinsic<[],[],[]>;
}
Modified: llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td?rev=126322&r1=126321&r2=126322&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td (original)
+++ llvm/trunk/lib/Target/XCore/XCoreInstrInfo.td Wed Feb 23 12:52:05 2011
@@ -895,10 +895,12 @@
[(int_xcore_setv GRRegs:$r, R11)]>;
// Zero operand short
-// TODO clre, ssync, freet, ldspc, stspc, ldssr, stssr, ldsed, stsed,
+// TODO ssync, freet, ldspc, stspc, ldssr, stssr, ldsed, stsed,
// stet, geted, getet, getkep, getksp, setkep, getid, kret, dcall, dret,
// dentsp, drestsp
+def CLRE_0R : _F0R<(outs), (ins), "clre", [(int_xcore_clre)]>;
+
let Defs = [R11] in
def GETID_0R : _F0R<(outs), (ins),
"get r11, id",
Modified: llvm/trunk/test/CodeGen/XCore/events.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/XCore/events.ll?rev=126322&r1=126321&r2=126322&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/XCore/events.ll (original)
+++ llvm/trunk/test/CodeGen/XCore/events.ll Wed Feb 23 12:52:05 2011
@@ -2,10 +2,13 @@
declare void @llvm.xcore.setv.p1i8(i8 addrspace(1)* %r, i8* %p)
declare i8* @llvm.xcore.waitevent()
+declare void @llvm.xcore.clre()
define i32 @f(i8 addrspace(1)* %r) nounwind {
; CHECK: f:
entry:
+; CHECK: clre
+ call void @llvm.xcore.clre()
call void @llvm.xcore.setv.p1i8(i8 addrspace(1)* %r, i8* blockaddress(@f, %L1))
call void @llvm.xcore.setv.p1i8(i8 addrspace(1)* %r, i8* blockaddress(@f, %L2))
%goto_addr = call i8* @llvm.xcore.waitevent()
More information about the llvm-commits
mailing list