[LLVMdev] rounding mode
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
> 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.
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev