projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
5028fbe
)
Fixed reading infinity floats from strings
author
Moritz Kroll
<Moritz.Kroll@gmx.de>
Thu, 19 Feb 2009 14:22:33 +0000
(14:22 +0000)
committer
Moritz Kroll
<Moritz.Kroll@gmx.de>
Thu, 19 Feb 2009 14:22:33 +0000
(14:22 +0000)
[r25528]
ir/tv/fltcalc.c
patch
|
blob
|
history
diff --git
a/ir/tv/fltcalc.c
b/ir/tv/fltcalc.c
index
412bbd8
..
41a02d7
100644
(file)
--- a/
ir/tv/fltcalc.c
+++ b/
ir/tv/fltcalc.c
@@
-1228,6
+1228,12
@@
fp_value *fc_cast(const fp_value *value, const ieee_descriptor_t *desc, fp_value
else
return fc_get_snan(desc, result);
}
+ else if(value->desc.clss == INF) {
+ if (value->sign == 0)
+ return fc_get_plusinf(desc, result);
+ else
+ return fc_get_minusinf(desc, result);
+ }
/* set the descriptor of the new value */
result->desc.exponent_size = desc->exponent_size;