Code size issues on FP-emulation on libgcc compared to LLVM's compiler_rt
Joseph Myers
joseph@codesourcery.com
Wed Jul 1 16:15:00 GMT 2015
On Wed, 1 Jul 2015, Zinovy Nis wrote:
> Had anyone a chance to compare FP implementation in compiler_rt? I
> still wonder why the sizes differ so much, Incomplete implementation
> in compiler_rt?
> compiler_rt claims it is IEEE-compliant.
If you examine the implementation approaches, you will see that apart from
the compiler_rt code not being set up for rounding mode and exceptions
support (and in some cases, it can be hard to completely optimize generic
code as much as code that never has to consider those issues), it (for
addition) does normalization in one place, and swaps the arguments in one
place so as to know which has the larger magnitude, whereas soft-fp tries
to reduce the amount of processing in each case by only normalizing when
and to the extent needed and duplicating code for each choice of which
argument has the larger exponent (and having separate code for the case of
equal exponents).
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc
mailing list