llvmpipe: Split control flow function declarations and notes.
[mesa.git] / src / gallium / drivers / llvmpipe / lp_bld_intr.h
1 /**************************************************************************
2 *
3 * Copyright 2009 VMware, Inc.
4 * All Rights Reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
13 *
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
16 * of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 *
26 **************************************************************************/
27
28 /**
29 * @file
30 * Helper functions for calling intrinsics.
31 *
32 * @author Jose Fonseca <jfonseca@vmware.com>
33 */
34
35
36 #ifndef LP_BLD_INTR_H
37 #define LP_BLD_INTR_H
38
39
40 #include <llvm-c/Core.h>
41
42
43 #define LP_MAX_FUNC_ARGS 32
44
45
46 LLVMValueRef
47 lp_build_intrinsic(LLVMBuilderRef builder,
48 const char *name,
49 LLVMTypeRef ret_type,
50 LLVMValueRef *args,
51 unsigned num_args);
52
53
54 LLVMValueRef
55 lp_build_intrinsic_unary(LLVMBuilderRef builder,
56 const char *name,
57 LLVMTypeRef ret_type,
58 LLVMValueRef a);
59
60
61 LLVMValueRef
62 lp_build_intrinsic_binary(LLVMBuilderRef builder,
63 const char *name,
64 LLVMTypeRef ret_type,
65 LLVMValueRef a,
66 LLVMValueRef b);
67
68
69 LLVMValueRef
70 lp_build_intrinsic_map(LLVMBuilderRef builder,
71 const char *name,
72 LLVMTypeRef ret_type,
73 LLVMValueRef *args,
74 unsigned num_args);
75
76
77 LLVMValueRef
78 lp_build_intrinsic_map_unary(LLVMBuilderRef builder,
79 const char *name,
80 LLVMTypeRef ret_type,
81 LLVMValueRef a);
82
83
84 LLVMValueRef
85 lp_build_intrinsic_map_binary(LLVMBuilderRef builder,
86 const char *name,
87 LLVMTypeRef ret_type,
88 LLVMValueRef a,
89 LLVMValueRef b);
90
91
92 #endif /* !LP_BLD_INTR_H */