12 #ifndef FIRM_IR_IRMODE_H 13 #define FIRM_IR_IRMODE_H 15 #include "firm_types.h" 78 unsigned bit_size,
int sign,
79 unsigned modulo_shift);
88 unsigned modulo_shift);
103 unsigned exponent_size,
104 unsigned mantissa_size,
int mode_is_num(const ir_mode *mode)
Returns 1 if mode is for numeric values, 0 otherwise.
unsigned get_mode_size_bytes(const ir_mode *mode)
Returns the size of values of the mode in bytes.
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...
const char ident
Identifier.
ir_mode * get_modeD(void)
Returns double mode.
ir_mode * get_modeBAD(void)
Returns BAD mode.
ir_mode * get_modeIu(void)
Returns integer unsigned mode.
For modes for which no representation is specified.
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)
ir_mode * mode_BAD
bad mode
ident * get_mode_ident(const ir_mode *mode)
Returns the ident* of the mode.
ir_mode * get_modeANY(void)
Returns ANY mode.
ir_mode * find_signed_mode(const ir_mode *mode)
Returns a matching signed mode for a given integer unsigned mode.
ir_mode * get_modeF(void)
Returns float mode.
ir_mode * get_modeT(void)
Returns tuple mode.
ir_tarval * get_mode_all_one(const ir_mode *mode)
Returns the value where all bits are One, represented in this mode.
x86 extended floating point values
const char * get_mode_name(const ir_mode *mode)
Returns the null-terminated name of this mode.
ir_mode * mode_D
ieee754 binary64 float (double precision)
ir_mode * find_unsigned_mode(const ir_mode *mode)
Returns a matching unsigned mode for a given integer signed mode.
int mode_is_int(const ir_mode *mode)
Returns 1 if mode is for integer numbers, 0 otherwise.
ir_mode * mode_ANY
undefined mode
void set_reference_offset_mode(ir_mode *ref_mode, ir_mode *int_mode)
Sets the (signed) integer equivalent mode for an reference mode.
struct ir_type ir_type
Type.
struct ir_tarval ir_tarval
Target Machine Value.
ir_mode * get_modeHs(void)
Returns halfword signed mode.
ir_tarval * get_mode_min(const ir_mode *mode)
Returns the smallest representable value of a given mode.
ir_tarval * get_mode_infinite(const ir_mode *mode)
Returns a positive infinite value of a mode.
int mode_overflow_on_unary_Minus(const ir_mode *mode)
Returns non-zero if the given mode might overflow on unary Minus.
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.
ir_mode * get_reference_offset_mode(const ir_mode *mode)
Returns the integer equivalent mode for an reference mode.
ir_mode * get_modeBs(void)
Returns byte signed mode.
ir_mode * mode_T
tuple (none)
ir_mode * get_modeM(void)
Returns memory mode.
float_int_conversion_overflow_style_t
Specifies what happens when a float value is converted to an integer and overflow happens...
ir_mode * ir_get_mode(size_t num)
Returns known mode number num.
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.
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.
Values of the mode are represented as two's complement.
unsigned get_mode_size_bits(const ir_mode *mode)
Returns the size of values of the mode in bits.
size_t ir_get_n_modes(void)
Returns number of known modes.
unsigned get_mode_mantissa_size(const ir_mode *mode)
Returns size of bits used for to encode the mantissa (for float modes).
ir_mode * get_modeLs(void)
Returns long signed mode.
int mode_is_signed(const ir_mode *mode)
Returns 1 if mode is signed, 0 otherwise.
float_int_conversion_overflow_style_t get_mode_float_int_overflow(const ir_mode *mode)
Returns semantic on float to integer conversion overflow.
ir_mode * get_modeHu(void)
Returns halfword unsigned mode.
int mode_has_signed_zero(const ir_mode *mode)
Returns non-zero if the given mode has negative zeros, i.e.
ir_mode * get_modeIs(void)
Returns integer signed 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.
INT_MIN/INT_MAX is returned depending on the sign of the floatingpoint number.
ir_mode * get_modeLu(void)
Returns long unsigned mode.
ir_mode * new_reference_mode(const char *name, unsigned bit_size, unsigned modulo_shift)
Create a new reference mode.
ir_tarval * get_mode_one(const ir_mode *mode)
Returns the value One, represented in this mode.
int mode_is_float(const ir_mode *mode)
Returns 1 if mode is for floating point numbers, 0 otherwise.
ir_mode * get_modeP(void)
Returns pointer mode.
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.
struct ir_mode ir_mode
SSA Value mode.
int mode_is_data(const ir_mode *mode)
Returns 1 if mode is for data values, 0 otherwise.
Values of the mode are represented according to ieee754 floating point standard.
ir_mode * get_modeb(void)
Returns internal boolean mode.
ir_mode * mode_b
This mode represents (parts of) the processor status flag queried in conditional jumps or predicated ...
ir_mode_arithmetic
These values represent the different arithmetic operations possible with a 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_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.
the integer indefinite value (=INT_MIN) is returned.
int mode_is_reference(const ir_mode *mode)
Returns 1 if mode is for references/pointers, 0 otherwise.
ir_mode * new_int_mode(const char *name, unsigned bit_size, int sign, unsigned modulo_shift)
Creates a new mode.
ir_mode * mode_F
ieee754 binary32 float (single precision)
ir_mode * mode_X
execution
ir_mode * get_modeX(void)
Returns control-flow mode.
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_modeBB(void)
Returns Basic-Block mode.
ir_tarval * get_mode_null(const ir_mode *mode)
Returns the value Zero represented in this mode.
ir_type * get_type_for_mode(const ir_mode *mode)
Returns the primitive type matching the given mode.