GCC Middle and Back End API Reference
machmode.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  bit_field_mode_iterator

Enumerations

enum  mode_class { MODE_CLASSES, MAX_MODE_CLASS, MODE_CLASSES, MAX_MODE_CLASS }

Functions

enum machine_mode mode_for_size (unsigned int, enum mode_class, int)
enum machine_mode smallest_mode_for_size (unsigned int, enum mode_class)
enum machine_mode int_mode_for_mode (enum machine_mode)
enum machine_mode mode_for_vector (enum machine_mode, unsigned)
enum machine_mode get_best_mode (int, int, unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT, unsigned int, enum machine_mode, bool)
unsigned get_mode_alignment (enum machine_mode)
unsigned int element_precision (enum machine_mode)
void init_adjust_machine_modes (void)

Variables

const char *const mode_name [NUM_MACHINE_MODES]
const unsigned char mode_class [NUM_MACHINE_MODES]
CONST_MODE_SIZE unsigned char mode_size [NUM_MACHINE_MODES]
const unsigned short mode_precision [NUM_MACHINE_MODES]
CONST_MODE_IBIT unsigned char mode_ibit [NUM_MACHINE_MODES]
CONST_MODE_FBIT unsigned char mode_fbit [NUM_MACHINE_MODES]
const unsigned HOST_WIDE_INT mode_mask_array [NUM_MACHINE_MODES]
const unsigned char mode_inner [NUM_MACHINE_MODES]
const unsigned char mode_nunits [NUM_MACHINE_MODES]
const unsigned char mode_wider [NUM_MACHINE_MODES]
const unsigned char mode_2xwider [NUM_MACHINE_MODES]
CONST_MODE_BASE_ALIGN unsigned char mode_base_align [NUM_MACHINE_MODES]
const unsigned char class_narrowest_mode [MAX_MODE_CLASS]
enum machine_mode byte_mode
enum machine_mode word_mode
enum machine_mode ptr_mode

Enumeration Type Documentation

enum mode_class
Enumerator:
MODE_CLASSES 
MAX_MODE_CLASS 
MODE_CLASSES 
MAX_MODE_CLASS 

Function Documentation

unsigned int element_precision ( enum  machine_mode)
Get the precision of the mode or its inner mode if it has one.   

Referenced by convert_to_integer(), fold_binary_loc(), and operand_equal_p().

enum machine_mode get_best_mode ( int  bitsize,
int  bitpos,
unsigned HOST_WIDE_INT  bitregion_start,
unsigned HOST_WIDE_INT  bitregion_end,
unsigned int  align,
enum machine_mode  largest_mode,
bool  volatilep 
)
Find the best mode to use to access a bit field.   
Find the best machine mode to use when referencing a bit field of length
   BITSIZE bits starting at BITPOS.

   BITREGION_START is the bit position of the first bit in this
   sequence of bit fields.  BITREGION_END is the last bit in this
   sequence.  If these two fields are non-zero, we should restrict the
   memory access to that range.  Otherwise, we are allowed to touch
   any adjacent non bit-fields.

   The underlying object is known to be aligned to a boundary of ALIGN bits.
   If LARGEST_MODE is not VOIDmode, it means that we should not use a mode
   larger than LARGEST_MODE (usually SImode).

   If no mode meets all these conditions, we return VOIDmode.

   If VOLATILEP is false and SLOW_BYTE_ACCESS is false, we return the
   smallest mode meeting these conditions.

   If VOLATILEP is false and SLOW_BYTE_ACCESS is true, we return the
   largest mode (but a mode no wider than UNITS_PER_WORD) that meets
   all the conditions.

   If VOLATILEP is true the narrow_volatile_bitfields target hook is used to
   decide which of the above modes should be used.   

References bit_field_mode_iterator::next_mode(), and bit_field_mode_iterator::prefer_smaller_modes().

Referenced by extract_fixed_bit_field(), fold_truth_andor_1(), optimize_bit_field_compare(), optimize_bitfield_assignment_op(), store_bit_field(), and store_fixed_bit_field().

unsigned get_mode_alignment ( enum  machine_mode)

Referenced by emit_move_complex().

void init_adjust_machine_modes ( void  )
Target-dependent machine mode initialization - in insn-modes.c.   

Referenced by do_compile().

enum machine_mode mode_for_vector ( enum  machine_mode,
unsigned   
)
Return a mode that is suitable for representing a vector,
   or BLKmode on failure.   

Referenced by can_vec_perm_p(), expand_expr_real_2(), expand_vec_perm(), get_vectype_for_scalar_type_and_size(), and layout_type().


Variable Documentation

enum machine_mode byte_mode
Define the integer modes whose sizes are BITS_PER_UNIT and BITS_PER_WORD
   and the mode whose class is Pmode and whose size is POINTER_SIZE.   
