Re: [PATCH v2] powerpc: Optimized conversion of IBM long double to int128/int64

2018-10-31 Thread Joseph Myers
On Wed, 31 Oct 2018, Rajalakshmi Srinivasaraghavan wrote: > On 10/25/2018 09:40 PM, Joseph Myers wrote: > > On Thu, 25 Oct 2018, Rajalakshmi Srinivasaraghavan wrote: > > > > > + if (__builtin_unpack_longdouble (a, 0) < TWO53) > > > +{ > > > + /* In this case the integer portion is compl

Re: [PATCH v2] powerpc: Optimized conversion of IBM long double to int128/int64

2018-10-31 Thread Rajalakshmi Srinivasaraghavan
On 10/25/2018 09:40 PM, Joseph Myers wrote: On Thu, 25 Oct 2018, Rajalakshmi Srinivasaraghavan wrote: + if (__builtin_unpack_longdouble (a, 0) < TWO53) +{ + /* In this case the integer portion is completely contained + within the high double. So use the hardware convert to

Re: [PATCH v2] powerpc: Optimized conversion of IBM long double to int128/int64

2018-10-25 Thread Joseph Myers
On Thu, 25 Oct 2018, Rajalakshmi Srinivasaraghavan wrote: > + if (__builtin_unpack_longdouble (a, 0) < TWO53) > +{ > + /* In this case the integer portion is completely contained > + within the high double. So use the hardware convert to > + integer doubleword, and then

[PATCH v2] powerpc: Optimized conversion of IBM long double to int128/int64

2018-10-25 Thread Rajalakshmi Srinivasaraghavan
This new implementation of fixunstfdi and fixunstfti gives 16X performance improvement. The design is focused on: - Making sure the end result was a pure leaf function that only needed builtins or inline functions. - Assumed power8 direct register transfer and accessed the IBM long double as in