• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//===- subzero/src/IceTargetLoweringX8632.def - x86-32 X-macros -*- 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 certain patterns for lowering to x86-32 target
11// instructions, in the form of x-macros.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef SUBZERO_SRC_ICETARGETLOWERINGX8632_DEF
16#define SUBZERO_SRC_ICETARGETLOWERINGX8632_DEF
17
18#define FCMPX8632_TABLE                                              \
19  /*       <---- scalar comparison ---->  <- vector comparison -> */ \
20  /* val,  dflt, swap, C1,      C2,       swap,  predicate        */ \
21  X(False, 0,    0,    Br_None, Br_None,  0,     Cmpps_Invalid)      \
22  X(Oeq,   0,    0,    Br_ne,   Br_p,     0,     Cmpps_eq)           \
23  X(Ogt,   1,    0,    Br_a,    Br_None,  1,     Cmpps_lt)           \
24  X(Oge,   1,    0,    Br_ae,   Br_None,  1,     Cmpps_le)           \
25  X(Olt,   1,    1,    Br_a,    Br_None,  0,     Cmpps_lt)           \
26  X(Ole,   1,    1,    Br_ae,   Br_None,  0,     Cmpps_le)           \
27  X(One,   1,    0,    Br_ne,   Br_None,  0,     Cmpps_Invalid)      \
28  X(Ord,   1,    0,    Br_np,   Br_None,  0,     Cmpps_ord)          \
29  X(Ueq,   1,    0,    Br_e,    Br_None,  0,     Cmpps_Invalid)      \
30  X(Ugt,   1,    1,    Br_b,    Br_None,  0,     Cmpps_nle)          \
31  X(Uge,   1,    1,    Br_be,   Br_None,  0,     Cmpps_nlt)          \
32  X(Ult,   1,    0,    Br_b,    Br_None,  1,     Cmpps_nle)          \
33  X(Ule,   1,    0,    Br_be,   Br_None,  1,     Cmpps_nlt)          \
34  X(Une,   1,    0,    Br_ne,   Br_p,     0,     Cmpps_neq)          \
35  X(Uno,   1,    0,    Br_p,    Br_None,  0,     Cmpps_unord)        \
36  X(True,  1,    0,    Br_None, Br_None,  0,     Cmpps_Invalid)      \
37//#define X(val, dflt, swapS, C1, C2, swapV, pred)
38
39#define ICMPX8632_TABLE                     \
40  /* val, C_32,  C1_64,   C2_64,   C3_64 */ \
41  X(Eq,   Br_e,  Br_None, Br_ne,   Br_e)    \
42  X(Ne,   Br_ne, Br_ne,   Br_None, Br_ne)   \
43  X(Ugt,  Br_a,  Br_a,    Br_b,    Br_a)    \
44  X(Uge,  Br_ae, Br_a,    Br_b,    Br_ae)   \
45  X(Ult,  Br_b,  Br_b,    Br_a,    Br_b)    \
46  X(Ule,  Br_be, Br_b,    Br_a,    Br_be)   \
47  X(Sgt,  Br_g,  Br_g,    Br_l,    Br_a)    \
48  X(Sge,  Br_ge, Br_g,    Br_l,    Br_ae)   \
49  X(Slt,  Br_l,  Br_l,    Br_g,    Br_b)    \
50  X(Sle,  Br_le, Br_l,    Br_g,    Br_be)   \
51//#define X(val, C_32, C1_64, C2_64, C3_64)
52
53#endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_DEF
54