GCC Middle and Back End API Reference
|
#include "bconfig.h"
#include "system.h"
#include "errors.h"
#include "mode-classes.def"
#include "machmode.def"
Data Structures | |
struct | mode_data |
struct | mode_adjust |
Macros | |
#define | DEF_MODE_CLASS(M) |
#define | DEF_MODE_CLASS(M) |
#define | HAVE_EXTRA_MODES 0 |
#define | EXTRA_MODES_FILE "" |
#define | for_all_modes(C, M) |
#define | validate_field_(mname, fname, req, val, unset, file, line) |
#define | validate_field(M, F) |
#define | COMPLEX_MODES(C) |
#define | VECTOR_MODES_WITH_PREFIX(PREFIX, C, W, ORDER) |
#define | VECTOR_MODES(C, W) |
#define | VECTOR_BOOL_MODE(NAME, COUNT, COMPONENT, BYTESIZE) |
#define | _SPECIAL_MODE(C, N) |
#define | RANDOM_MODE(N) |
#define | CC_MODE(N) |
#define | INT_MODE(N, Y) |
#define | FRACTIONAL_INT_MODE(N, B, Y) |
#define | BOOL_MODE(N, B, Y) |
#define | OPAQUE_MODE(N, B) |
#define | FRACT_MODE(N, Y, F) |
#define | UFRACT_MODE(N, Y, F) |
#define | ACCUM_MODE(N, Y, I, F) |
#define | UACCUM_MODE(N, Y, I, F) |
#define | FLOAT_MODE(N, Y, F) |
#define | FRACTIONAL_FLOAT_MODE(N, B, Y, F) |
#define | DECIMAL_FLOAT_MODE(N, Y, F) |
#define | FRACTIONAL_DECIMAL_FLOAT_MODE(N, B, Y, F) |
#define | RESET_FLOAT_FORMAT(N, F) |
#define | INT_N(M, PREC) |
#define | PARTIAL_INT_MODE(M, PREC, NAME) |
#define | VECTOR_MODE_WITH_PREFIX(PREFIX, C, M, N, ORDER) |
#define | VECTOR_MODE(C, M, N) |
#define | _ADD_ADJUST(A, M, X, C1, C2) |
#define | ADJUST_NUNITS(M, X) |
#define | ADJUST_BYTESIZE(M, X) |
#define | ADJUST_ALIGNMENT(M, X) |
#define | ADJUST_PRECISION(M, X) |
#define | ADJUST_FLOAT_FORMAT(M, X) |
#define | ADJUST_IBIT(M, X) |
#define | ADJUST_FBIT(M, X) |
#define | NUM_POLY_INT_COEFFS 1 |
#define | ZERO_COEFFS "" |
#define | tagged_printf(FMT, ARG, TAG) |
#define | print_decl(TYPE, NAME, ASIZE) |
#define | print_maybe_const_decl(TYPE, NAME, ASIZE, NEEDS_ADJ) |
#define | print_closer() |
Enumerations | |
enum | mode_class { MODE_CLASSES , MAX_MODE_CLASS } |
enum | requirement { SET , UNSET , OPTIONAL } |
Functions | |
static enum mode_class | complex_class (enum mode_class c) |
static enum mode_class | vector_class (enum mode_class cl) |
static struct mode_data * | find_mode (const char *name) |
static struct mode_data * | new_mode (enum mode_class cl, const char *name, const char *file, unsigned int line) |
static hashval_t | hash_mode (const void *p) |
static int | eq_mode (const void *p, const void *q) |
static void | new_adjust (const char *name, struct mode_adjust **category, const char *catname, const char *adjustment, enum mode_class required_class_from, enum mode_class required_class_to, const char *file, unsigned int line) |
static void | validate_mode (struct mode_data *m, enum requirement r_precision, enum requirement r_bytesize, enum requirement r_component, enum requirement r_ncomponents, enum requirement r_format) |
static void | complete_mode (struct mode_data *m) |
static void | complete_all_modes (void) |
static void | make_complex_modes (enum mode_class cl, const char *file, unsigned int line) |
static void | make_vector_modes (enum mode_class cl, const char *prefix, unsigned int width, unsigned int order, const char *file, unsigned int line) |
static void | make_vector_bool_mode (const char *name, unsigned int count, const char *component, unsigned int bytesize, const char *file, unsigned int line) |
static void | make_special_mode (enum mode_class cl, const char *name, const char *file, unsigned int line) |
static void | make_int_mode (const char *name, unsigned int precision, unsigned int bytesize, const char *file, unsigned int line) |
static void | make_bool_mode (const char *name, unsigned int precision, unsigned int bytesize, const char *file, unsigned int line) |
static void | make_opaque_mode (const char *name, unsigned int precision, unsigned int bytesize, const char *file, unsigned int line) |
static void | make_fixed_point_mode (enum mode_class cl, const char *name, unsigned int bytesize, unsigned int ibit, unsigned int fbit, const char *file, unsigned int line) |
static void | make_float_mode (const char *name, unsigned int precision, unsigned int bytesize, const char *format, const char *file, unsigned int line) |
static void | make_decimal_float_mode (const char *name, unsigned int precision, unsigned int bytesize, const char *format, const char *file, unsigned int line) |
static void | reset_float_format (const char *name, const char *format, const char *file, unsigned int line) |
static void | make_int_n (const char *m, int bitsize, const char *file, unsigned int line) |
static void | make_partial_integer_mode (const char *base, const char *name, unsigned int precision, const char *file, unsigned int line) |
static void | make_vector_mode (enum mode_class bclass, const char *prefix, const char *base, unsigned int ncomponents, unsigned int order, const char *file, unsigned int line) |
static void | create_modes (void) |
static int | cmp_modes (const void *a, const void *b) |
static void | calc_wider_mode (void) |
static void | emit_max_int (void) |
static void | emit_mode_size_inline (void) |
static void | emit_mode_nunits_inline (void) |
static void | emit_mode_inner_inline (void) |
static void | emit_mode_unit_size_inline (void) |
static void | emit_mode_unit_precision_inline (void) |
static const char * | get_mode_class (struct mode_data *mode) |
static void | emit_insn_modes_h (void) |
static void | emit_insn_modes_inline_h (void) |
static void | emit_insn_modes_c_header (void) |
static void | emit_min_insn_modes_c_header (void) |
static void | emit_mode_name (void) |
static void | emit_mode_class (void) |
static void | emit_mode_precision (void) |
static void | emit_mode_size (void) |
static void | emit_mode_nunits (void) |
static void | emit_mode_wider (void) |
static void | emit_mode_complex (void) |
static void | emit_mode_mask (void) |
static void | emit_mode_inner (void) |
static void | emit_mode_unit_size (void) |
static void | emit_mode_unit_precision (void) |
static void | emit_mode_base_align (void) |
static void | emit_class_narrowest_mode (void) |
static void | emit_real_format_for_mode (void) |
static void | emit_mode_adjustments (void) |
static void | emit_mode_ibit (void) |
static void | emit_mode_fbit (void) |
static void | emit_mode_int_n (void) |
static void | emit_insn_modes_c (void) |
static void | emit_min_insn_modes_c (void) |
int | main (int argc, char **argv) |
Variables | |
static const char *const | mode_class_names [MAX_MODE_CLASS] |
static struct mode_data * | modes [MAX_MODE_CLASS] |
static unsigned int | n_modes [MAX_MODE_CLASS] |
static struct mode_data * | void_mode |
static const struct mode_data | blank_mode |
static htab_t | modes_by_name |
static struct mode_adjust * | adj_nunits |
static struct mode_adjust * | adj_bytesize |
static struct mode_adjust * | adj_alignment |
static struct mode_adjust * | adj_format |
static struct mode_adjust * | adj_ibit |
static struct mode_adjust * | adj_fbit |
static struct mode_adjust * | adj_precision |
static int | bits_per_unit |
static int | max_bitsize_mode_any_int |
static int | max_bitsize_mode_any_mode |
#define _ADD_ADJUST | ( | A, | |
M, | |||
X, | |||
C1, | |||
C2 ) |
Adjustability.
#define _SPECIAL_MODE | ( | C, | |
N ) |
Input.
#define ADJUST_ALIGNMENT | ( | M, | |
X ) |
#define ADJUST_BYTESIZE | ( | M, | |
X ) |
#define ADJUST_FBIT | ( | M, | |
X ) |
#define ADJUST_FLOAT_FORMAT | ( | M, | |
X ) |
#define ADJUST_IBIT | ( | M, | |
X ) |
#define ADJUST_NUNITS | ( | M, | |
X ) |
#define ADJUST_PRECISION | ( | M, | |
X ) |
#define CC_MODE | ( | N | ) |
#define COMPLEX_MODES | ( | C | ) |
For each mode in class CLASS, construct a corresponding complex mode.
#define DEF_MODE_CLASS | ( | M | ) |
Generate the machine mode enumeration and associated tables. Copyright (C) 2003-2025 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
enum mode_class is normally defined by machmode.h but we can't include that header here.
Text names of mode classes, for output.
#define DEF_MODE_CLASS | ( | M | ) |
Generate the machine mode enumeration and associated tables. Copyright (C) 2003-2025 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
enum mode_class is normally defined by machmode.h but we can't include that header here.
Text names of mode classes, for output.
#define EXTRA_MODES_FILE "" |
#define for_all_modes | ( | C, | |
M ) |
Referenced by complete_all_modes(), emit_insn_modes_h(), emit_mode_adjustments(), emit_mode_base_align(), emit_mode_class(), emit_mode_complex(), emit_mode_fbit(), emit_mode_ibit(), emit_mode_inner(), emit_mode_inner_inline(), emit_mode_int_n(), emit_mode_mask(), emit_mode_name(), emit_mode_nunits(), emit_mode_nunits_inline(), emit_mode_precision(), emit_mode_size(), emit_mode_size_inline(), emit_mode_unit_precision(), emit_mode_unit_precision_inline(), emit_mode_unit_size(), emit_mode_unit_size_inline(), and emit_mode_wider().
#define HAVE_EXTRA_MODES 0 |
#define INT_N | ( | M, | |
PREC ) |
__intN support.
#define NUM_POLY_INT_COEFFS 1 |
Referenced by inchash::add_rtx(), bp_pack_poly_value(), build_new_poly_int_cst(), build_poly_int_cst(), const_poly_int_value(), cselib_hash_rtx(), DFS::DFS_write_tree_body(), dump_generic_node(), emit_insn_modes_h(), const_poly_int_hasher::equal(), equiv_constant(), estimated_poly_value(), force_fit_type(), const_poly_int_hasher::hash(), operand_compare::hash_operand(), hash_rtx(), hash_tree(), immed_wide_int_const(), init_emit_once(), int_loc_descriptor(), lra_rtx_hash(), lto_input_ts_poly_tree_pointers(), lto_write_mode_table(), poly_int_binop(), poly_int_cst_value(), poly_int_read_common(), poly_int_rtx_p(), print_node(), print_poly_int(), rtx_writer::print_rtx(), print_value(), ptrdiff_tree_p(), rtx_to_poly_int64(), SET_TYPE_VECTOR_SUBPARTS(), simplify_const_binary_operation(), streamer_write_poly_int64(), streamer_write_poly_uint64(), wi::to_poly_offset(), wi::to_poly_widest(), tree_fits_poly_int64_p(), tree_fits_poly_uint64_p(), trunc_int_for_mode(), TYPE_VECTOR_SUBPARTS(), subreg_shape::unique_id(), valid_constant_size_p(), valid_vector_subparts_p(), and write_ts_poly_tree_pointers().
#define OPAQUE_MODE | ( | N, | |
B ) |
#define PARTIAL_INT_MODE | ( | M, | |
PREC, | |||
NAME ) |
Partial integer modes are specified by relation to a full integer mode.
#define print_closer | ( | ) |
Referenced by emit_class_narrowest_mode(), emit_mode_base_align(), emit_mode_class(), emit_mode_complex(), emit_mode_fbit(), emit_mode_ibit(), emit_mode_inner(), emit_mode_int_n(), emit_mode_mask(), emit_mode_name(), emit_mode_nunits(), emit_mode_precision(), emit_mode_size(), emit_mode_unit_precision(), emit_mode_unit_size(), emit_mode_wider(), and emit_real_format_for_mode().
#define print_decl | ( | TYPE, | |
NAME, | |||
ASIZE ) |
#define print_maybe_const_decl | ( | TYPE, | |
NAME, | |||
ASIZE, | |||
NEEDS_ADJ ) |
Referenced by emit_mode_base_align(), emit_mode_fbit(), emit_mode_ibit(), emit_mode_mask(), emit_mode_nunits(), emit_mode_precision(), emit_mode_size(), emit_mode_unit_size(), and emit_real_format_for_mode().
#define RANDOM_MODE | ( | N | ) |
#define RESET_FLOAT_FORMAT | ( | N, | |
F ) |
#define tagged_printf | ( | FMT, | |
ARG, | |||
TAG ) |
Output routines.
Referenced by emit_class_narrowest_mode(), emit_mode_base_align(), emit_mode_class(), emit_mode_complex(), emit_mode_fbit(), emit_mode_ibit(), emit_mode_inner(), emit_mode_int_n(), emit_mode_mask(), emit_mode_nunits(), emit_mode_precision(), emit_mode_size(), emit_mode_unit_precision(), emit_mode_unit_size(), emit_mode_wider(), and emit_real_format_for_mode().
#define validate_field | ( | M, | |
F ) |
Referenced by validate_mode().
#define validate_field_ | ( | mname, | |
fname, | |||
req, | |||
val, | |||
unset, | |||
file, | |||
line ) |
#define VECTOR_BOOL_MODE | ( | NAME, | |
COUNT, | |||
COMPONENT, | |||
BYTESIZE ) |
Create a vector of booleans called NAME with COUNT elements and BYTESIZE bytes in total.
#define VECTOR_MODE | ( | C, | |
M, | |||
N ) |
#define VECTOR_MODE_WITH_PREFIX | ( | PREFIX, | |
C, | |||
M, | |||
N, | |||
ORDER ) |
A single vector mode can be specified by naming its component mode and the number of components.
#define VECTOR_MODES | ( | C, | |
W ) |
#define VECTOR_MODES_WITH_PREFIX | ( | PREFIX, | |
C, | |||
W, | |||
ORDER ) |
For all modes in class CL, construct vector modes of width WIDTH, having as many components as necessary. ORDER is the sorting order of the mode, with smaller numbers indicating a higher priority.
#define ZERO_COEFFS "" |
Text to add to the constant part of a poly_int initializer in order to fill out te whole structure.
Referenced by emit_mode_nunits(), emit_mode_precision(), and emit_mode_size().
enum mode_class |
enum requirement |
|
static |
References cmp_modes(), mode_data::component, i, MAX, MAX_MODE_CLASS, modes, n_modes, mode_data::next, qsort, void_mode, and mode_data::wider.
Referenced by main().
|
static |
Processing.
Sort a list of modes into the order needed for the WIDER field: major sort by precision, minor sort by component precision. For instance: QI < HI < SI < DI < TI V4QI < V2HI < V8QI < V4HI < V2SI. If the precision is not set, sort by the bytesize. A mode with precision set gets sorted before a mode without precision set, if they have the same bytesize; this is the right thing because the precision must always be smaller than the bytesize * BITS_PER_UNIT. We don't have to do anything special to get this done -- an unset precision shows up as (unsigned int)-1, i.e. UINT_MAX.
References a, b, mode_data::bytesize, mode_data::component, mode_data::counter, mode_data::order, and mode_data::precision.
Referenced by calc_wider_mode().
|
static |
References mode_data::cl, complete_mode(), and for_all_modes.
Referenced by main().
|
static |
Given a partially-filled-out mode structure, figure out what we can and fill the rest of it in; die if it isn't enough.
References mode_data::alignment, mode_data::bytesize, mode_data::cl, mode_data::component, mode_data::contained, error(), mode_data::file, gcc_unreachable, mode_data::line, MAX_MODE_CLASS, mode_data::name, mode_data::ncomponents, mode_data::next_cont, OPTIONAL, mode_data::precision, SET, UNSET, validate_mode(), and void_mode.
Referenced by complete_all_modes().
|
static |
Mode class operations.
References error(), and mode_class_names.
Referenced by make_complex_modes().
|
static |
This file contains the definitions and documentation for the machine modes used in the GNU compiler. Copyright (C) 1987-2025 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
This file defines all the MACHINE MODES used by GCC. A machine mode specifies a size and format of data at the machine level. Each RTL expression has a machine mode. At the syntax tree level, each ..._TYPE and each ..._DECL node has a machine mode which describes data of that type or the data of the variable declared.
This file is included by the genmodes program. Its text is the body of a function. Do not rely on this, it will change in the future. The following statements can be used in this file -- all have the form of a C macro call. In their arguments: A CLASS argument must be one of the constants defined in mode-classes.def, less the leading MODE_ prefix; some statements that take CLASS arguments have restrictions on which classes are acceptable. For instance, INT. A MODE argument must be the printable name of a machine mode, without quotation marks or trailing "mode". For instance, SI. A PRECISION, BYTESIZE, or COUNT argument must be a positive integer constant. A FORMAT argument must be one of the real_mode_format structures declared in real.h, or else a literal 0. Do not put a leading & on the argument. An EXPR argument must be a syntactically valid C expression. If an EXPR contains commas, you may need to write an extra pair of parentheses around it, so it appears to be a single argument to the statement. This file defines only those modes which are of use on almost all machines. Other modes can be defined in the target-specific mode definition file, config/ARCH/ARCH-modes.def. Order matters in this file in so far as statements which refer to other modes must appear after the modes they refer to. However, statements which do not refer to other modes may appear in any order. RANDOM_MODE (MODE); declares MODE to be of class RANDOM. CC_MODE (MODE); declares MODE to be of class CC. INT_MODE (MODE, BYTESIZE); declares MODE to be of class INT and BYTESIZE bytes wide. All of the bits of its representation are significant. FRACTIONAL_INT_MODE (MODE, PRECISION, BYTESIZE); declares MODE to be of class INT, BYTESIZE bytes wide in storage, but with only PRECISION significant bits. FLOAT_MODE (MODE, BYTESIZE, FORMAT); declares MODE to be of class FLOAT and BYTESIZE bytes wide, using floating point format FORMAT. All of the bits of its representation are significant. FRACTIONAL_FLOAT_MODE (MODE, PRECISION, BYTESIZE, FORMAT); declares MODE to be of class FLOAT, BYTESIZE bytes wide in storage, but with only PRECISION significant bits, using floating point format FORMAT. DECIMAL_FLOAT_MODE (MODE, BYTESIZE, FORMAT); declares MODE to be of class DECIMAL_FLOAT and BYTESIZE bytes wide. All of the bits of its representation are significant. FRACTIONAL_DECIMAL_FLOAT_MODE (MODE, BYTESIZE, FORMAT); declares MODE to be of class DECIMAL_FLOAT and BYTESIZE bytes wide. All of the bits of its representation are significant. FRACT_MODE (MODE, BYTESIZE, FBIT); declares MODE to be of class FRACT and BYTESIZE bytes wide with FBIT fractional bits. There may be padding bits. UFRACT_MODE (MODE, BYTESIZE, FBIT); declares MODE to be of class UFRACT and BYTESIZE bytes wide with FBIT fractional bits. There may be padding bits. ACCUM_MODE (MODE, BYTESIZE, IBIT, FBIT); declares MODE to be of class ACCUM and BYTESIZE bytes wide with IBIT integral bits and FBIT fractional bits. There may be padding bits. UACCUM_MODE (MODE, BYTESIZE, IBIT, FBIT); declares MODE to be of class UACCUM and BYTESIZE bytes wide with IBIT integral bits and FBIT fractional bits. There may be padding bits. RESET_FLOAT_FORMAT (MODE, FORMAT); changes the format of MODE, which must be class FLOAT, to FORMAT. Use in an ARCH-modes.def to reset the format of one of the float modes defined in this file. PARTIAL_INT_MODE (MODE, PRECISION, NAME); declares a mode of class PARTIAL_INT with the same size as MODE (which must be an INT mode) and precision PREC. Optionally, NAME is the new name of the mode. NAME is the name of the mode. VECTOR_MODE (CLASS, MODE, COUNT); Declare a vector mode whose component mode is MODE (of class CLASS) with COUNT components. CLASS must be INT or FLOAT. The name of the vector mode takes the form VnX where n is COUNT in decimal and X is MODE. VECTOR_MODES (CLASS, WIDTH); For all modes presently declared in class CLASS, construct corresponding vector modes having width WIDTH. Modes whose byte sizes do not evenly divide WIDTH are ignored, as are modes that would produce vector modes with only one component, and modes smaller than one byte (if CLASS is INT) or smaller than two bytes (if CLASS is FLOAT). CLASS must be INT or FLOAT. The names follow the same rule as VECTOR_MODE uses. VECTOR_MODES_WITH_PREFIX (PREFIX, CLASS, WIDTH, ORDER); Like VECTOR_MODES, but start the mode names with PREFIX instead of the usual "V". ORDER is the top-level sorting order of the mode, with smaller numbers indicating a higher priority. VECTOR_BOOL_MODE (NAME, COUNT, COMPONENT, BYTESIZE) Create a vector mode called NAME that contains COUNT boolean elements and occupies BYTESIZE bytes in total. Each boolean element is of COMPONENT type and occupies (COUNT * BITS_PER_UNIT) / BYTESIZE bits, with the element at index 0 occupying the lsb of the first byte in memory. Only the lowest bit of each element is significant. OPAQUE_MODE (NAME, BYTESIZE) Create an opaque mode called NAME that is BYTESIZE bytes wide. COMPLEX_MODES (CLASS); For all modes presently declared in class CLASS, construct corresponding complex modes. Modes smaller than one byte are ignored. For FLOAT modes, the names are derived by replacing the 'F' in the mode name with a 'C'. (It is an error if there is no 'F'. For INT modes, the names are derived by prefixing a C to the name. ADJUST_BYTESIZE (MODE, EXPR); ADJUST_ALIGNMENT (MODE, EXPR); ADJUST_FLOAT_FORMAT (MODE, EXPR); ADJUST_IBIT (MODE, EXPR); ADJUST_FBIT (MODE, EXPR); Arrange for the byte size, alignment, floating point format, ibit, or fbit of MODE to be adjustable at run time. EXPR will be executed once after processing all command line options, and should evaluate to the desired byte size, alignment, format, ibit or fbit. Unlike a FORMAT argument, if you are adjusting a float format you must put an & in front of the name of each format structure. ADJUST_NUNITS (MODE, EXPR); Like the above, but set the number of nunits of MODE to EXPR. This changes the size and precision of the mode in proportion to the change in the number of units; for example, doubling the number of units doubles the size and precision as well. Note: If a mode is ever made which is more than 255 bytes wide, machmode.h and genmodes.cc will have to be changed to allocate more space for the mode_size and mode_alignment arrays.
VOIDmode is used when no mode needs to be specified, as for example on CONST_INT RTL expressions.
BLKmode is used for structures, arrays, etc. that fit no more specific mode.
Single bit mode used for booleans.
Basic integer modes. We go up to TI in generic code (128 bits). TImode is needed here because the some front ends now genericly support __int128. If the front ends decide to generically support larger types, then corresponding modes must be added here. The name OI is reserved for a 256-bit type (needed by some back ends).
No partial integer modes are defined by default.
The target normally defines any target-specific __intN types and their modes, but __int128 for TImode is fairly common so define it here. The type will not be created unless the target supports TImode.
Basic floating point modes. SF and DF are the only modes provided by default. The names QF, HF, XF, and TF are reserved for targets that need 1-word, 2-word, 80-bit, or 128-bit float types respectively. These are the IEEE mappings. They can be overridden with RESET_FLOAT_FORMAT or at runtime (in TARGET_OPTION_OVERRIDE).
Basic CC modes. FIXME define this only for targets that need it.
Fixed-point modes.
Allow the target to specify additional modes of various kinds.
Complex modes.
Decimal floating point modes.
The symbol Pmode stands for one of the above machine modes (usually SImode). The tm.h file specifies which one. It is not a distinct mode.
References bits_per_unit, max_bitsize_mode_any_int, and max_bitsize_mode_any_mode.
Referenced by main().
|
static |
References mode_data::boolean, MAX_MODE_CLASS, mode_class_names, modes, mode_data::name, mode_data::next, print_closer, print_decl, tagged_printf, and void_mode.
Referenced by emit_insn_modes_c(), and emit_min_insn_modes_c().
|
static |
References emit_class_narrowest_mode(), emit_insn_modes_c_header(), emit_mode_adjustments(), emit_mode_base_align(), emit_mode_class(), emit_mode_complex(), emit_mode_fbit(), emit_mode_ibit(), emit_mode_inner(), emit_mode_int_n(), emit_mode_mask(), emit_mode_name(), emit_mode_nunits(), emit_mode_precision(), emit_mode_size(), emit_mode_unit_precision(), emit_mode_unit_size(), emit_mode_wider(), and emit_real_format_for_mode().
Referenced by main().
|
static |
References EXTRA_MODES_FILE, and HAVE_EXTRA_MODES.
Referenced by emit_insn_modes_c().
|
static |
References adj_alignment, adj_bytesize, adj_fbit, adj_format, adj_ibit, adj_nunits, mode_data::boolean, emit_max_int(), EXTRA_MODES_FILE, mode_data::file, for_all_modes, get_mode_class(), HAVE_EXTRA_MODES, mode_data::int_n, last, mode_data::line, MAX_MODE_CLASS, mode_class_names, modes, mode_data::name, mode_data::next, NUM_POLY_INT_COEFFS, trim_filename(), and void_mode.
Referenced by main().
|
static |
References emit_mode_inner_inline(), emit_mode_nunits_inline(), emit_mode_size_inline(), emit_mode_unit_precision_inline(), emit_mode_unit_size_inline(), EXTRA_MODES_FILE, and HAVE_EXTRA_MODES.
Referenced by main().
|
static |
Compute the max bitsize of some of the classes of integers. It may be that there are needs for the other integer classes, and this code is easy to extend.
References bits_per_unit, mode_data::bytesize, i, max_bitsize_mode_any_int, max_bitsize_mode_any_mode, MAX_MODE_CLASS, and modes.
Referenced by emit_insn_modes_h().
|
static |
References emit_class_narrowest_mode(), emit_min_insn_modes_c_header(), emit_mode_class(), emit_mode_inner(), emit_mode_name(), emit_mode_nunits(), and emit_mode_wider().
Referenced by main().
|
static |
References EXTRA_MODES_FILE, and HAVE_EXTRA_MODES.
Referenced by emit_min_insn_modes_c().
|
static |
References a, adj_alignment, adj_bytesize, adj_fbit, adj_format, adj_ibit, adj_nunits, adj_precision, mode_data::cl, for_all_modes, internal_error(), mode_data::name, mode_data::ncomponents, and mode_data::next_cont.
Referenced by emit_insn_modes_c().
|
static |
References adj_alignment, mode_data::alignment, for_all_modes, mode_data::name, print_closer, print_maybe_const_decl, and tagged_printf.
Referenced by emit_insn_modes_c().
|
static |
References mode_data::cl, for_all_modes, mode_class_names, mode_data::name, print_closer, print_decl, and tagged_printf.
Referenced by emit_insn_modes_c(), and emit_min_insn_modes_c().
|
static |
References mode_data::complex, for_all_modes, mode_data::name, print_closer, print_decl, tagged_printf, and void_mode.
Referenced by emit_insn_modes_c().
|
static |
Emit fbit for all modes.
References adj_fbit, mode_data::fbit, for_all_modes, mode_data::name, print_closer, print_maybe_const_decl, and tagged_printf.
Referenced by emit_insn_modes_c().
|
static |
Emit ibit for all modes.
References adj_ibit, for_all_modes, mode_data::ibit, mode_data::name, print_closer, print_maybe_const_decl, and tagged_printf.
Referenced by emit_insn_modes_c().
|
static |
References mode_data::component, for_all_modes, mode_data::name, print_closer, print_decl, and tagged_printf.
Referenced by emit_insn_modes_c(), and emit_min_insn_modes_c().
|
static |
Emit mode_inner_inline routine into insn-modes.h header.
References mode_data::component, for_all_modes, and mode_data::name.
Referenced by emit_insn_modes_inline_h().
|
static |
Emit __intN for all modes.
References for_all_modes, i, mode_data::int_n, int_n, n_modes, mode_data::name, print_closer, print_decl, and tagged_printf.
Referenced by emit_insn_modes_c().
|
static |
References adj_nunits, mode_data::bytesize, for_all_modes, mode_data::name, mode_data::precision, print_closer, print_maybe_const_decl, and tagged_printf.
Referenced by emit_insn_modes_c().
|
static |
References for_all_modes, mode_data::name, print_closer, and print_decl.
Referenced by emit_insn_modes_c(), and emit_min_insn_modes_c().
|
static |
References adj_nunits, for_all_modes, mode_data::name, mode_data::ncomponents, print_closer, print_maybe_const_decl, tagged_printf, and ZERO_COEFFS.
Referenced by emit_insn_modes_c(), and emit_min_insn_modes_c().
|
static |
Emit mode_nunits_inline routine into insn-modes.h header.
References a, adj_nunits, for_all_modes, mode_data::name, mode_data::ncomponents, and mode_data::need_nunits_adj.
Referenced by emit_insn_modes_inline_h().
|
static |
References adj_nunits, mode_data::bytesize, for_all_modes, mode_data::name, mode_data::precision, print_closer, print_maybe_const_decl, tagged_printf, and ZERO_COEFFS.
Referenced by emit_insn_modes_c().
|
static |
References adj_bytesize, adj_nunits, mode_data::bytesize, for_all_modes, mode_data::name, print_closer, print_maybe_const_decl, tagged_printf, and ZERO_COEFFS.
Referenced by emit_insn_modes_c().
|
static |
Emit mode_size_inline routine into insn-modes.h header.
References a, adj_bytesize, adj_nunits, mode_data::bytesize, for_all_modes, mode_data::name, mode_data::need_bytesize_adj, and mode_data::next_cont.
Referenced by emit_insn_modes_inline_h().
|
static |
Emit mode_unit_precision array into insn-modes.cc file.
References mode_data::bytesize, mode_data::component, for_all_modes, mode_data::name, mode_data::precision, print_closer, print_decl, and tagged_printf.
Referenced by emit_insn_modes_c().
|
static |
Emit mode_unit_precision_inline routine into insn-modes.h header.
References mode_data::bytesize, mode_data::component, for_all_modes, mode_data::name, and mode_data::precision.
Referenced by emit_insn_modes_inline_h().
|
static |
Emit mode_unit_size array into insn-modes.cc file.
References adj_bytesize, mode_data::bytesize, mode_data::component, for_all_modes, mode_data::name, print_closer, print_maybe_const_decl, and tagged_printf.
Referenced by emit_insn_modes_c().
|
static |
Emit mode_unit_size_inline routine into insn-modes.h header.
References mode_data::bytesize, mode_data::component, for_all_modes, mode_data::name, and mode_data::need_bytesize_adj.
Referenced by emit_insn_modes_inline_h().
|
static |
References mode_data::bytesize, mode_data::cl, mode_data::component, for_all_modes, mode_data::name, mode_data::ncomponents, mode_data::precision, print_closer, print_decl, tagged_printf, void_mode, and mode_data::wider.
Referenced by emit_insn_modes_c(), and emit_min_insn_modes_c().
|
static |
References mode_data::format, modes, mode_data::name, mode_data::next, print_closer, print_decl, print_maybe_const_decl, and tagged_printf.
Referenced by emit_insn_modes_c().
|
static |
|
inlinestatic |
Utility routines.
References modes_by_name, and mode_data::name.
Referenced by initialize_iterators(), make_int_n(), make_partial_integer_mode(), make_vector_bool_mode(), make_vector_mode(), new_adjust(), new_mode(), and reset_float_format().
|
static |
Return the best machine mode class for MODE, or null if machine_mode should be used.
References mode_data::cl, and NULL.
Referenced by emit_insn_modes_h().
|
static |
References mode_data::name.
Referenced by main().
int main | ( | int | argc, |
char ** | argv ) |
Master control.
References calc_wider_mode(), complete_all_modes(), create_modes(), emit_insn_modes_c(), emit_insn_modes_h(), emit_insn_modes_inline_h(), emit_min_insn_modes_c(), eq_mode(), error(), FATAL_EXIT_CODE, free(), gen_header, hash_mode(), have_error, modes_by_name, progname, and SUCCESS_EXIT_CODE.
|
static |
References mode_data::boolean, mode_data::bytesize, mode_data::file, mode_data::line, mode_data::name, new_mode(), and mode_data::precision.
|
static |
|
static |
References mode_data::bytesize, mode_data::file, mode_data::format, mode_data::line, mode_data::name, new_mode(), and mode_data::precision.
|
static |
Create a fixed-point mode by setting CL, NAME, BYTESIZE, IBIT, FBIT, FILE, and LINE.
References mode_data::bytesize, mode_data::cl, mode_data::fbit, mode_data::file, mode_data::ibit, mode_data::line, mode_data::name, and new_mode().
|
static |
References mode_data::bytesize, mode_data::file, mode_data::format, mode_data::line, mode_data::name, new_mode(), and mode_data::precision.
|
static |
References mode_data::bytesize, mode_data::file, mode_data::line, mode_data::name, new_mode(), and mode_data::precision.
|
static |
References error(), mode_data::file, find_mode(), and mode_data::line.
|
static |
References mode_data::bytesize, mode_data::file, mode_data::line, mode_data::name, new_mode(), and mode_data::precision.
|
static |
References mode_data::component, error(), mode_data::file, find_mode(), mode_data::line, mode_data::name, new_mode(), and mode_data::precision.
|
static |
References mode_data::cl, mode_data::file, mode_data::line, mode_data::name, and new_mode().
|
static |
|
static |
|
static |
|
static |
References a, mode_adjust::adjustment, mode_data::cl, error(), mode_adjust::file, find_mode(), mode_adjust::line, mode_adjust::mode, mode_class_names, mode_data::name, and trim_filename().
Referenced by try_apply_stack_adjustment().
|
static |
References blank_mode, mode_data::cl, count, mode_data::counter, error(), mode_data::file, find_mode(), mode_data::line, modes, modes_by_name, n_modes, mode_data::name, mode_data::next, and trim_filename().
Referenced by can_eliminate_compare(), can_open_code_p(), cse_insn(), emit_move_change_mode(), expand_absneg_bit(), extract_bit_field_1(), extract_fixed_bit_field_1(), find_shift_sequence(), make_bool_mode(), make_complex_modes(), make_decimal_float_mode(), make_field_assignment(), make_fixed_point_mode(), make_float_mode(), make_int_mode(), make_opaque_mode(), make_partial_integer_mode(), make_special_mode(), make_vector_bool_mode(), make_vector_mode(), make_vector_modes(), maybe_mode_change(), maybe_select_cc_mode(), mode_change_ok(), reload_adjust_reg_for_icode(), reload_adjust_reg_for_temp(), signed_or_unsigned_type_for(), simplify_while_replacing(), try_combine(), update_reg_equal_equiv_notes(), vect_double_mask_nunits(), and vect_halve_mask_nunits().
|
static |
References mode_data::cl, error(), mode_data::file, find_mode(), mode_data::format, mode_data::line, and mode_data::name.
|
static |
References validate_field.
Referenced by complete_mode().
|
static |
References error(), and mode_class_names.
Referenced by make_vector_mode(), and make_vector_modes().
|
static |
Referenced by emit_insn_modes_h(), emit_mode_adjustments(), and emit_mode_base_align().
|
static |
Referenced by emit_insn_modes_h(), emit_mode_adjustments(), emit_mode_size(), emit_mode_size_inline(), and emit_mode_unit_size().
|
static |
Referenced by emit_insn_modes_h(), emit_mode_adjustments(), and emit_mode_fbit().
|
static |
Referenced by emit_insn_modes_h(), and emit_mode_adjustments().
|
static |
Referenced by emit_insn_modes_h(), emit_mode_adjustments(), and emit_mode_ibit().
|
static |
|
static |
Referenced by emit_mode_adjustments().
|
static |
Referenced by create_modes(), and emit_max_int().
|
static |
Referenced by new_mode().
|
static |
Referenced by create_modes(), and emit_max_int().
|
static |
Referenced by create_modes(), and emit_max_int().
|
static |
Referenced by complex_class(), emit_class_narrowest_mode(), emit_insn_modes_h(), emit_mode_class(), make_vector_mode(), new_adjust(), and vector_class().
|
static |
Referenced by build_split_load(), calc_wider_mode(), cse_cc_succs(), decode_asm_operands(), emit_class_narrowest_mode(), emit_insn_modes_h(), emit_max_int(), emit_real_format_for_mode(), initialize_iterators(), make_complex_modes(), make_vector_modes(), new_mode(), omp_clause_aligned_alignment(), omp_max_vf(), rtx_reader::read_rtx_code(), record_operand_costs(), record_reg_classes(), and rtx_reader::rtx_alloc_for_name().
|
static |
Referenced by find_mode(), main(), and new_mode().
|
static |
Referenced by calc_wider_mode(), emit_mode_int_n(), and new_mode().
|
static |
Referenced by calc_wider_mode(), complete_mode(), emit_class_narrowest_mode(), emit_insn_modes_h(), emit_mode_complex(), and emit_mode_wider().