18 #include "firm_types.h" int tarval_is_all_one(ir_tarval const *tv)
returns non-zero if all bits in the tarval are set.
ir_tarval * get_tarval_bad(void)
Returns the 'bad' tarval.
ir_tarval * tarval_andnot(ir_tarval const *a, ir_tarval const *b)
Bitwise and not of two integer tarvals.
int tarval_is_nan(ir_tarval const *tv)
Check if tv is a floating point NaN.
ir_tarval * tarval_shl(ir_tarval const *a, ir_tarval const *b)
Logical Left shift.
ir_tarval *const tarval_unknown
The 'unknown' tarval.
int get_tarval_lowest_bit(ir_tarval const *tv)
Returns the number of the lowest set bit in a given (integer) tarval.
ir_tarval * tarval_not(ir_tarval const *a)
Bitwise Negation of a tarval.
ir_tarval * get_tarval_b_true(void)
Returns the mode_b tarval 'true'.
ir_tarval * tarval_mod(ir_tarval const *a, ir_tarval const *b)
Remainder of integer division.
ir_tarval * tarval_b_true
The mode_b tarval 'true'.
ir_mode * get_tarval_mode(ir_tarval const *tv)
Returns the mode of the tarval.
int get_tarval_highest_bit(ir_tarval const *tv)
Return the number of the highest set bit in a given (integer) tarval.
ir_tarval * tarval_add(ir_tarval const *a, ir_tarval const *b)
Addition of two tarvals.
ir_tarval * get_tarval_b_false(void)
Returns the mode_b tarval 'false'.
ir_tarval * tarval_eor(ir_tarval const *a, ir_tarval const *b)
Bitwise exclusive or of two integer tarvals.
ir_tarval * tarval_shrs_unsigned(ir_tarval const *a, unsigned b)
signed (arithmetic) right shift (variant with unsigned argument).
unsigned char get_tarval_sub_bits(ir_tarval const *tv, unsigned byte_ofs)
Returns the bitpattern of the bytes_ofs byte.
ir_tarval * new_tarval_from_long_double(long double d, ir_mode *mode)
same as new_tarval_from_double(), but with a long double argument
ir_tarval * tarval_shr_unsigned(ir_tarval const *a, unsigned b)
unsigned (logical) right shift (variant with unsigned argument).
int tarval_is_signaling_nan(ir_tarval const *tv)
Check if tv is a floating point signaling NaN.
int tarval_get_wrap_on_overflow(void)
Returns 0 if operations return bad on overflow, != 0 if they wrap around.
ir_tarval * get_tarval_unknown(void)
Returns the 'unknown' tarval.
ir_tarval * tarval_abs(ir_tarval const *a)
Absolute value of a tarval.
ir_tarval * new_integer_tarval_from_str(const char *str, size_t len, int negative, unsigned char base, ir_mode *mode)
Construct a new tarval from a given string.
ir_tarval * tarval_or(ir_tarval const *a, ir_tarval const *b)
Bitwise or of two integer tarvals.
struct ir_tarval ir_tarval
Target Machine Value.
ir_tarval * tarval_divmod(ir_tarval const *a, ir_tarval const *b, ir_tarval **mod_res)
Integer division AND remainder.
ir_tarval * new_tarval_from_double(double d, ir_mode *mode)
Constructor function for new tarvals.
ir_tarval * tarval_shr(ir_tarval const *a, ir_tarval const *b)
Unsigned (logical) right shift.
int tarval_is_one(ir_tarval const *tv)
Returns 1 if tv is the "one".
ir_tarval * tarval_b_false
The mode_b tarval 'false'.
int tarval_is_negative(ir_tarval const *tv)
Returns 1 if tv is negative.
int tarval_zero_mantissa(ir_tarval const *tv)
Returns non-zero if the mantissa of a floating point tarval is zero (i.e.
ir_tarval * tarval_bitcast(ir_tarval const *src, ir_mode *mode)
Converts a tarval to another mode by reinterpreting the contained bits.
ir_tarval *const tarval_bad
The 'bad' tarval.
int tarval_is_long(ir_tarval const *tv)
This validates if get_tarval_long() will return something sensible.
ir_tarval * tarval_div(ir_tarval const *a, ir_tarval const *b)
Integer division of two tarvals.
ir_tarval * new_tarval_from_str(const char *str, size_t len, ir_mode *mode)
Constructor function for new tarvals.
double get_tarval_double(ir_tarval const *tv)
This returns a double with the value represented value, or gibberish, depending on the size of double...
ir_relation
Relations for comparing numbers.
ir_tarval * new_tarval_from_long(long l, ir_mode *mode)
Constructor function for new tarvals.
ir_tarval * tarval_convert_to(ir_tarval const *src, ir_mode *mode)
Converts a tarval to another mode.
ir_tarval * new_tarval_nan(ir_mode *mode, int signaling, ir_tarval const *payload)
Construct a new floating point quiet NaN value.
ir_tarval * tarval_sub(ir_tarval const *a, ir_tarval const *b)
Subtraction from a tarval.
ir_tarval * tarval_shl_unsigned(ir_tarval const *a, unsigned b)
logical left shift (variant with unsigned argument).
int get_tarval_popcount(ir_tarval const *tv)
Returns the number of set bits in a given (integer) tarval.
ir_tarval * tarval_and(ir_tarval const *a, ir_tarval const *b)
Bitwise and of two integer tarvals.
struct ir_mode ir_mode
SSA Value mode.
void tarval_set_wrap_on_overflow(int wrap_on_overflow)
Sets whether values should wrap on overflow or return the bad value.
ir_tarval * tarval_ornot(ir_tarval const *a, ir_tarval const *b)
Bitwise or not of two integer tarvals.
int tarval_ieee754_can_conv_lossless(ir_tarval const *tv, const ir_mode *mode)
Check if the tarval can be converted to the given mode without precision loss.
int tarval_get_exponent(ir_tarval const *tv)
Returns the exponent of a floating point IEEE-754 tarval.
unsigned tarval_ieee754_get_exact(void)
Returns non-zero if the result of the last IEEE-754 operation was exact.
ir_tarval * new_tarval_from_bytes(unsigned char const *buf, ir_mode *mode)
Construct a new tarval from a sequence of bytes.
int tarval_is_null(ir_tarval const *tv)
Returns 1 if tv is null.
long get_tarval_long(ir_tarval const *tv)
Returns value as long if possible.
ir_tarval * tarval_mul(ir_tarval const *a, ir_tarval const *b)
Multiplication of tarvals.
void tarval_to_bytes(unsigned char *buffer, ir_tarval const *tv)
Write tarval to a sequence of bytes.
long double get_tarval_long_double(ir_tarval const *tv)
same as get_tarval_double but returns a long double value
int tarval_is_quiet_nan(ir_tarval const *tv)
Check if tv is a floating point quiet NaN.
int tarval_is_double(ir_tarval const *tv)
This validates if tarval_to_double() will return a satisfying result.
int tarval_is_constant(ir_tarval const *tv)
Returns non-zero if the tarval is a constant (i.e.
int tarval_is_finite(ir_tarval const *tv)
Check if the tarval represents a finite value, ie neither NaN nor inf.
ir_relation tarval_cmp(ir_tarval const *a, ir_tarval const *b)
Compares two tarvals.
ir_tarval * tarval_neg(ir_tarval const *a)
Arithmetic Negation of a tarval.
ir_tarval * tarval_shrs(ir_tarval const *a, ir_tarval const *b)
Signed (arithmetic) right shift.