[LLVMdev] x86 rounding mode question

Bob purchasebyemail1 at comcast.net
Tue Sep 28 16:14:34 PDT 2010


Hi,

 

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):

 

IRBuilder<>::CreateFPToSI

 

%1 = fptosi double %0 to i64

 

00370025  fisttp      qword ptr [esp]

 

Thanks,

Bob

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100928/42385881/attachment.html>


More information about the llvm-dev mailing list