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

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(C, W)   make_vector_modes (MODE_##C, W, __FILE__, __LINE__)
#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 POINTER_BOUNDS_MODE(N, Y)   make_pointer_bounds_mode (#N, Y, __FILE__, __LINE__)
#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 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 PARTIAL_INT_MODE(M, PREC, NAME)   make_partial_integer_mode (#M, #NAME, PREC, __FILE__, __LINE__)
#define VECTOR_MODE(C, M, N)   make_vector_mode (MODE_##C, #M, N, __FILE__, __LINE__);
#define _ADD_ADJUST(A, M, X, C1, C2)   new_adjust (#M, &adj_##A, #A, #X, MODE_##C1, MODE_##C2, __FILE__, __LINE__)
#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_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 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, CATEGORY)
#define print_closer()   puts ("};")

Enumerations

enum  mode_class { MODE_CLASSES, MAX_MODE_CLASS, MODE_CLASSES, MAX_MODE_CLASS }
enum  requirement { SET, UNSET, OPTIONAL }

Functions

static enum mode_class complex_class ()
static enum mode_class vector_class ()
static struct mode_datafind_mode ()
static struct mode_datanew_mode (enum mode_class cl, const char *name, const char *file, unsigned int line)
static hashval_t hash_mode ()
static int eq_mode ()
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 ()
static void complete_all_modes ()
static void make_complex_modes (enum mode_class cl, const char *file, unsigned int line)
static void make_vector_modes (enum mode_class cl, unsigned int width, 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_pointer_bounds_mode (const char *name, unsigned int bytesize, 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_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_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 *base, unsigned int ncomponents, const char *file, unsigned int line)
static void create_modes ()
static int cmp_modes ()
static void calc_wider_mode ()
static void emit_max_int ()
static void emit_insn_modes_h ()
static void emit_insn_modes_c_header ()
static void emit_min_insn_modes_c_header ()
static void emit_mode_name ()
static void emit_mode_class ()
static void emit_mode_precision ()
static void emit_mode_size ()
static void emit_mode_nunits ()
static void emit_mode_wider ()
static void emit_mode_mask ()
static void emit_mode_inner ()
static void emit_mode_base_align ()
static void emit_class_narrowest_mode ()
static void emit_real_format_for_mode ()
static void emit_mode_adjustments ()
static void emit_mode_ibit ()
static void emit_mode_fbit ()
static void emit_insn_modes_c ()
static void emit_min_insn_modes_c ()
int main ()

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 struct mode_data blank_mode
static htab_t modes_by_name
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

Macro Definition Documentation

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

Adjustability.

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

Input.

#define ACCUM_MODE (   N,
  Y,
  I,
 
)    make_fixed_point_mode (MODE_ACCUM, #N, Y, I, F, __FILE__, __LINE__)
#define ADJUST_ALIGNMENT (   M,
 
)    _ADD_ADJUST (alignment, M, X, RANDOM, RANDOM)
#define ADJUST_BYTESIZE (   M,
 
)    _ADD_ADJUST (bytesize, M, X, RANDOM, RANDOM)
#define ADJUST_FBIT (   M,
 
)    _ADD_ADJUST (fbit, M, X, FRACT, UACCUM)
#define ADJUST_FLOAT_FORMAT (   M,
 
)    _ADD_ADJUST (format, M, X, FLOAT, FLOAT)
#define ADJUST_IBIT (   M,
 
)    _ADD_ADJUST (ibit, M, X, ACCUM, UACCUM)
#define CC_MODE (   N)    _SPECIAL_MODE (CC, N)
#define COMPLEX_MODES (   C)    make_complex_modes (MODE_##C, __FILE__, __LINE__)

For each mode in class CLASS, construct a corresponding complex mode.

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

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

Generate the machine mode enumeration and associated tables. Copyright (C) 2003-2013 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 FLOAT_MODE (   N,
  Y,
 
)    FRACTIONAL_FLOAT_MODE (N, -1U, Y, F)
#define for_all_modes (   C,
 
)
Value:
for (C = 0; C < MAX_MODE_CLASS; C++) \
for (M = modes[C]; M; M = M->next)

Referenced by emit_min_insn_modes_c_header(), emit_mode_mask(), and emit_mode_precision().

#define FRACT_MODE (   N,
  Y,
 
)    make_fixed_point_mode (MODE_FRACT, #N, Y, 0, F, __FILE__, __LINE__)
#define FRACTIONAL_DECIMAL_FLOAT_MODE (   N,
  B,
  Y,
 
)    make_decimal_float_mode (#N, B, Y, #F, __FILE__, __LINE__)
#define FRACTIONAL_FLOAT_MODE (   N,
  B,
  Y,
 
)    make_float_mode (#N, B, Y, #F, __FILE__, __LINE__)
#define FRACTIONAL_INT_MODE (   N,
  B,
  Y 
)    make_int_mode (#N, B, Y, __FILE__, __LINE__)
#define HAVE_EXTRA_MODES   0
#define INT_MODE (   N,
  Y 
)    FRACTIONAL_INT_MODE (N, -1U, Y)
#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.

