xref: /aosp_15_r20/external/swiftshader/third_party/subzero/src/IceInstX86.def (revision 03ce13f70fcc45d86ee91b7ee4cab1936a95046e)
1//===- subzero/src/IceInstX8664.def - X-macros for x86-64 insts -*- C++ -*-===//
2//
3//                        The Subzero Code Generator
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file defines properties of lowered x86 instructions in the
11// form of x-macros.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef SUBZERO_SRC_ICEINSTX86_DEF
16#define SUBZERO_SRC_ICEINSTX86_DEF
17
18#define ICEINSTX86BR_TABLE                                                     \
19  /* val, encode, opposite, dump, emit */                                      \
20  X(Br_o, 0, Br_no, "o", "jo")                                                 \
21  X(Br_no, 1, Br_o, "no", "jno")                                               \
22  X(Br_b, 2, Br_ae, "b", "jb")                                                 \
23  X(Br_ae, 3, Br_b, "ae", "jae")                                               \
24  X(Br_e, 4, Br_ne, "e", "je")                                                 \
25  X(Br_ne, 5, Br_e, "ne", "jne")                                               \
26  X(Br_be, 6, Br_a, "be", "jbe")                                               \
27  X(Br_a, 7, Br_be, "a", "ja")                                                 \
28  X(Br_s, 8, Br_ns, "s", "js")                                                 \
29  X(Br_ns, 9, Br_s, "ns", "jns")                                               \
30  X(Br_p, 10, Br_np, "p", "jp")                                                \
31  X(Br_np, 11, Br_p, "np", "jnp")                                              \
32  X(Br_l, 12, Br_ge, "l", "jl")                                                \
33  X(Br_ge, 13, Br_l, "ge", "jge")                                              \
34  X(Br_le, 14, Br_g, "le", "jle")                                              \
35  X(Br_g, 15, Br_le, "g", "jg")
36//#define X(val, encode, opp, dump, emit)
37
38#define ICEINSTX86CMPPS_TABLE                                                  \
39  /* val, emit */                                                              \
40  X(Cmpps_eq, "eq")                                                            \
41  X(Cmpps_lt, "lt")                                                            \
42  X(Cmpps_le, "le")                                                            \
43  X(Cmpps_unord, "unord")                                                      \
44  X(Cmpps_neq, "neq")                                                          \
45  X(Cmpps_nlt, "nlt")                                                          \
46  X(Cmpps_nle, "nle")                                                          \
47  X(Cmpps_ord, "ord")
48//#define X(val, emit)
49
50#define ICETYPEX86_TABLE                                                       \
51  /* tag,  elty, cvt,  sdss, pdps, spsd, int_, unpack, pack, width, fld */     \
52  X(void, void, "?", "", "", "", "", "", "", "", "")                           \
53  X(i1, void, "si", "", "", "", "", "", "", "b", "")                           \
54  X(i8, void, "si", "", "", "", "", "", "", "b", "")                           \
55  X(i16, void, "si", "", "", "", "", "", "", "w", "")                          \
56  X(i32, void, "si", "", "", "", "", "", "", "l", "")                          \
57  X(i64, void, "si", "", "", "", "", "", "", "q", "")                          \
58  X(f32, void, "ss", "ss", "ps", "ss", "d", "", "", "", "s")                   \
59  X(f64, void, "sd", "sd", "pd", "sd", "q", "", "", "", "l")                   \
60  X(v4i1, i32, "?", "", "", "", "d", "dq", "", "", "")                         \
61  X(v8i1, i16, "?", "", "", "", "w", "wd", "", "", "")                         \
62  X(v16i1, i8, "?", "", "", "", "b", "bw", "", "", "")                         \
63  X(v16i8, i8, "?", "", "", "", "b", "bw", "", "", "")                         \
64  X(v8i16, i16, "?", "", "", "", "w", "wd", "wb", "", "")                      \
65  X(v4i32, i32, "dq", "", "", "", "d", "dq", "dw", "", "")                     \
66  X(v4f32, f32, "ps", "", "ps", "ps", "d", "dq", "", "", "")
67//#define X(tag, elty, cvt, sdss, pdps, spsd, int_, unpack, pack, width, fld)
68
69#endif // SUBZERO_SRC_ICEINSTX8664_DEF
70