- BugFix: when splitting by input, ensure than Z is split by ALL inputs
[libfirm] / ir / tv / fltcalc.h
index 9a939be..067e3b8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
@@ -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
  */
@@ -180,6 +186,11 @@ int fc_zero_mantissa(const fp_value *value);
  */
 int fc_get_exponent(const fp_value *value);
 
+/**
+ * Return non-zero if a given value can be converted lossless into another precision.
+ */
+int fc_can_lossless_conv_to(const fp_value *value, char exp_size, char mant_size);
+
 /** Set new rounding mode
  * This function sets the rounding mode to one of the following, returning
  * the previously set rounding mode.
@@ -256,6 +267,11 @@ unsigned char fc_sub_bits(const fp_value *val, unsigned num_bit, unsigned byte_o
  */
 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);