This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Code size issues on FP-emulation on libgcc compared to LLVM's compiler_rt

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]