Lines Matching refs:MODE
1 /* Machine mode definitions for GCC; included by rtl.h and tree.h.
27 /* Get the name of mode MODE as a string. */
30 #define GET_MODE_NAME(MODE) mode_name[MODE]
32 /* Mode classes. */
34 #include "mode-classes.def"
40 /* Get the general kind of object that mode MODE represents
44 #define GET_MODE_CLASS(MODE) mode_class[MODE]
46 /* Nonzero if MODE is an integral mode. */
47 #define INTEGRAL_MODE_P(MODE) \
48 (GET_MODE_CLASS (MODE) == MODE_INT \
49 || GET_MODE_CLASS (MODE) == MODE_PARTIAL_INT \
50 || GET_MODE_CLASS (MODE) == MODE_COMPLEX_INT \
51 || GET_MODE_CLASS (MODE) == MODE_VECTOR_INT)
53 /* Nonzero if MODE is a floating-point mode. */
54 #define FLOAT_MODE_P(MODE) \
55 (GET_MODE_CLASS (MODE) == MODE_FLOAT \
56 || GET_MODE_CLASS (MODE) == MODE_DECIMAL_FLOAT \
57 || GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT \
58 || GET_MODE_CLASS (MODE) == MODE_VECTOR_FLOAT)
60 /* Nonzero if MODE is a complex mode. */
61 #define COMPLEX_MODE_P(MODE) \
62 (GET_MODE_CLASS (MODE) == MODE_COMPLEX_INT \
63 || GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT)
65 /* Nonzero if MODE is a vector mode. */
66 #define VECTOR_MODE_P(MODE) \
67 (GET_MODE_CLASS (MODE) == MODE_VECTOR_INT \
68 || GET_MODE_CLASS (MODE) == MODE_VECTOR_FLOAT \
69 || GET_MODE_CLASS (MODE) == MODE_VECTOR_FRACT \
70 || GET_MODE_CLASS (MODE) == MODE_VECTOR_UFRACT \
71 || GET_MODE_CLASS (MODE) == MODE_VECTOR_ACCUM \
72 || GET_MODE_CLASS (MODE) == MODE_VECTOR_UACCUM)
74 /* Nonzero if MODE is a scalar integral mode. */
75 #define SCALAR_INT_MODE_P(MODE) \
76 (GET_MODE_CLASS (MODE) == MODE_INT \
77 || GET_MODE_CLASS (MODE) == MODE_PARTIAL_INT)
79 /* Nonzero if MODE is a scalar floating point mode. */
80 #define SCALAR_FLOAT_MODE_P(MODE) \
81 (GET_MODE_CLASS (MODE) == MODE_FLOAT \
82 || GET_MODE_CLASS (MODE) == MODE_DECIMAL_FLOAT)
84 /* Nonzero if MODE is a decimal floating point mode. */
85 #define DECIMAL_FLOAT_MODE_P(MODE) \
86 (GET_MODE_CLASS (MODE) == MODE_DECIMAL_FLOAT)
88 /* Nonzero if MODE is a scalar fract mode. */
89 #define SCALAR_FRACT_MODE_P(MODE) \
90 (GET_MODE_CLASS (MODE) == MODE_FRACT)
92 /* Nonzero if MODE is a scalar ufract mode. */
93 #define SCALAR_UFRACT_MODE_P(MODE) \
94 (GET_MODE_CLASS (MODE) == MODE_UFRACT)
96 /* Nonzero if MODE is a scalar fract or ufract mode. */
97 #define ALL_SCALAR_FRACT_MODE_P(MODE) \
98 (SCALAR_FRACT_MODE_P (MODE) || SCALAR_UFRACT_MODE_P (MODE))
100 /* Nonzero if MODE is a scalar accum mode. */
101 #define SCALAR_ACCUM_MODE_P(MODE) \
102 (GET_MODE_CLASS (MODE) == MODE_ACCUM)
104 /* Nonzero if MODE is a scalar uaccum mode. */
105 #define SCALAR_UACCUM_MODE_P(MODE) \
106 (GET_MODE_CLASS (MODE) == MODE_UACCUM)
108 /* Nonzero if MODE is a scalar accum or uaccum mode. */
109 #define ALL_SCALAR_ACCUM_MODE_P(MODE) \
110 (SCALAR_ACCUM_MODE_P (MODE) || SCALAR_UACCUM_MODE_P (MODE))
112 /* Nonzero if MODE is a scalar fract or accum mode. */
113 #define SIGNED_SCALAR_FIXED_POINT_MODE_P(MODE) \
114 (SCALAR_FRACT_MODE_P (MODE) || SCALAR_ACCUM_MODE_P (MODE))
116 /* Nonzero if MODE is a scalar ufract or uaccum mode. */
117 #define UNSIGNED_SCALAR_FIXED_POINT_MODE_P(MODE) \
118 (SCALAR_UFRACT_MODE_P (MODE) || SCALAR_UACCUM_MODE_P (MODE))
120 /* Nonzero if MODE is a scalar fract, ufract, accum or uaccum mode. */
121 #define ALL_SCALAR_FIXED_POINT_MODE_P(MODE) \
122 (SIGNED_SCALAR_FIXED_POINT_MODE_P (MODE) \
123 || UNSIGNED_SCALAR_FIXED_POINT_MODE_P (MODE))
125 /* Nonzero if MODE is a scalar/vector fract mode. */
126 #define FRACT_MODE_P(MODE) \
127 (GET_MODE_CLASS (MODE) == MODE_FRACT \
128 || GET_MODE_CLASS (MODE) == MODE_VECTOR_FRACT)
130 /* Nonzero if MODE is a scalar/vector ufract mode. */
131 #define UFRACT_MODE_P(MODE) \
132 (GET_MODE_CLASS (MODE) == MODE_UFRACT \
133 || GET_MODE_CLASS (MODE) == MODE_VECTOR_UFRACT)
135 /* Nonzero if MODE is a scalar/vector fract or ufract mode. */
136 #define ALL_FRACT_MODE_P(MODE) \
137 (FRACT_MODE_P (MODE) || UFRACT_MODE_P (MODE))
139 /* Nonzero if MODE is a scalar/vector accum mode. */
140 #define ACCUM_MODE_P(MODE) \
141 (GET_MODE_CLASS (MODE) == MODE_ACCUM \
142 || GET_MODE_CLASS (MODE) == MODE_VECTOR_ACCUM)
144 /* Nonzero if MODE is a scalar/vector uaccum mode. */
145 #define UACCUM_MODE_P(MODE) \
146 (GET_MODE_CLASS (MODE) == MODE_UACCUM \
147 || GET_MODE_CLASS (MODE) == MODE_VECTOR_UACCUM)
149 /* Nonzero if MODE is a scalar/vector accum or uaccum mode. */
150 #define ALL_ACCUM_MODE_P(MODE) \
151 (ACCUM_MODE_P (MODE) || UACCUM_MODE_P (MODE))
153 /* Nonzero if MODE is a scalar/vector fract or accum mode. */
154 #define SIGNED_FIXED_POINT_MODE_P(MODE) \
155 (FRACT_MODE_P (MODE) || ACCUM_MODE_P (MODE))
157 /* Nonzero if MODE is a scalar/vector ufract or uaccum mode. */
158 #define UNSIGNED_FIXED_POINT_MODE_P(MODE) \
159 (UFRACT_MODE_P (MODE) || UACCUM_MODE_P (MODE))
161 /* Nonzero if MODE is a scalar/vector fract, ufract, accum or uaccum mode. */
162 #define ALL_FIXED_POINT_MODE_P(MODE) \
163 (SIGNED_FIXED_POINT_MODE_P (MODE) \
164 || UNSIGNED_FIXED_POINT_MODE_P (MODE))
177 /* Get the size in bytes and bits of an object of mode MODE. */
180 #define GET_MODE_SIZE(MODE) ((unsigned short) mode_size[MODE])
181 #define GET_MODE_BITSIZE(MODE) ((unsigned short) (GET_MODE_SIZE (MODE) * BITS_PER_UNIT))
183 /* Get the number of value bits of an object of mode MODE. */
185 #define GET_MODE_PRECISION(MODE) mode_precision[MODE]
187 /* Get the number of integral bits of an object of mode MODE. */
189 #define GET_MODE_IBIT(MODE) mode_ibit[MODE]
191 /* Get the number of fractional bits of an object of mode MODE. */
193 #define GET_MODE_FBIT(MODE) mode_fbit[MODE]
196 that fit within mode MODE. */
200 #define GET_MODE_MASK(MODE) mode_mask_array[MODE]
202 /* Return the mode of the inner elements in a vector. */
205 #define GET_MODE_INNER(MODE) ((enum machine_mode) mode_inner[MODE])
207 /* Get the size in bytes of the basic parts of an object of mode MODE. */
209 #define GET_MODE_UNIT_SIZE(MODE) \
210 (GET_MODE_INNER (MODE) == VOIDmode \
211 ? GET_MODE_SIZE (MODE) \
212 : GET_MODE_SIZE (GET_MODE_INNER (MODE)))
217 #define GET_MODE_NUNITS(MODE) mode_nunits[MODE]
219 /* Get the next wider natural mode (eg, QI -> HI -> SI -> DI -> TI). */
222 #define GET_MODE_WIDER_MODE(MODE) mode_wider[MODE]
225 #define GET_MODE_2XWIDER_MODE(MODE) mode_2xwider[MODE]
227 /* Return the mode for data of a given size SIZE and mode class CLASS.
229 The value is BLKmode if no other mode is found. */
233 /* Similar, but find the smallest mode for a given width. */
239 /* Return an integer mode of the exact same size as the input mode,
244 /* Find the best mode to use to access a bit field. */
255 #define GET_MODE_ALIGNMENT(MODE) get_mode_alignment (MODE)
257 /* For each class, get the narrowest mode in that class. */
263 and the mode whose class is Pmode and whose size is POINTER_SIZE. */
269 /* Target-dependent machine mode initialization - in insn-modes.c. */