Hi, during debugging of code compiled by means of
OSELAS.Toolchain-2013.12.1/arm-cortexa8-linux-gnueabihf/gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized
for procesoor TI AM3558, I get a strange behavoiur for double to float
conversion.
//cValue.getValue() returns double
float floatValue=static_cast<float>(cValue.getValue());
and when cValue.getValue() = 5.0 then after conversion floatValue =
8.40779079e-45 and it seams, that the conversion doesn't work.
when I only add a line with simple assigning to double variable at the
same branch after the conversion line, after compilation, float values
work fine.
float floatValue=static_cast<float>(cValue.getValue());
double doubleValue=cValue.getValue();
I get doubleValue = 5.0 and floatValue = 5.0
How compiler decides, which instructions of NEON or VFP choose, or does it
use a "hard-float" at all in this case. Why it does work with an extra
line of code with assignig a float value to double value?
Best regards,
Piotr Mason
Tel.:
Fax: +48 32 270-45-17
Mobile: +48 600 476 068
E-mail: [email protected]
_______________________________________________
ptxdist mailing list
[email protected]