[LLVMdev] rounding mode

Chris Lattner sabre at nondot.org
Tue Jun 24 22:38:14 PDT 2008


On Jun 24, 2008, at 11:58 AM, Chuck Rose III wrote:
> Hello LLVMers,
>
> A question.  In our system we often go from
>
> our-system -> LLVM generated functions -> callback functions in our  
> system
>
> Is it the case that we can rely on the rounding mode being the same  
> on both sides of the LLVM generated functions or can generated  
> functions change the rounding mode and not restore it prior to  
> calling another function which may or may not be one generated via  
> LLVM?  In our system, all our APFloats use the default rounding mode.

Hey Chuck,

The rounding mode is part of the platform ABI and LLVM conforms to  
it.  The ABI specifies that the rounding mode is always set to default  
on entry/exit of functions.  You can be sure that if llvm changes the  
rounding mode (e.g. in certain int <-> fp conversions) that it changes  
it back before calling a function or returning.

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


More information about the llvm-dev mailing list