summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_bld_intr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_bld_intr.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_bld_intr.h43
1 files changed, 42 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_intr.h b/src/gallium/drivers/llvmpipe/lp_bld_intr.h
index 67f596c2b5..1e8e0edd83 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_intr.h
+++ b/src/gallium/drivers/llvmpipe/lp_bld_intr.h
@@ -27,7 +27,7 @@
/**
* @file
- * Helper arithmetic functions.
+ * Helper functions for calling intrinsics.
*
* @author Jose Fonseca <jfonseca@vmware.com>
*/
@@ -40,6 +40,24 @@
#include <llvm-c/Core.h>
+#define LP_MAX_FUNC_ARGS 32
+
+
+LLVMValueRef
+lp_build_intrinsic(LLVMBuilderRef builder,
+ const char *name,
+ LLVMTypeRef ret_type,
+ LLVMValueRef *args,
+ unsigned num_args);
+
+
+LLVMValueRef
+lp_build_intrinsic_unary(LLVMBuilderRef builder,
+ const char *name,
+ LLVMTypeRef ret_type,
+ LLVMValueRef a);
+
+
LLVMValueRef
lp_build_intrinsic_binary(LLVMBuilderRef builder,
const char *name,
@@ -48,4 +66,27 @@ lp_build_intrinsic_binary(LLVMBuilderRef builder,
LLVMValueRef b);
+LLVMValueRef
+lp_build_intrinsic_map(LLVMBuilderRef builder,
+ const char *name,
+ LLVMTypeRef ret_type,
+ LLVMValueRef *args,
+ unsigned num_args);
+
+
+LLVMValueRef
+lp_build_intrinsic_map_unary(LLVMBuilderRef builder,
+ const char *name,
+ LLVMTypeRef ret_type,
+ LLVMValueRef a);
+
+
+LLVMValueRef
+lp_build_intrinsic_map_binary(LLVMBuilderRef builder,
+ const char *name,
+ LLVMTypeRef ret_type,
+ LLVMValueRef a,
+ LLVMValueRef b);
+
+
#endif /* !LP_BLD_INTR_H */