This is the mail archive of the gcc-bugs@gcc.gnu.org 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]

[Bug libgcc/66382] POWER8 Vector optimized implementation of __float128 (IEEE754 128-bit Binary Floating Point)


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66382

--- Comment #3 from dan.parrot at mail dot com ---
I am trying to configure gcc so that instead of generating instructions 
that use the hardware floating point unit, it will generate instructions 
that utilize integer operations to emulate floating point operations.

The description of the bug by David Edelsohn on Bugzilla implies that 
such emulation is currently available and would be made more efficient 
if integer operations are replaced by vector operations. It is this 
replacement that I'm trying to effect.

However, I am still unable to get gcc to compile a very simple program 
when passed the -msoft-float option. Here is the program (test.c)

======================
#include <math.h>
#include <stdlib.h>
#include <stdio.h>

int
main()
{
     printf("\n No. of bytes in a long double is %d.\n", sizeof(long 
double));

     long double x = 5.55L;
     long double y = -5.56L;

     long double z = x + y;
     long double w = x - y;
     printf("\n Sum   : \n x = %Lf \n y = %Lf \n z = %Lf \n", x, y, z);
     printf("\n Diff. : \n x = %Lf \n y = %Lf \n w = %llf \n", x, y, w);

     return (int)(z + w);
}
=======================

Without the -msoft-float flag to gcc, it prints the expected result.

With the -msoft-float flag, linking fails.

My questions is this: Can you successfully compile the simple program 
above in any version of gcc? If yes, what is the output of "gcc -v"? If 
not, does it mean there is in fact no software emulation available?

Thanks.
Dan.

On 03/14/2016 03:43 PM, munroesj at us dot ibm.com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66382
>
> --- Comment #2 from Steven Munroe <munroesj at us dot ibm.com> ---
> What is the issue? You want to configure __float128 without also configuring
> altivec/VMX/VSX?
>
> The PowerPC 64-bit ABI is defined to pass __float128 values in 128-bit vector
> registers and return _float128 values in VR2.
>
> How parameters are passed is independent of the computation.
>

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