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

2016-03-06 Thread dan.parrot at mail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66382

dan.parrot at mail dot com changed:

   What|Removed |Added

 CC||dan.parrot at mail dot com

--- Comment #1 from dan.parrot at mail dot com ---
Could you provide the options to ./configure which build gcc while allowing
flag -msoft-float and type __float128 to co-exist? Or is changing the code to
allow that combination part of the task here?

I have been unable to configure a build that accepts them (-msoft-float and
__float128) together.

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

2016-03-14 Thread dan.parrot at mail dot com
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 
#include 
#include 

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  ---
> 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.
>