Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
69b619f9
Commit
69b619f9
authored
Feb 13, 2016
by
Matthias Braun
Browse files
fltcalc: Report negative overflow intead of bad when converting negative number to unsigned int
parent
e293c971
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/tv/fltcalc.c
View file @
69b619f9
...
...
@@ -1128,10 +1128,8 @@ flt2int_result_t fc_flt2int(const fp_value *a, sc_word *result,
:
FLT2INT_POSITIVE_OVERFLOW
;
case
FC_SUBNORMAL
:
case
FC_NORMAL
:
if
(
a
->
sign
&&
!
result_signed
)
{
/* FIXME: for now we cannot convert this */
return
FLT2INT_BAD
;
}
if
(
a
->
sign
&&
!
result_signed
)
return
FLT2INT_NEGATIVE_OVERFLOW
;
unsigned
tgt_bits
=
result_bits
-
result_signed
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment