fixed svn properties
[libfirm] / ir / tv / fltcalc.h
index 75f0691..a4745c1 100644 (file)
@@ -28,6 +28,7 @@
 #define FIRM_TV_FLTCALC_H
 
 #include "firm_config.h"
+#include "firm_types.h"
 
 #ifdef HAVE_LONG_DOUBLE
 /* XXX Set this via autoconf */
@@ -170,6 +171,11 @@ char *fc_print(const fp_value *a, char *buf, int buflen, unsigned base);
  */
 int fc_comp(const fp_value *a, const fp_value *b);
 
+/**
+ * Converts an floating point value into an integer value.
+ */
+int fc_flt2int(const fp_value *a, void *result, ir_mode *dst_mode);
+
 /**
  * Returns non-zero if the mantissa is zero, i.e. 1.0Exxx
  */
@@ -247,6 +253,20 @@ fc_rounding_mode_t fc_get_rounding_mode(void);
  */
 unsigned char fc_sub_bits(const fp_value *val, unsigned num_bit, unsigned byte_ofs);
 
+/**
+ * Set the immediate precision for IEEE-754 results. Set this to
+ * 0 to get the same precision as the operands.
+ * For x87 compatibility, set this to 80.
+ *
+ * @return the old setting
+ */
+unsigned fc_set_immediate_precision(unsigned bits);
+
+/**
+ * Returns non-zero if the result of the last operation was exact.
+ */
+int fc_is_exact(void);
+
 void init_fltcalc(int precision);
 void finish_fltcalc(void);