Commonly used modes.   

Referenced by get_traditional_extraction_insn(), init_emit_once(), and set_storage_via_setmem().

const unsigned char class_narrowest_mode[MAX_MODE_CLASS]
For each class, get the narrowest mode in that class.   
const unsigned char mode_2xwider[NUM_MACHINE_MODES]
For scalars, this is a mode with twice the precision.  For vectors,
   this is a mode with the same inner mode but with twice the elements.   
CONST_MODE_BASE_ALIGN unsigned char mode_base_align[NUM_MACHINE_MODES]
Determine alignment, 1<=result<=BIGGEST_ALIGNMENT.   

Referenced by get_mode_alignment().

const unsigned char mode_class[NUM_MACHINE_MODES]
Get the general kind of object that mode MODE represents
   (integer, floating, complex, etc.)   
CONST_MODE_FBIT unsigned char mode_fbit[NUM_MACHINE_MODES]
Get the number of fractional bits of an object of mode MODE.   
CONST_MODE_IBIT unsigned char mode_ibit[NUM_MACHINE_MODES]
Get the number of integral bits of an object of mode MODE.   
const unsigned char mode_inner[NUM_MACHINE_MODES]
Return the mode of the inner elements in a vector.   
const unsigned HOST_WIDE_INT mode_mask_array[NUM_MACHINE_MODES]
Get a bitmask containing 1 for all bits in a word
   that fit within mode MODE.   
const char* const mode_name[NUM_MACHINE_MODES]
Make an enum class that gives all the machine modes.   
Get the name of mode MODE as a string.   

Referenced by write_predicate_expr().

const unsigned char mode_nunits[NUM_MACHINE_MODES]
Get the number of units in the object.   
const unsigned short mode_precision[NUM_MACHINE_MODES]
Get the number of value bits of an object of mode MODE.   
CONST_MODE_SIZE unsigned char mode_size[NUM_MACHINE_MODES]
Get the size in bytes and bits of an object of mode MODE.   
const unsigned char mode_wider[NUM_MACHINE_MODES]
Get the next wider natural mode (eg, QI -> HI -> SI -> DI -> TI).   
enum machine_mode word_mode

Referenced by adjust_bit_field_mem_for_reg(), assign_parm_setup_block(), build_word_mode_vector_type(), can_assign_to_reg_without_clobbers_p(), can_decompose_p(), compute_costs(), compute_splitting_shift(), convert_move(), copy_blkmode_from_reg(), copy_blkmode_to_reg(), create_new_invariant(), decompose_register(), default_emutls_var_fields(), default_libgcc_cmp_return_mode(), default_libgcc_shift_count_mode(), default_preferred_simd_mode(), default_unwind_word_mode(), do_jump_by_parts_equality_rtx(), do_jump_by_parts_greater_rtx(), do_jump_by_parts_zero_rtx(), do_output_reload(), doloop_optimize(), emit_block_move_via_loop(), emit_case_bit_tests(), emit_library_call_value_1(), emit_push_insn(), emit_stack_probe(), emit_store_flag(), emit_store_flag_1(), emit_store_flag_force(), emutls_common_1(), equiv_constant(), execute_optimize_bswap(), expand_absneg_bit(), expand_binop(), expand_builtin_signbit(), expand_copysign_absneg(), expand_copysign_bit(), expand_doubleword_bswap(), expand_doubleword_clz(), expand_doubleword_mult(), expand_doubleword_shift(), expand_doubleword_shift_condmove(), expand_errno_check(), expand_expr_real_2(), expand_subword_shift(), expand_superword_shift(), expand_switch_using_bit_tests_p(), expand_unop(), expand_vector_parallel(), extract_bit_field_1(), extract_fixed_bit_field(), extract_high_half(), extract_split_bit_field(), find_decomposable_shift_zext(), find_decomposable_subregs(), find_if_header(), find_reloads_address_1(), fold_truth_andor_1(), force_const_mem(), gen_int_libfunc(), get_optab_extraction_insn(), get_traditional_extraction_insn(), init_emit_once(), init_lower_subreg(), init_reg_modes_target(), load_register_parameters(), lshift_cheap_p(), make_extraction(), mem_loc_descriptor(), move_block_from_reg(), move_block_to_reg(), operand_subword(), optimize_bit_field_compare(), optimize_bitfield_assignment_op(), prepare_cmp_insn(), push_reload(), reload_cse_simplify_operands(), reload_cse_simplify_set(), resolve_clobber(), resolve_shift_zext(), resolve_simple_move(), simplify_while_replacing(), store_bit_field_1(), store_constructor(), store_fixed_bit_field(), store_split_bit_field(), store_unaligned_arguments_into_pseudos(), try_combine(), undefined_operand_subword_p(), valid_multiword_target_p(), and validate_subreg().