GCC Middle and Back End API Reference
|
Data Structures | |
struct | mode_data |
struct | mode_adjust |
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_data * | find_mode () |
static struct mode_data * | new_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_data * | modes [MAX_MODE_CLASS] |
static unsigned int | n_modes [MAX_MODE_CLASS] |
static struct mode_data * | void_mode |
static struct mode_data | blank_mode |
static htab_t | modes_by_name |
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 |
enum mode_class |
enum requirement |
|
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 |
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 |
|
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 |
Mode class operations.
|
static |
References mode_data::counter.
|
static |
Bleah, all this to get the comment right for MIN_MODE_INT.
|
static |
|
static |
|
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 |
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 |
|
static |
References mode_data::name, and mode_data::precision.
|
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 |
|
static |
|
static |
Emit ibit for all modes.
|
static |
|
static |
References mode_data::alignment, and mode_data::name.
|
static |
|
static |
References mode_data::precision.
|
static |
|
static |
|
static |
For vectors we want twice the number of components, with the same element type.
References mode_data::component, and mode_data::ncomponents.
|
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 |
|
staticread |
|
static |
References mode_data::name.
int main | ( | ) |
Master control.
|
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 |
|
static |
Create a fixed-point mode by setting CL, NAME, BYTESIZE, IBIT, FBIT, FILE, and LINE.
|
static |
|
static |
References mode_data::bytesize, mode_data::fbit, mode_data::ibit, and new_mode().
|
static |
References mode_data::cl, error(), find_mode(), mode_class_names, snprintf(), and vector_class().
|
static |
|
static |
References mode_data::bytesize, new_mode(), and mode_data::precision.
|
static |
References error().
|
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 |
|
staticread |
References error(), mode_data::file, mode_data::line, and trim_filename().
Referenced by make_int_mode(), and make_special_mode().
|
static |
|
static |
|
static |
Referenced by make_partial_integer_mode().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Referenced by make_partial_integer_mode().
|
static |
Referenced by add_define_subst_attr(), and count_reg_usage().
|
static |
|
static |
|
static |