#define POINTER_BOUNDS_MODE (   N,
  Y 
)    make_pointer_bounds_mode (#N, Y, __FILE__, __LINE__)
#define print_closer ( )    puts ("};")

Referenced by emit_mode_mask().

#define print_decl (   TYPE,
  NAME,
  ASIZE 
)    puts ("\nconst " TYPE " " NAME "[" ASIZE "] =\n{");
#define print_maybe_const_decl (   TYPE,
  NAME,
  ASIZE,
  CATEGORY 
)
Value:
printf ("\n" TYPE " " NAME "[" ASIZE "] = \n{\n", \
adj_##CATEGORY ? "" : "const ")

Referenced by emit_mode_mask().

#define RANDOM_MODE (   N)    _SPECIAL_MODE (RANDOM, N)
#define RESET_FLOAT_FORMAT (   N,
 
)    reset_float_format (#N, #F, __FILE__, __LINE__)
#define tagged_printf (   FMT,
  ARG,
  TAG 
)
Value:
do { \
int count_ = printf (" " FMT ",", ARG); \
printf ("%*s/* %s */\n", 27 - count_, "", TAG); \
} while (0)

Output routines.

Referenced by emit_min_insn_modes_c_header(), emit_mode_mask(), and emit_mode_precision().

#define UACCUM_MODE (   N,
  Y,
  I,
 
)    make_fixed_point_mode (MODE_UACCUM, #N, Y, I, F, __FILE__, __LINE__)
#define UFRACT_MODE (   N,
  Y,
 
)    make_fixed_point_mode (MODE_UFRACT, #N, Y, 0, F, __FILE__, __LINE__)
#define validate_field (   M,
 
)    validate_field_(M->name, #F, r_##F, M->F, blank_mode.F, M->file, M->line)
#define validate_field_ (   mname,
  fname,
  req,
  val,
  unset,
  file,
  line 
)
Value:
do { \
switch (req) \
{ \
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)
#define VECTOR_MODE (   C,
  M,
  N 
)    make_vector_mode (MODE_##C, #M, N, __FILE__, __LINE__);

A single vector mode can be specified by naming its component mode and the number of components.

#define VECTOR_MODES (   C,
 
)    make_vector_modes (MODE_##C, W, __FILE__, __LINE__)

For all modes in class CL, construct vector modes of width WIDTH, having as many components as necessary.


Enumeration Type Documentation

enum mode_class
Enumerator:
MODE_CLASSES 
MAX_MODE_CLASS 
MODE_CLASSES 
MAX_MODE_CLASS 

Diagnose failure to meet expectations in a partially filled out mode structure.

Enumerator:
SET 
UNSET 
OPTIONAL 

Function Documentation

static void calc_wider_mode ( )
static
 Allocate max_n_modes + 1 entries to leave room for the extra null
 pointer assigned after the qsort call below.   
     "wider" is not meaningful for MODE_RANDOM and MODE_CC.
     However, we want these in textual order, and we have
     precisely the reverse.   
             this is nreverse  
static int cmp_modes ( )
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.

static void complete_all_modes ( )
static
static void complete_mode ( )
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.

     Nothing more need be said.   
     Again, nothing more need be said.  For historical reasons,
     the size of a CC mode is four units.   
     A scalar mode must have a byte size, may have a bit size,
     and must not have components.   A float mode must have a
     format.   
     A partial integer mode uses ->component to say what the
     corresponding full-size integer mode is, and may also
     specify a bit size.   
     Complex modes should have a component indicated, but no more.   
     Vector modes should have a component and a number of components.   
 If not already specified, the mode alignment defaults to the largest
 power of two that divides the size of the object.  Complex types are
 not more aligned than their contents.   
 If this mode has components, make the component mode point back
 to this mode, for the sake of adjustments.   

References error(), mode_data::file, mode_data::line, and mode_data::name.

static enum mode_class complex_class ( )
static

Mode class operations.

static void create_modes ( )
static

This file contains the definitions and documentation for the machine modes used in the GNU compiler. Copyright (C) 1987-2013 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.

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.

Note: If a mode is ever made which is more than 255 bytes wide, machmode.h and genmodes.c 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.

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 mode_data::counter.

static void emit_class_narrowest_mode ( )
static

Bleah, all this to get the comment right for MIN_MODE_INT.

static void emit_insn_modes_c ( )
static
static void emit_insn_modes_c_header ( )
static
static void emit_insn_modes_h ( )
static
Don't use BImode for MIN_MODE_INT, since otherwise the middle
end will try to use it for bitfields in structures and the
like, which we do not want.  Only the target md file should
generate BImode widgets.   

I can't think of a better idea, can you?

static void emit_max_int ( )
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.

static void emit_min_insn_modes_c ( )
static
static void emit_min_insn_modes_c_header ( )
static
static void emit_mode_adjustments ( )
static
 Size adjustments must be propagated to all containing modes.
 A size adjustment forces us to recalculate the alignment too.   
             NOTREACHED  
 Alignment adjustments propagate too.
 ??? This may not be the right thing for vector modes.   
             NOTREACHED  
 Ibit adjustments don't have to propagate.   
 Fbit adjustments don't have to propagate.   
 Real mode formats don't have to propagate anywhere.   
static void emit_mode_base_align ( )
static
static void emit_mode_class ( )
static

References print_decl.

static void emit_mode_fbit ( )
static

Emit fbit for all modes.

References error(), FATAL_EXIT_CODE, and progname.

static void emit_mode_ibit ( )
static

Emit ibit for all modes.

static void emit_mode_inner ( )
static
static void emit_mode_mask ( )
static
static void emit_mode_name ( )
static
static void emit_mode_nunits ( )
static

References mode_data::precision.

static void emit_mode_precision ( )
static
static void emit_mode_size ( )
static
static void emit_mode_wider ( )
static

For vectors we want twice the number of components, with the same element type.

References mode_data::component, and mode_data::ncomponents.

static void emit_real_format_for_mode ( )
static
 The entities pointed to by this table are constant, whether
 or not the table itself is constant.

 For backward compatibility this table is always writable
 (several targets modify it in TARGET_OPTION_OVERRIDE).   FIXME:
 convert all said targets to use ADJUST_FORMAT instead.   
 The beginning of the table is entries for float modes.   
 The end of the table is entries for decimal float modes.   

References mode_adjust::adjustment, mode_data::cl, mode_data::contained, mode_adjust::file, mode_adjust::line, mode_adjust::mode, mode_data::name, mode_data::ncomponents, mode_adjust::next, and mode_data::next_cont.

static int eq_mode ( )
static
static struct mode_data* find_mode ( )
staticread

Utility routines.

References count.

Referenced by make_partial_integer_mode().

static hashval_t hash_mode ( )
static

References mode_data::name.

int main ( )

Master control.

static void make_complex_modes ( enum mode_class  cl,
const char *  file,
unsigned int  line 
)
static
     Skip BImode.  FIXME: BImode probably shouldn't be MODE_INT.   
     The leading "1 +" is in case we prepend a "C" below.   
     Float complex modes are named SCmode, etc.
     Int complex modes are named CSImode, etc.
     This inconsistency should be eliminated.   
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
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.

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

References mode_data::bytesize, and new_mode().

static void make_partial_integer_mode ( const char *  base,
const char *  name,
unsigned int  precision,
const char *  file,
unsigned int  line 
)
static
static void make_pointer_bounds_mode ( const char *  name,
unsigned int  bytesize,
const char *  file,
unsigned int  line 
)
static
static void make_special_mode ( enum mode_class  cl,
const char *  name,
const char *  file,
unsigned int  line 
)
static
static void make_vector_mode ( enum mode_class  bclass,
const char *  base,
unsigned int  ncomponents,
const char *  file,
unsigned int  line 
)
static

References error().

static void make_vector_modes ( enum mode_class  cl,
unsigned int  width,
const char *  file,
unsigned int  line 
)
static

Do not construct vector modes with only one element, or vector modes where the element size doesn't divide the full size evenly.

     Skip QFmode and BImode.  FIXME: this special case should
     not be necessary.   

References error(), mode_data::file, mode_data::line, and mode_data::name.

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
static struct mode_data* new_mode ( enum mode_class  cl,
const char *  name,
const char *  file,
unsigned int  line 
)
staticread
static void reset_float_format ( const char *  name,
const char *  format,
const char *  file,
unsigned int  line 
)
static
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
static enum mode_class vector_class ( )
static

Variable Documentation

struct mode_adjust* adj_alignment
static
struct mode_adjust* adj_bytesize
static
struct mode_adjust* adj_fbit
static
struct mode_adjust* adj_format
static
struct mode_adjust* adj_ibit
static
struct mode_data blank_mode
static
Initial value:
{
0, "<unknown>", MAX_MODE_CLASS,
-1U, -1U, -1U, -1U,
0, 0, 0, 0, 0,
"<unknown>", 0, 0, 0, 0
}
const char* const mode_class_names[MAX_MODE_CLASS]
static
Initial value:

Referenced by make_partial_integer_mode().

struct mode_data* modes[MAX_MODE_CLASS]
static
htab_t modes_by_name
static
unsigned int n_modes[MAX_MODE_CLASS]
static
struct mode_data* void_mode
static