diff options
author | Chris Lattner <sabre@nondot.org> | 2006-03-13 22:38:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-03-13 22:38:32 +0000 |
commit | 8ae7a3315f2a1be225cd83dd5c95428c0ddff4fd (patch) | |
tree | f369036bd322823831aee819b77a47bb651dcd86 | |
parent | 1877ec9b02511e111998596b9ba9c3a2275d6a92 (diff) | |
download | external_llvm-8ae7a3315f2a1be225cd83dd5c95428c0ddff4fd.zip external_llvm-8ae7a3315f2a1be225cd83dd5c95428c0ddff4fd.tar.gz external_llvm-8ae7a3315f2a1be225cd83dd5c95428c0ddff4fd.tar.bz2 |
Add a first ppc altivec intrinsic. Add packed type support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26734 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Intrinsics.td | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/llvm/Intrinsics.td b/include/llvm/Intrinsics.td index d051259..f33b39f 100644 --- a/include/llvm/Intrinsics.td +++ b/include/llvm/Intrinsics.td @@ -54,6 +54,11 @@ class LLVMType<string typeval> { string TypeVal = typeval; } +class LLVMPackedType<int numelts, LLVMType elty> : LLVMType<"Type::PackedTyID">{ + int NumElts = numelts; + LLVMType ElTy = elty; +} + def llvm_void_ty : LLVMType<"Type::VoidTyID">; def llvm_bool_ty : LLVMType<"Type::BoolTyID">; def llvm_sbyte_ty : LLVMType<"Type::SByteTyID">; @@ -71,6 +76,10 @@ def llvm_ptrptr_ty : LLVMType<"Type::PointerTyID">; // sbyte** def llvm_anchor_ty : LLVMType<"Type::PointerTyID">; // {}* def llvm_descriptor_ty : LLVMType<"Type::PointerTyID">; // global* +def llvm_v4i32_ty : LLVMPackedType<4, llvm_int_ty>; // 4 x int +def llvm_v4f32_ty : LLVMPackedType<4, llvm_float_ty>; // 4 x float +def llvm_v2f64_ty : LLVMPackedType<4, llvm_float_ty>; // 2 x double + //===----------------------------------------------------------------------===// // Intrinsic Definitions. //===----------------------------------------------------------------------===// @@ -88,10 +97,18 @@ class Intrinsic<list<LLVMType> types, list<IntrinsicProperty> properties = [], string name = ""> { string LLVMName = name; + string GCCBuiltinName = ""; list<LLVMType> Types = types; list<IntrinsicProperty> Properties = properties; } +/// GCCBuiltin - If this intrinsic exactly corresponds to a GCC builtin, this +/// specifies the name of the builtin. This provides automatic CBE and CFE +/// support. +class GCCBuiltin<string name> { + string GCCBuiltinName = name; +} + //===--------------- Variable Argument Handling Intrinsics ----------------===// // @@ -189,3 +206,16 @@ def int_dbg_region_end : Intrinsic<[llvm_void_ty]>; def int_dbg_func_start : Intrinsic<[llvm_void_ty, llvm_descriptor_ty]>; // dbg_declare, // Declare a local object + + +//===----------------------------------------------------------------------===// +// Target-specific intrinsics +//===----------------------------------------------------------------------===// + +//===----------------------------------------------------------------------===// +// PowerPC Intrinsics + +def int_ppc_altivec_lvx : Intrinsic<[llvm_v4i32_ty, llvm_int_ty, llvm_ptr_ty], + [IntrReadMem]>, + GCCBuiltin<"__builtin_altivec_lvx">; + |