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