GCC Middle and Back End API Reference
genmodes.cc File Reference
#include "bconfig.h"
#include "system.h"
#include "errors.h"
#include "mode-classes.def"
#include "machmode.def"
Include dependency graph for genmodes.cc:

Data Structures

struct  mode_data
 
struct  mode_adjust
 

Macros

#define DEF_MODE_CLASS(M)   M
 
#define DEF_MODE_CLASS(M)   #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)    validate_field_(M->name, #F, r_##F, M->F, blank_mode.F, M->file, M->line)
 
#define COMPLEX_MODES(C)   make_complex_modes (MODE_##C, __FILE__, __LINE__)
 
#define VECTOR_MODES_WITH_PREFIX(PREFIX, C, W, ORDER)    make_vector_modes (MODE_##C, #PREFIX, W, ORDER, __FILE__, __LINE__)
 
#define VECTOR_MODES(C, W)   VECTOR_MODES_WITH_PREFIX (V, C, W, 0)
 
#define VECTOR_BOOL_MODE(NAME, COUNT, COMPONENT, BYTESIZE)
 
#define _SPECIAL_MODE(C, N)    make_special_mode (MODE_##C, #N, __FILE__, __LINE__)
 
#define RANDOM_MODE(N)   _SPECIAL_MODE (RANDOM, N)
 
#define CC_MODE(N)   _SPECIAL_MODE (CC, N)
 
#define INT_MODE(N, Y)   FRACTIONAL_INT_MODE (N, -1U, Y)
 
#define FRACTIONAL_INT_MODE(N, B, Y)    make_int_mode (#N, B, Y, __FILE__, __LINE__)
 
#define BOOL_MODE(N, B, Y)    make_bool_mode (#N, B, Y, __FILE__, __LINE__)
 
#define OPAQUE_MODE(N, B)    make_opaque_mode (#N, -1U, B, __FILE__, __LINE__)
 
#define FRACT_MODE(N, Y, F)    make_fixed_point_mode (MODE_FRACT, #N, Y, 0, F, __FILE__, __LINE__)
 
#define UFRACT_MODE(N, Y, F)    make_fixed_point_mode (MODE_UFRACT, #N, Y, 0, F, __FILE__, __LINE__)
 
#define ACCUM_MODE(N, Y, I, F)    make_fixed_point_mode (MODE_ACCUM, #N, Y, I, F, __FILE__, __LINE__)
 
#define UACCUM_MODE(N, Y, I, F)    make_fixed_point_mode (MODE_UACCUM, #N, Y, I, F, __FILE__, __LINE__)
 
#define FLOAT_MODE(N, Y, F)   FRACTIONAL_FLOAT_MODE (N, -1U, Y, F)
 
#define FRACTIONAL_FLOAT_MODE(N, B, Y, F)    make_float_mode (#N, B, Y, #F, __FILE__, __LINE__)
 
#define DECIMAL_FLOAT_MODE(N, Y, F)    FRACTIONAL_DECIMAL_FLOAT_MODE (N, -1U, Y, F)
 
#define FRACTIONAL_DECIMAL_FLOAT_MODE(N, B, Y, F)    make_decimal_float_mode (#N, B, Y, #F, __FILE__, __LINE__)
 
#define RESET_FLOAT_FORMAT(N, F)    reset_float_format (#N, #F, __FILE__, __LINE__)
 
#define INT_N(M, PREC)    make_int_n (#M, PREC, __FILE__, __LINE__)
 
#define PARTIAL_INT_MODE(M, PREC, NAME)    make_partial_integer_mode (#M, #NAME, PREC, __FILE__, __LINE__)
 
#define VECTOR_MODE_WITH_PREFIX(PREFIX, C, M, N, ORDER)    make_vector_mode (MODE_##C, #PREFIX, #M, N, ORDER, __FILE__, __LINE__);
 
#define VECTOR_MODE(C, M, N)   VECTOR_MODE_WITH_PREFIX(V, C, M, N, 0);
 
#define _ADD_ADJUST(A, M, X, C1, C2)    new_adjust (#M, &adj_##A, #A, #X, MODE_##C1, MODE_##C2, __FILE__, __LINE__)
 
#define ADJUST_NUNITS(M, X)   _ADD_ADJUST (nunits, M, X, RANDOM, RANDOM)
 
#define ADJUST_BYTESIZE(M, X)   _ADD_ADJUST (bytesize, M, X, RANDOM, RANDOM)
 
