Commit b02497e2 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

tv: Correct tarval_abs(): |-0.0| and |-NAN| result in +0.0 and +NAN now.

parent 967b522b
...@@ -1014,8 +1014,7 @@ ir_tarval *tarval_abs(ir_tarval *a) ...@@ -1014,8 +1014,7 @@ ir_tarval *tarval_abs(ir_tarval *a)
return a; return a;
case irms_float_number: case irms_float_number:
if (fc_comp((const fp_value*) a->value, if (fc_is_negative((fp_value const*)a)) {
(const fp_value*) get_mode_null(a->mode)->value) == -1) {
fc_neg((const fp_value*) a->value, NULL); fc_neg((const fp_value*) a->value, NULL);
return get_tarval_overflow(fc_get_buffer(), fc_get_buffer_length(), a->mode); return get_tarval_overflow(fc_get_buffer(), fc_get_buffer_length(), a->mode);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment