12 #ifndef FIRM_IR_IRMODE_H
13 #define FIRM_IR_IRMODE_H
15 #include "firm_types.h"
79 unsigned bit_size,
int sign,
80 unsigned modulo_shift);
90 unsigned modulo_shift);
105 unsigned exponent_size,
106 unsigned mantissa_size,
ir_mode * get_modeX(void)
Returns control-flow mode.
ir_mode * get_modeANY(void)
Returns ANY mode.
struct ir_type ir_type
Type.
ir_mode * new_int_mode(const char *name, ir_mode_arithmetic arithmetic, unsigned bit_size, int sign, unsigned modulo_shift)
Creates a new mode.
ir_mode * find_signed_mode(const ir_mode *mode)
Returns a matching signed mode for a given integer unsigned mode.
ir_mode * get_modeT(void)
Returns tuple mode.
ir_mode * get_reference_offset_mode(const ir_mode *mode)
Returns the integer equivalent mode for an reference mode.
ir_mode * get_modeD(void)
Returns double mode.
int mode_is_float(const ir_mode *mode)
Returns 1 if mode is for floating point numbers, 0 otherwise.
ir_mode_arithmetic get_mode_arithmetic(const ir_mode *mode)
Returns the arithmetic of a mode.
unsigned get_mode_exponent_size(const ir_mode *mode)
Returns size of exponent in bits (for float modes)
ident * get_mode_ident(const ir_mode *mode)
Returns the ident* of the mode.
int mode_is_reference(const ir_mode *mode)
Returns 1 if mode is for references/pointers, 0 otherwise.
the integer indefinite value (=INT_MIN) is returned.
void set_reference_offset_mode(ir_mode *ref_mode, ir_mode *int_mode)
Sets the (signed) integer equivalent mode for an reference mode.
ir_mode * new_float_mode(const char *name, ir_mode_arithmetic arithmetic, unsigned exponent_size, unsigned mantissa_size, float_int_conversion_overflow_style_t int_conv_overflow)
Create a new ieee754 float mode.
size_t ir_get_n_modes(void)
Returns number of known modes.
ir_mode * get_modeBs(void)
Returns byte signed mode.
int mode_wrap_around(const ir_mode *mode)
Returns non-zero if the mode has a reversed wrap-around logic, especially (a + x) - x == a...
ir_mode * mode_T
tuple (none)
unsigned get_mode_size_bytes(const ir_mode *mode)
Returns the size of values of the mode in bytes.
ir_tarval * get_mode_all_one(const ir_mode *mode)
Returns the value where all bits are One, represented in this mode.
ir_mode * get_modeIs(void)
Returns integer signed mode.
ir_mode * get_modeBB(void)
Returns Basic-Block mode.
const char * get_mode_name(const ir_mode *mode)
Returns the null-terminated name of this mode.
float_int_conversion_overflow_style_t
Specifies what happens when a float value is converted to an integer and overflow happens...
ir_tarval * get_mode_min(const ir_mode *mode)
Returns the smallest representable value of a given mode.
ir_mode * new_reference_mode(const char *name, ir_mode_arithmetic arithmetic, unsigned bit_size, unsigned modulo_shift)
Create a new reference mode.
ir_mode * get_modeF(void)
Returns float mode.
ir_mode * mode_F
ieee754 binary32 float (single precision)
ir_mode * mode_BAD
bad mode
unsigned get_mode_size_bits(const ir_mode *mode)
Returns the size of values of the mode in bits.
ir_tarval * get_mode_null(const ir_mode *mode)
Returns the value Zero represented in this mode.
x86 extended floating point values
ir_mode * find_unsigned_mode(const ir_mode *mode)
Returns a matching unsigned mode for a given integer signed mode.
ir_mode * mode_ANY
undefined mode
ir_tarval * get_mode_infinite(const ir_mode *mode)
Returns a positive infinite value of a mode.
int mode_is_int(const ir_mode *mode)
Returns 1 if mode is for integer numbers, 0 otherwise.
ir_mode * find_double_bits_int_mode(const ir_mode *mode)
Returns an integer mode with 2*n bits for a given integer mode with n bits.
ir_mode * mode_X
execution
Values of the mode are represented according to ieee754 floating point standard.
ir_type * get_type_for_mode(const ir_mode *mode)
Returns the primitive type matching the given mode.
ir_mode * ir_get_mode(size_t num)
Returns known mode number num.
float_int_conversion_overflow_style_t get_mode_float_int_overflow(const ir_mode *mode)
Returns semantic on float to integer conversion overflow.
int is_reinterpret_cast(const ir_mode *src, const ir_mode *dst)
Returns non-zero if the cast from mode src to mode dst is a reinterpret cast (i.e.
ir_mode * get_modeHs(void)
Returns halfword signed mode.
ir_mode * get_modeM(void)
Returns memory mode.
ir_mode * mode_D
ieee754 binary64 float (double precision)
unsigned get_mode_mantissa_size(const ir_mode *mode)
Returns size of bits used for to encode the mantissa (for float modes).
int mode_overflow_on_unary_Minus(const ir_mode *mode)
Returns non-zero if the given mode might overflow on unary Minus.
ir_mode * get_modeb(void)
Returns internal boolean mode.
struct ir_tarval ir_tarval
Target Machine Value.
ir_mode * mode_b
This mode represents (parts of) the processor status flag queried in conditional jumps or predicated ...
int values_in_mode(const ir_mode *sm, const ir_mode *lm)
Returns true if no information is lost when converting a value of mode sm into mode lm (and back to m...
ir_mode * get_modeP(void)
Returns pointer mode.
ir_mode * get_modeLs(void)
Returns long signed mode.
For modes for which no representation is specified.
INT_MIN/INT_MAX is returned depending on the sign of the floatingpoint number.
int mode_is_data(const ir_mode *mode)
Returns 1 if mode is for data values, 0 otherwise.
int mode_is_signed(const ir_mode *mode)
Returns 1 if mode is signed, 0 otherwise.
int mode_is_num(const ir_mode *mode)
Returns 1 if mode is for numeric values, 0 otherwise.
unsigned int get_mode_modulo_shift(const ir_mode *mode)
Returns the modulo shift attribute.
void set_modeP(ir_mode *p)
Sets the machine specific pointer mode.
ir_mode * get_modeHu(void)
Returns halfword unsigned mode.
ir_mode * new_non_arithmetic_mode(const char *name, unsigned bit_size)
Creates a new mode for data values which are not used to perform arithmetic.
ir_mode * get_modeBAD(void)
Returns BAD mode.
struct ir_mode ir_mode
SSA Value mode.
ir_tarval * get_mode_max(const ir_mode *mode)
Returns the biggest representable value of a given mode.
ir_mode * get_modeBu(void)
Returns byte unsigned mode.
int smaller_mode(const ir_mode *sm, const ir_mode *lm)
Returns true if a value of mode sm can be converted to mode lm without loss.
const char ident
Identifier.
int mode_has_signed_zero(const ir_mode *mode)
Returns non-zero if the given mode has negative zeros, i.e.
ir_mode_arithmetic
These values represent the different arithmetic operations possible with a mode.
Values of the mode are represented as two's complement.
ir_mode * get_modeIu(void)
Returns integer unsigned mode.
ir_mode * get_modeLu(void)
Returns long unsigned mode.
ir_tarval * get_mode_one(const ir_mode *mode)
Returns the value One, represented in this mode.