X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=include%2Flibfirm%2Ftv.h;h=a92175d2071631405fae73e91c6094212bb2e8a4;hb=6120f98fcf91e30ab7854fa4b8abcc134f55d708;hp=9fc65133ccf53b329d850304500494bea225fd49;hpb=bdacbd77db4138f76e06dde1f0098edfa25e1aa9;p=libfirm diff --git a/include/libfirm/tv.h b/include/libfirm/tv.h index 9fc65133c..a92175d20 100644 --- a/include/libfirm/tv.h +++ b/include/libfirm/tv.h @@ -250,6 +250,13 @@ int tarval_is_null(tarval *a); */ int tarval_is_one(tarval *a); +/** + * Returns 1 if tv is the "minus one" + * + * @param a the tarval + */ +int tarval_is_minus_one(tarval *a); + /* * returns non-zero if all bits in the tarval are set */ @@ -561,16 +568,6 @@ char *get_tarval_bitpattern(tarval *tv); */ unsigned char get_tarval_sub_bits(tarval *tv, unsigned byte_ofs); -/** - * Return values of tarval classify - */ -typedef enum _tarval_classification_t { - TV_CLASSIFY_NULL = 0, /**< the tarval represents the additive neutral element */ - TV_CLASSIFY_ONE = +1, /**< the tarval represents the multiplicative neutral element */ - TV_CLASSIFY_ALL_ONE = -1, /**< the tarval represents the bitwise-and neutral element */ - TV_CLASSIFY_OTHER = 2 /**< all other tarvals */ -} tarval_classification_t; - /** * Returns non-zero if a given (integer) tarval has only one single bit * set. @@ -618,4 +615,24 @@ unsigned tarval_ieee754_get_exact(void); */ int tarval_enable_fp_ops(int enable); +/** + * Check if its the a floating point NaN. + */ +int tarval_is_NaN(tarval *tv); + +/** + * Check if its the a floating point +inf. + */ +int tarval_is_plus_inf(tarval *tv); + +/** + * Check if its the a floating point -inf. + */ +int tarval_is_minus_inf(tarval *tv); + +/** + * Check if the tarval represents a finite value, ie neither NaN nor inf. + */ +int tarval_is_finite(tarval *tv); + #endif /* FIRM_TV_TV_H */