[LLVMdev] x86 rounding mode question
clattner at apple.com
Tue Sep 28 18:58:02 CDT 2010
On Sep 28, 2010, at 4:14 PM, Bob wrote:
> Is there a recommended way to round to the nearest whole (x86 RC field of FPU control = 00) ?
> It appears an intentional truncation instruction is generated (if ms disassembly is correct):
> %1 = fptosi double %0 to i64
> 00370025 fisttp qword ptr [esp]
We don't have great support for this. We support the rounding modes that C uses, but don't have the ability to control the rounding flags in the machine, and don't have a way to tell the optimizer that the program is fiddling with them.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the LLVMdev