projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
967b522
)
tv: Correct tarval_abs(): |-0.0| and |-NAN| result in +0.0 and +NAN now.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Sat, 8 Dec 2012 21:37:58 +0000
(22:37 +0100)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Sat, 8 Dec 2012 21:37:58 +0000
(22:37 +0100)
ir/tv/tv.c
patch
|
blob
|
history
diff --git
a/ir/tv/tv.c
b/ir/tv/tv.c
index
9808184
..
7bb4a87
100644
(file)
--- a/
ir/tv/tv.c
+++ b/
ir/tv/tv.c
@@
-1014,8
+1014,7
@@
ir_tarval *tarval_abs(ir_tarval *a)
return a;
case irms_float_number:
- if (fc_comp((const fp_value*) a->value,
- (const fp_value*) get_mode_null(a->mode)->value) == -1) {
+ if (fc_is_negative((fp_value const*)a)) {
fc_neg((const fp_value*) a->value, NULL);
return get_tarval_overflow(fc_get_buffer(), fc_get_buffer_length(), a->mode);
}