#define ADJUST_ALIGNMENT(M, X)   _ADD_ADJUST (alignment, M, X, RANDOM, RANDOM)
 
#define ADJUST_PRECISION(M, X)   _ADD_ADJUST (precision, M, X, RANDOM, RANDOM)
 
#define ADJUST_FLOAT_FORMAT(M, X)   _ADD_ADJUST (format, M, X, FLOAT, FLOAT)
 
#define ADJUST_IBIT(M, X)   _ADD_ADJUST (ibit, M, X, ACCUM, UACCUM)
 
#define ADJUST_FBIT(M, X)   _ADD_ADJUST (fbit, M, X, FRACT, UACCUM)
 
#define NUM_POLY_INT_COEFFS   1
 
#define ZERO_COEFFS   ""
 
#define tagged_printf(FMT, ARG, TAG)
 
#define print_decl(TYPE, NAME, ASIZE)    puts ("\nconst " TYPE " " NAME "[" ASIZE "] =\n{");
 
#define print_maybe_const_decl(TYPE, NAME, ASIZE, NEEDS_ADJ)
 
#define print_closer()   puts ("};")
 

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_datafind_mode (const char *name)
 
static struct mode_datanew_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 charget_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_datamodes [MAX_MODE_CLASS]
 
static unsigned int n_modes [MAX_MODE_CLASS]
 
static struct mode_datavoid_mode
 
static const struct mode_data blank_mode
 
static htab_t modes_by_name
 
static struct mode_adjustadj_nunits
 
static struct mode_adjustadj_bytesize
 
static struct mode_adjustadj_alignment
 
static struct mode_adjustadj_format
 
static struct mode_adjustadj_ibit
 
static struct mode_adjustadj_fbit
 
static struct mode_adjustadj_precision
 
static int bits_per_unit
 
static int max_bitsize_mode_any_int
 
static int max_bitsize_mode_any_mode
 

Macro Definition Documentation

◆ _ADD_ADJUST

#define _ADD_ADJUST ( A,
M,
X,
C1,
C2 )    new_adjust (#M, &adj_##A, #A, #X, MODE_##C1, MODE_##C2, __FILE__, __LINE__)
Adjustability.   

◆ _SPECIAL_MODE

#define _SPECIAL_MODE ( C,
N )    make_special_mode (MODE_##C, #N, __FILE__, __LINE__)
Input.   

◆ ACCUM_MODE

#define ACCUM_MODE ( N,
Y,
I,
F )    make_fixed_point_mode (MODE_ACCUM, #N, Y, I, F, __FILE__, __LINE__)

◆ ADJUST_ALIGNMENT

#define ADJUST_ALIGNMENT ( M,
X )   _ADD_ADJUST (alignment, M, X, RANDOM, RANDOM)

◆ ADJUST_BYTESIZE

#define ADJUST_BYTESIZE ( M,
X )   _ADD_ADJUST (bytesize, M, X, RANDOM, RANDOM)

◆ ADJUST_FBIT

#define ADJUST_FBIT ( M,
X )   _ADD_ADJUST (fbit, M, X, FRACT, UACCUM)

◆ ADJUST_FLOAT_FORMAT

#define ADJUST_FLOAT_FORMAT ( M,
X )   _ADD_ADJUST (format, M, X, FLOAT, FLOAT)

◆ ADJUST_IBIT

#define ADJUST_IBIT ( M,
X )   _ADD_ADJUST (ibit, M, X, ACCUM, UACCUM)

◆ ADJUST_NUNITS

#define ADJUST_NUNITS ( M,
X )   _ADD_ADJUST (nunits, M, X, RANDOM, RANDOM)

◆ ADJUST_PRECISION

#define ADJUST_PRECISION ( M,
X )   _ADD_ADJUST (precision, M, X, RANDOM, RANDOM)

◆ BOOL_MODE

#define BOOL_MODE ( N,
B,
Y )    make_bool_mode (#N, B, Y, __FILE__, __LINE__)

◆ CC_MODE

#define CC_MODE ( N)    _SPECIAL_MODE (CC, N)

◆ COMPLEX_MODES

#define COMPLEX_MODES ( C)    make_complex_modes (MODE_##C, __FILE__, __LINE__)
For each mode in class CLASS, construct a corresponding complex mode.   

◆ DECIMAL_FLOAT_MODE

#define DECIMAL_FLOAT_MODE ( N,
Y,
F )    FRACTIONAL_DECIMAL_FLOAT_MODE (N, -1U, Y, F)

◆ DEF_MODE_CLASS [1/2]

#define DEF_MODE_CLASS ( M)    M
Generate the machine mode enumeration and associated tables.
   Copyright (C) 2003-2024 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.   

◆ DEF_MODE_CLASS [2/2]

#define DEF_MODE_CLASS ( M)    #M
Generate the machine mode enumeration and associated tables.
   Copyright (C) 2003-2024 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.   

◆ EXTRA_MODES_FILE

◆ FLOAT_MODE

#define FLOAT_MODE ( N,
Y,
F )   FRACTIONAL_FLOAT_MODE (N, -1U, Y, F)

◆ for_all_modes

◆ FRACT_MODE

#define FRACT_MODE ( N,
Y,
F )    make_fixed_point_mode (MODE_FRACT, #N, Y, 0, F, __FILE__, __LINE__)

◆ FRACTIONAL_DECIMAL_FLOAT_MODE

#define FRACTIONAL_DECIMAL_FLOAT_MODE ( N,
B,
Y,
F )    make_decimal_float_mode (#N, B, Y, #F, __FILE__, __LINE__)

◆ FRACTIONAL_FLOAT_MODE

#define FRACTIONAL_FLOAT_MODE ( N,
B,
Y,
F )    make_float_mode (#N, B, Y, #F, __FILE__, __LINE__)

◆ FRACTIONAL_INT_MODE

#define FRACTIONAL_INT_MODE ( N,
B,
Y )    make_int_mode (#N, B, Y, __FILE__, __LINE__)

◆ HAVE_EXTRA_MODES

◆ INT_MODE

#define INT_MODE ( N,
Y )   FRACTIONAL_INT_MODE (N, -1U, Y)

◆ INT_N

#define INT_N ( M,
PREC )    make_int_n (#M, PREC, __FILE__, __LINE__)
__intN support.   

◆ NUM_POLY_INT_COEFFS

◆ OPAQUE_MODE

#define OPAQUE_MODE ( N,
B )    make_opaque_mode (#N, -1U, B, __FILE__, __LINE__)

◆ PARTIAL_INT_MODE

#define PARTIAL_INT_MODE ( M,
PREC,
NAME )    make_partial_integer_mode (#M, #NAME, PREC, __FILE__, __LINE__)
Partial integer modes are specified by relation to a full integer
mode.   

◆ print_closer

◆ print_decl

◆ print_maybe_const_decl

#define print_maybe_const_decl ( TYPE,
NAME,
ASIZE,
NEEDS_ADJ )

◆ RANDOM_MODE

#define RANDOM_MODE ( N)    _SPECIAL_MODE (RANDOM, N)

◆ RESET_FLOAT_FORMAT

#define RESET_FLOAT_FORMAT ( N,
F )    reset_float_format (#N, #F, __FILE__, __LINE__)

◆ tagged_printf

◆ UACCUM_MODE

#define UACCUM_MODE ( N,
Y,
I,
F )    make_fixed_point_mode (MODE_UACCUM, #N, Y, I, F, __FILE__, __LINE__)

◆ UFRACT_MODE

#define UFRACT_MODE ( N,
Y,
F )    make_fixed_point_mode (MODE_UFRACT, #N, Y, 0, F, __FILE__, __LINE__)

◆ validate_field

#define validate_field ( M,
F )    validate_field_(M->name, #F, r_##F, M->F, blank_mode.F, M->file, M->line)

Referenced by validate_mode().

◆ validate_field_

#define validate_field_ ( mname,
fname,
req,
val,
unset,
file,
line )
Value:
do { \
{ \
case SET: \
if (val == unset) \
error ("%s:%d: (%s) field %s must be set", \
file, line, mname, fname); \
break; \
case UNSET: \
if (val != unset) \
error ("%s:%d: (%s) field %s must not be set", \
file, line, mname, fname); \
case OPTIONAL: \
break; \
} \
} while (0)
@ OPTIONAL
Definition genmodes.cc:264
@ SET
Definition genmodes.cc:264
@ UNSET
Definition genmodes.cc:264

◆ VECTOR_BOOL_MODE

#define VECTOR_BOOL_MODE ( NAME,
COUNT,
COMPONENT,
BYTESIZE )
Value:
static void make_vector_bool_mode(const char *name, unsigned int count, const char *component, unsigned int bytesize, const char *file, unsigned int line)
Definition genmodes.cc:558
Create a vector of booleans called NAME with COUNT elements and
BYTESIZE bytes in total.   

