• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2010 Intel Corporation
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice (including the next
12  * paragraph) shall be included in all copies or substantial portions of the
13  * Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21  * DEALINGS IN THE SOFTWARE.
22  */
23 
24 enum ir_expression_operation {
25    ir_unop_bit_not,
26    ir_unop_logic_not,
27    ir_unop_neg,
28    ir_unop_abs,
29    ir_unop_sign,
30    ir_unop_rcp,
31    ir_unop_rsq,
32    ir_unop_sqrt,
33    ir_unop_exp,
34    ir_unop_log,
35    ir_unop_exp2,
36    ir_unop_log2,
37    ir_unop_f2i,
38    ir_unop_f2u,
39    ir_unop_i2f,
40    ir_unop_f2b,
41    ir_unop_b2f,
42    ir_unop_b2f16,
43    ir_unop_i2b,
44    ir_unop_b2i,
45    ir_unop_u2f,
46    ir_unop_i2u,
47    ir_unop_u2i,
48    ir_unop_d2f,
49    ir_unop_f2d,
50    ir_unop_f2f16,
51    ir_unop_f2fmp,
52    ir_unop_f162f,
53    ir_unop_i2i,
54    ir_unop_i2imp,
55    ir_unop_u2u,
56    ir_unop_u2ump,
57    ir_unop_d2i,
58    ir_unop_i2d,
59    ir_unop_d2u,
60    ir_unop_u2d,
61    ir_unop_d2b,
62    ir_unop_f162b,
63    ir_unop_bitcast_i2f,
64    ir_unop_bitcast_f2i,
65    ir_unop_bitcast_u2f,
66    ir_unop_bitcast_f2u,
67    ir_unop_bitcast_u642d,
68    ir_unop_bitcast_i642d,
69    ir_unop_bitcast_d2u64,
70    ir_unop_bitcast_d2i64,
71    ir_unop_i642i,
72    ir_unop_u642i,
73    ir_unop_i642u,
74    ir_unop_u642u,
75    ir_unop_i642b,
76    ir_unop_i642f,
77    ir_unop_u642f,
78    ir_unop_i642d,
79    ir_unop_u642d,
80    ir_unop_i2i64,
81    ir_unop_u2i64,
82    ir_unop_b2i64,
83    ir_unop_f2i64,
84    ir_unop_d2i64,
85    ir_unop_i2u64,
86    ir_unop_u2u64,
87    ir_unop_f2u64,
88    ir_unop_d2u64,
89    ir_unop_u642i64,
90    ir_unop_i642u64,
91    ir_unop_trunc,
92    ir_unop_ceil,
93    ir_unop_floor,
94    ir_unop_fract,
95    ir_unop_round_even,
96    ir_unop_sin,
97    ir_unop_cos,
98    ir_unop_atan,
99    ir_unop_dFdx,
100    ir_unop_dFdx_coarse,
101    ir_unop_dFdx_fine,
102    ir_unop_dFdy,
103    ir_unop_dFdy_coarse,
104    ir_unop_dFdy_fine,
105    ir_unop_pack_snorm_2x16,
106    ir_unop_pack_snorm_4x8,
107    ir_unop_pack_unorm_2x16,
108    ir_unop_pack_unorm_4x8,
109    ir_unop_pack_half_2x16,
110    ir_unop_unpack_snorm_2x16,
111    ir_unop_unpack_snorm_4x8,
112    ir_unop_unpack_unorm_2x16,
113    ir_unop_unpack_unorm_4x8,
114    ir_unop_unpack_half_2x16,
115    ir_unop_bitfield_reverse,
116    ir_unop_bit_count,
117    ir_unop_find_msb,
118    ir_unop_find_lsb,
119    ir_unop_clz,
120    ir_unop_saturate,
121    ir_unop_pack_double_2x32,
122    ir_unop_unpack_double_2x32,
123    ir_unop_pack_sampler_2x32,
124    ir_unop_pack_image_2x32,
125    ir_unop_unpack_sampler_2x32,
126    ir_unop_unpack_image_2x32,
127    ir_unop_frexp_sig,
128    ir_unop_frexp_exp,
129    ir_unop_subroutine_to_int,
130    ir_unop_interpolate_at_centroid,
131    ir_unop_get_buffer_size,
132    ir_unop_ssbo_unsized_array_length,
133    ir_unop_pack_int_2x32,
134    ir_unop_pack_uint_2x32,
135    ir_unop_unpack_int_2x32,
136    ir_unop_unpack_uint_2x32,
137    ir_binop_add,
138    ir_binop_sub,
139    ir_binop_add_sat,
140    ir_binop_sub_sat,
141    ir_binop_abs_sub,
142    ir_binop_avg,
143    ir_binop_avg_round,
144    ir_binop_mul,
145    ir_binop_mul_32x16,
146    ir_binop_imul_high,
147    ir_binop_div,
148    ir_binop_carry,
149    ir_binop_borrow,
150    ir_binop_mod,
151    ir_binop_less,
152    ir_binop_gequal,
153    ir_binop_equal,
154    ir_binop_nequal,
155    ir_binop_all_equal,
156    ir_binop_any_nequal,
157    ir_binop_lshift,
158    ir_binop_rshift,
159    ir_binop_bit_and,
160    ir_binop_bit_xor,
161    ir_binop_bit_or,
162    ir_binop_logic_and,
163    ir_binop_logic_xor,
164    ir_binop_logic_or,
165    ir_binop_dot,
166    ir_binop_min,
167    ir_binop_max,
168    ir_binop_pow,
169    ir_binop_ubo_load,
170    ir_binop_ldexp,
171    ir_binop_vector_extract,
172    ir_binop_interpolate_at_offset,
173    ir_binop_interpolate_at_sample,
174    ir_binop_atan2,
175    ir_triop_fma,
176    ir_triop_lrp,
177    ir_triop_csel,
178    ir_triop_bitfield_extract,
179    ir_triop_vector_insert,
180    ir_quadop_bitfield_insert,
181    ir_quadop_vector,
182 
183    /* Sentinels marking the last of each kind of operation. */
184    ir_last_unop = ir_unop_unpack_uint_2x32,
185    ir_last_binop = ir_binop_atan2,
186    ir_last_triop = ir_triop_vector_insert,
187    ir_last_quadop = ir_quadop_vector,
188    ir_last_opcode = ir_quadop_vector
189 };
190