summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/XCore/XCoreISelLowering.cpp
diff options
context:
space:
mode:
authorRichard Osborne <richard@xmos.com>2008-11-14 10:12:16 +0000
committerRichard Osborne <richard@xmos.com>2008-11-14 10:12:16 +0000
commitd16b37efae97b15d85513568597b942c8720b268 (patch)
tree6a4725a400a85b633e564953e9f13d43974bbb03 /llvm/lib/Target/XCore/XCoreISelLowering.cpp
parentc967d035288c27d82e620a8c200002f640ff6178 (diff)
downloadbcm5719-llvm-d16b37efae97b15d85513568597b942c8720b268.tar.gz
bcm5719-llvm-d16b37efae97b15d85513568597b942c8720b268.zip
Add XCore intrinsics for getid (returns thread id) and bitrev (reverses
bits in a word). llvm-svn: 59296
Diffstat (limited to 'llvm/lib/Target/XCore/XCoreISelLowering.cpp')
-rw-r--r--llvm/lib/Target/XCore/XCoreISelLowering.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Target/XCore/XCoreISelLowering.cpp b/llvm/lib/Target/XCore/XCoreISelLowering.cpp
index 96b1ae7c5d3..765e6182b84 100644
--- a/llvm/lib/Target/XCore/XCoreISelLowering.cpp
+++ b/llvm/lib/Target/XCore/XCoreISelLowering.cpp
@@ -226,9 +226,8 @@ LowerGlobalAddress(SDValue Op, SelectionDAG &DAG)
}
static inline SDValue BuildGetId(SelectionDAG &DAG) {
- // TODO
- assert(0 && "Unimplemented");
- return SDValue();
+ return DAG.getNode(ISD::INTRINSIC_WO_CHAIN, MVT::i32,
+ DAG.getConstant(Intrinsic::xcore_getid, MVT::i32));
}
static inline bool isZeroLengthArray(const Type *Ty) {
OpenPOWER on IntegriCloud