aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/IntrinsicsBlackfin.td
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2009-08-02 18:28:11 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2009-08-02 18:28:11 +0000
commit6b30f5c86743a3386a14d15ad3faac8243b44c19 (patch)
treea3df2207947a659df09f3000ef18f96c3952fbc1 /include/llvm/IntrinsicsBlackfin.td
parent26a84d4f3c9f7bf88678dd7574261ec66c4f8952 (diff)
downloadexternal_llvm-6b30f5c86743a3386a14d15ad3faac8243b44c19.zip
external_llvm-6b30f5c86743a3386a14d15ad3faac8243b44c19.tar.gz
external_llvm-6b30f5c86743a3386a14d15ad3faac8243b44c19.tar.bz2
Add some basic blackfin intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77903 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/IntrinsicsBlackfin.td')
-rw-r--r--include/llvm/IntrinsicsBlackfin.td51
1 files changed, 51 insertions, 0 deletions
diff --git a/include/llvm/IntrinsicsBlackfin.td b/include/llvm/IntrinsicsBlackfin.td
new file mode 100644
index 0000000..3a4052b
--- /dev/null
+++ b/include/llvm/IntrinsicsBlackfin.td
@@ -0,0 +1,51 @@
+//===- IntrinsicsBlackfin.td - Defines Blackfin intrinsics -*- tablegen -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines all of the blackfin-specific intrinsics.
+//
+//===----------------------------------------------------------------------===//
+
+//===----------------------------------------------------------------------===//
+// Core synchronisation etc.
+//
+// These intrinsics have sideeffects. Each represent a single instruction, but
+// workarounds are sometimes required depending on the cpu.
+
+let TargetPrefix = "bfin" in {
+
+ // Execute csync instruction with workarounds
+ def int_bfin_csync : GCCBuiltin<"__builtin_bfin_csync">,
+ Intrinsic<[llvm_void_ty]>;
+
+ // Execute ssync instruction with workarounds
+ def int_bfin_ssync : GCCBuiltin<"__builtin_bfin_ssync">,
+ Intrinsic<[llvm_void_ty]>;
+
+ // Execute idle instruction with workarounds
+ def int_bfin_idle : GCCBuiltin<"__builtin_bfin_idle">,
+ Intrinsic<[llvm_void_ty]>;
+
+}
+
+//===----------------------------------------------------------------------===//
+// Miscellaneous GCC-compatible builtins.
+//
+
+let TargetPrefix = "bfin" in {
+
+ // Almost identical to ctpop except for the type signature
+ def int_bfin_ones : GCCBuiltin<"__builtin_bfin_ones">,
+ Intrinsic<[llvm_i16_ty], [llvm_i32_ty], [IntrNoMem]>;
+
+ // Load unaligned pointer, ignoring the low bits. Like *(p&~3).
+ // This uses the disalignexcpt instruction
+ def int_bfin_loadbytes : GCCBuiltin<"__builtin_bfin_loadbytes">,
+ Intrinsic<[llvm_i32_ty], [llvm_ptr_ty], [IntrReadArgMem]>;
+
+}