/* These functions calculate and return a tarval representing the requested
* value.
* The functions get_mode_{Max,Min,...} return tarvals retrieved from these
* functions, but these are stored on initialization of the irmode module and
/* These functions calculate and return a tarval representing the requested
* value.
* The functions get_mode_{Max,Min,...} return tarvals retrieved from these
* functions, but these are stored on initialization of the irmode module and
tarval *get_tarval_null(ir_mode *mode);
/** Returns the 1 value (multiplicative neutral) of a given mode. */
tarval *get_tarval_one(ir_mode *mode);
tarval *get_tarval_null(ir_mode *mode);
/** Returns the 1 value (multiplicative neutral) of a given mode. */
tarval *get_tarval_one(ir_mode *mode);
/** Return quite nan for float_number modes. */
tarval *get_tarval_nan(ir_mode *mode);
/** Return +inf for float_number modes. */
/** Return quite nan for float_number modes. */
tarval *get_tarval_nan(ir_mode *mode);
/** Return +inf for float_number modes. */
-/* ******************** Arithmethic operations on tarvals ******************** */
+/** Return -inf for float_number modes. */
+tarval *get_tarval_minus_inf(ir_mode *mode);
+
+/* ******************** Arithmetic operations on tarvals ******************** */
typedef enum _tarval_int_overflow_mode_t {
TV_OVERFLOW_BAD, /**< tarval module will return tarval_bad if a overflow occurs */
typedef enum _tarval_int_overflow_mode_t {
TV_OVERFLOW_BAD, /**< tarval module will return tarval_bad if a overflow occurs */
- * Compare a with b and return a pnc_number describing the relation
- * between a and b. This is either Uo, Lt, Eq, Gt, or False if a or b
- * are symbolic pointers which can not be compared at all.
+ * Compare a with b and return a pn_Cmp describing the relation
+ * between a and b. This is either pn_Cmp_Uo, pn_Cmp_Lt, pn_Cmp_Eq, pn_Cmp_Gt,
+ * or pn_Cmp_False if a or b are symbolic pointers which can not be compared at all.
* 'mode' is wider than the mode of src, as defined in the firm documentation
* and as returned by the function mode_is_smaller defined in irmode.h.
*
* 'mode' is wider than the mode of src, as defined in the firm documentation
* and as returned by the function mode_is_smaller defined in irmode.h.
*
* Some modes allow more that one representation, for instance integers
* can be represented hex or decimal. Of course it would be enough to have
* one and let every backend convert it into the 'right' one.
* Some modes allow more that one representation, for instance integers
* can be represented hex or decimal. Of course it would be enough to have
* one and let every backend convert it into the 'right' one.
- TVO_NATIVE, /**< the default output mode, depends on the mode */
- TVO_HEX, /**< use hex representation, always possible */
- TVO_DECIMAL, /**< use decimal representation */
- TVO_OCTAL, /**< use octal representation */
- TVO_BINARY, /**< use binary representation */
- TVO_FLOAT, /**< use floating point representation (i.e 1.342e-2)*/
- TVO_HEXFLOAT /**< use hexadecimal floating point representation (i.e 0x1.ea32p-12)*/
+ TVO_NATIVE, /**< the default output mode, depends on the mode */
+ TVO_HEX, /**< use hex representation, always possible */
+ TVO_DECIMAL, /**< use decimal representation */
+ TVO_OCTAL, /**< use octal representation */
+ TVO_BINARY, /**< use binary representation */
+ TVO_FLOAT, /**< use floating point representation (i.e 1.342e-2)*/
+ TVO_HEXFLOAT /**< use hexadecimal floating point representation (i.e 0x1.ea32p-12)*/
- tv_output_mode mode_output; /**< if != TVO_NATIVE select a special mode */
- const char *mode_prefix; /**< if set, this prefix will be printed
- before a value of this mode */
- const char *mode_suffix; /**< if set, this suffix will be printed
- after a value of this mode */
+ tv_output_mode mode_output; /**< if != TVO_NATIVE select a special mode */
+ const char *mode_prefix; /**< if set, this prefix will be printed
+ before a value of this mode */
+ const char *mode_suffix; /**< if set, this suffix will be printed
+ after a value of this mode */
* Because this is the bit representation of the target machine, only the following
* operations are legal on the result:
*
* Because this is the bit representation of the target machine, only the following
* operations are legal on the result:
*
- 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 */
+ 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 */
* - TV_CLASSIFY_ONE for multiplicative neutral,
* - TV_CLASSIFY_ALL_ONE for bitwise-and neutral
* - TV_CLASSIFY_OTHER else
*/
tarval_classification_t classify_tarval(tarval *tv);
* - TV_CLASSIFY_ONE for multiplicative neutral,
* - TV_CLASSIFY_ALL_ONE for bitwise-and neutral
* - TV_CLASSIFY_OTHER else
*/
tarval_classification_t classify_tarval(tarval *tv);