xref: /aosp_15_r20/external/mesa3d/src/imagination/rogue/rogue_alu_instrs.def (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1/*
2 * Copyright © 2022 Imagination Technologies Ltd.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * 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 THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 * SOFTWARE.
22 */
23
24/**
25 * \file rogue_alu_instrs.def
26 *
27 * \brief Contains macros defining ALU instructions.
28 */
29
30/*
31 * ROGUE_BUILDER_DEFINE_ALUds
32 *    d: Number of destinations.
33 *    s: Number of sources.
34 */
35
36#ifndef ROGUE_BUILDER_DEFINE_ALU11
37#define ROGUE_BUILDER_DEFINE_ALU11(...)
38#endif /* ROGUE_BUILDER_DEFINE_ALU11 */
39
40#ifndef ROGUE_BUILDER_DEFINE_ALU12
41#define ROGUE_BUILDER_DEFINE_ALU12(...)
42#endif /* ROGUE_BUILDER_DEFINE_ALU12 */
43
44#ifndef ROGUE_BUILDER_DEFINE_ALU13
45#define ROGUE_BUILDER_DEFINE_ALU13(...)
46#endif /* ROGUE_BUILDER_DEFINE_ALU13 */
47
48#ifndef ROGUE_BUILDER_DEFINE_ALU22
49#define ROGUE_BUILDER_DEFINE_ALU22(...)
50#endif /* ROGUE_BUILDER_DEFINE_ALU22 */
51
52#ifndef ROGUE_BUILDER_DEFINE_ALU23
53#define ROGUE_BUILDER_DEFINE_ALU23(...)
54#endif /* ROGUE_BUILDER_DEFINE_ALU23 */
55
56#ifndef ROGUE_BUILDER_DEFINE_ALU35
57#define ROGUE_BUILDER_DEFINE_ALU35(...)
58#endif /* ROGUE_BUILDER_DEFINE_ALU35 */
59
60ROGUE_BUILDER_DEFINE_ALU11(MOV)
61ROGUE_BUILDER_DEFINE_ALU11(MBYP)
62
63ROGUE_BUILDER_DEFINE_ALU11(FABS)
64ROGUE_BUILDER_DEFINE_ALU11(FNEG)
65ROGUE_BUILDER_DEFINE_ALU11(FNABS)
66
67ROGUE_BUILDER_DEFINE_ALU11(PCK_U8888)
68
69ROGUE_BUILDER_DEFINE_ALU12(FADD)
70ROGUE_BUILDER_DEFINE_ALU12(FMUL)
71
72ROGUE_BUILDER_DEFINE_ALU12(FMAX)
73ROGUE_BUILDER_DEFINE_ALU12(FMIN)
74
75ROGUE_BUILDER_DEFINE_ALU13(FMAD)
76ROGUE_BUILDER_DEFINE_ALU13(CMOV)
77
78ROGUE_BUILDER_DEFINE_ALU22(TST)
79
80ROGUE_BUILDER_DEFINE_ALU23(MOVC)
81
82ROGUE_BUILDER_DEFINE_ALU35(ADD64)
83
84#undef ROGUE_BUILDER_DEFINE_ALU35
85#undef ROGUE_BUILDER_DEFINE_ALU23
86#undef ROGUE_BUILDER_DEFINE_ALU22
87#undef ROGUE_BUILDER_DEFINE_ALU13
88#undef ROGUE_BUILDER_DEFINE_ALU12
89#undef ROGUE_BUILDER_DEFINE_ALU11
90