Remove stale code.
[libfirm] / ir / tv / tv.c
index f7a8f22..964af56 100644 (file)
@@ -100,6 +100,8 @@ static struct set *tarvals = NULL;   /* container for tarval structs */
 static struct set *values = NULL;    /* container for values */
 static tarval_int_overflow_mode_t int_overflow_mode = TV_OVERFLOW_WRAP;
 
+#define no_float 0
+
 /****************************************************************************
  *   private functions
  ****************************************************************************/
@@ -747,6 +749,8 @@ pn_Cmp tarval_cmp(tarval *a, tarval *b) {
                return pn_Cmp_False;
 
        case irms_float_number:
+               if(no_float)
+                       return pn_Cmp_False;
                /*
                 * BEWARE: we cannot compare a == b here, because
                 * a NaN is always Unordered to any other value, even to itself!
@@ -967,6 +971,9 @@ tarval *tarval_neg(tarval *a) {
                return get_tarval_overflow(buffer, a->length, a->mode);
 
        case irms_float_number:
+               if(no_float)
+                       return tarval_bad;
+
                fc_neg(a->value, NULL);
                return get_tarval_overflow(fc_get_buffer(), fc_get_buffer_length(), a->mode);
 
@@ -999,6 +1006,9 @@ tarval *tarval_add(tarval *a, tarval *b) {
                return get_tarval_overflow(buffer, a->length, a->mode);
 
        case irms_float_number:
+               if(no_float)
+                       return tarval_bad;
+
                fc_add(a->value, b->value, NULL);
                return get_tarval_overflow(fc_get_buffer(), fc_get_buffer_length(), a->mode);
 
@@ -1030,6 +1040,9 @@ tarval *tarval_sub(tarval *a, tarval *b) {
                return get_tarval_overflow(buffer, a->length, a->mode);
 
        case irms_float_number:
+               if(no_float)
+                       return tarval_bad;
+
                fc_sub(a->value, b->value, NULL);
                return get_tarval_overflow(fc_get_buffer(), fc_get_buffer_length(), a->mode);
 
@@ -1061,6 +1074,9 @@ tarval *tarval_mul(tarval *a, tarval *b) {
                return get_tarval_overflow(buffer, a->length, a->mode);
 
        case irms_float_number:
+               if(no_float)
+                       return tarval_bad;
+
                fc_mul(a->value, b->value, NULL);
                return get_tarval_overflow(fc_get_buffer(), fc_get_buffer_length(), a->mode);
 
@@ -1077,6 +1093,9 @@ tarval *tarval_quo(tarval *a, tarval *b) {
        assert(b);
        assert((a->mode == b->mode) && mode_is_float(a->mode));
 
+       if(no_float)
+               return tarval_bad;
+
        if (get_mode_n_vector_elems(a->mode) > 1) {
                /* vector arithmetic not implemented yet */
                return tarval_bad;
@@ -1152,6 +1171,9 @@ tarval *tarval_abs(tarval *a) {
                return a;
 
        case irms_float_number:
+               if(no_float)
+                       return tarval_bad;
+
                if (fc_comp(a->value, get_mode_null(a->mode)->value) == -1) {
                        fc_neg(a->value, NULL);
                        return get_tarval_overflow(fc_get_buffer(), fc_get_buffer_length(), a->mode);