◆ VECTOR_MODE

#define VECTOR_MODE ( C,
M,
N )   VECTOR_MODE_WITH_PREFIX(V, C, M, N, 0);

◆ VECTOR_MODE_WITH_PREFIX

#define VECTOR_MODE_WITH_PREFIX ( PREFIX,
C,
M,
N,
ORDER )    make_vector_mode (MODE_##C, #PREFIX, #M, N, ORDER, __FILE__, __LINE__);
A single vector mode can be specified by naming its component
mode and the number of components.   

◆ VECTOR_MODES

#define VECTOR_MODES ( C,
W )   VECTOR_MODES_WITH_PREFIX (V, C, W, 0)

◆ VECTOR_MODES_WITH_PREFIX

#define VECTOR_MODES_WITH_PREFIX ( PREFIX,
C,
W,
ORDER )    make_vector_modes (MODE_##C, #PREFIX, W, ORDER, __FILE__, __LINE__)
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.   

◆ ZERO_COEFFS

#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().

Enumeration Type Documentation

◆ mode_class

Enumerator
MODE_CLASSES 
MAX_MODE_CLASS 

◆ requirement

Diagnose failure to meet expectations in a partially filled out
mode structure.   
Enumerator
SET 
UNSET 
OPTIONAL 

Function Documentation

◆ calc_wider_mode()

static void calc_wider_mode ( void )
static

◆ cmp_modes()

static int cmp_modes ( const void * a,
const void * b )
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().

◆ complete_all_modes()

static void complete_all_modes ( void )
static

References mode_data::cl, complete_mode(), and for_all_modes.

Referenced by main().

◆ complete_mode()

static void complete_mode ( struct mode_data * m)
static

◆ complex_class()

static enum mode_class complex_class ( enum mode_class c)
static
Mode class operations.   

References error(), ggc_alloc(), and mode_class_names.

Referenced by make_complex_modes().

◆ create_modes()

static void create_modes ( void )
static

◆ emit_class_narrowest_mode()

◆ emit_insn_modes_c()

◆ emit_insn_modes_c_header()

static void emit_insn_modes_c_header ( void )
static

◆ emit_insn_modes_h()

◆ emit_insn_modes_inline_h()

◆ emit_max_int()

static void emit_max_int ( void )
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, ggc_alloc(), i, max_bitsize_mode_any_int, max_bitsize_mode_any_mode, MAX_MODE_CLASS, modes, and mode_data::next.

Referenced by emit_insn_modes_h().

◆ emit_min_insn_modes_c()

◆ emit_min_insn_modes_c_header()

static void emit_min_insn_modes_c_header ( void )
static

◆ emit_mode_adjustments()

◆ emit_mode_base_align()

◆ emit_mode_class()

◆ emit_mode_complex()

◆ emit_mode_fbit()

static void emit_mode_fbit ( void )
static

◆ emit_mode_ibit()

static void emit_mode_ibit ( void )
static

◆ emit_mode_inner()

◆ emit_mode_inner_inline()

static void emit_mode_inner_inline ( void )
static
Emit mode_inner_inline routine into insn-modes.h header.   

References mode_data::component, for_all_modes, ggc_alloc(), and mode_data::name.

Referenced by emit_insn_modes_inline_h().

◆ emit_mode_int_n()

static void emit_mode_int_n ( void )
static

◆ emit_mode_mask()

◆ emit_mode_name()

◆ emit_mode_nunits()

◆ emit_mode_nunits_inline()

static void emit_mode_nunits_inline ( void )
static
Emit mode_nunits_inline routine into insn-modes.h header.   

References a, adj_nunits, for_all_modes, ggc_alloc(), mode_data::name, mode_data::ncomponents, mode_data::need_nunits_adj, and mode_adjust::next.

Referenced by emit_insn_modes_inline_h().

◆ emit_mode_precision()

◆ emit_mode_size()

◆ emit_mode_size_inline()

static void emit_mode_size_inline ( void )
static

◆ emit_mode_unit_precision()

static void emit_mode_unit_precision ( void )
static
Emit mode_unit_precision array into insn-modes.cc file.   

References mode_data::bytesize, mode_data::component, for_all_modes, ggc_alloc(), mode_data::name, mode_data::precision, print_closer, print_decl, and tagged_printf.

Referenced by emit_insn_modes_c().

◆ emit_mode_unit_precision_inline()

static void emit_mode_unit_precision_inline ( void )
static
Emit mode_unit_precision_inline routine into insn-modes.h header.   

References mode_data::bytesize, mode_data::component, for_all_modes, ggc_alloc(), mode_data::name, and mode_data::precision.

Referenced by emit_insn_modes_inline_h().

◆ emit_mode_unit_size()

static void emit_mode_unit_size ( void )
static

◆ emit_mode_unit_size_inline()

static void emit_mode_unit_size_inline ( void )
static
Emit mode_unit_size_inline routine into insn-modes.h header.   

References mode_data::bytesize, mode_data::component, for_all_modes, ggc_alloc(), mode_data::name, and mode_data::need_bytesize_adj.

Referenced by emit_insn_modes_inline_h().

◆ emit_mode_wider()

◆ emit_real_format_for_mode()

◆ eq_mode()

static int eq_mode ( const void * p,
const void * q )
static

References a, b, and ggc_alloc().

Referenced by main().

◆ find_mode()

◆ get_mode_class()

static const char * get_mode_class ( struct mode_data * mode)
static
Return the best machine mode class for MODE, or null if machine_mode
should be used.   

References mode_data::cl, ggc_alloc(), and NULL.

Referenced by emit_insn_modes_h().

◆ hash_mode()

static hashval_t hash_mode ( const void * p)
static

References ggc_alloc(), and mode_data::name.

Referenced by main().

◆ main()

◆ make_bool_mode()

static void make_bool_mode ( const char * name,
unsigned int precision,
unsigned int bytesize,
const char * file,
unsigned int line )
static

◆ make_complex_modes()

◆ make_decimal_float_mode()

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

◆ make_fixed_point_mode()

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
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().

◆ make_float_mode()

static void make_float_mode ( const char * name,
unsigned int precision,
unsigned int bytesize,
const char * format,
const char * file,
unsigned int line )
static

◆ make_int_mode()

static void make_int_mode ( const char * name,
unsigned int precision,
unsigned int bytesize,
const char * file,
unsigned int line )
static

◆ make_int_n()

static void make_int_n ( const char * m,
int bitsize,
const char * file,
unsigned int line )
static

◆ make_opaque_mode()

static void make_opaque_mode ( const char * name,
unsigned int precision,
unsigned int bytesize,
const char * file,
unsigned int line )
static

◆ make_partial_integer_mode()

static void make_partial_integer_mode ( const char * base,
const char * name,
unsigned int precision,
const char * file,
unsigned int line )
static

◆ make_special_mode()

static void make_special_mode ( enum mode_class cl,
const char * name,
const char * file,
unsigned int line )
static

◆ make_vector_bool_mode()

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

◆ make_vector_mode()

◆ make_vector_modes()

◆ new_adjust()

◆ new_mode()

◆ reset_float_format()

static void reset_float_format ( const char * name,
const char * format,
const char * file,
unsigned int line )
static

◆ validate_mode()

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

References validate_field.

Referenced by complete_mode().

◆ vector_class()

static enum mode_class vector_class ( enum mode_class cl)
static

Variable Documentation

◆ adj_alignment

◆ adj_bytesize

◆ adj_fbit

◆ adj_format

struct mode_adjust* adj_format
static

◆ adj_ibit

◆ adj_nunits

◆ adj_precision

struct mode_adjust* adj_precision
static

Referenced by emit_mode_adjustments().

◆ bits_per_unit

int bits_per_unit
static

Referenced by create_modes(), and emit_max_int().

◆ blank_mode

const struct mode_data blank_mode
static
Initial value:
= {
0, "<unknown>", MAX_MODE_CLASS,
0, -1U, -1U, -1U, -1U,
0, 0, 0, 0, 0, 0,
"<unknown>", 0, 0, 0, 0, false, false, 0,
false
}

Referenced by new_mode().

◆ max_bitsize_mode_any_int

int max_bitsize_mode_any_int
static

Referenced by create_modes(), and emit_max_int().

◆ max_bitsize_mode_any_mode

int max_bitsize_mode_any_mode
static

Referenced by create_modes(), and emit_max_int().

◆ mode_class_names

const char* const mode_class_names[MAX_MODE_CLASS]
static

◆ modes

◆ modes_by_name

htab_t modes_by_name
static

Referenced by find_mode(), main(), and new_mode().

◆ n_modes

unsigned int n_modes[MAX_MODE_CLASS]
static

◆ void_mode