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

How to use __addtf3?,Is gcc-3.1.1's -mlong-double-128 OK onlinuxppc?


Hi!

I found -mlong-double-128 in gcc-3.1.
I'd like to use long double-128 for some program.

__addtf3 is fp-bit.c,How to use it?
My system linuxppc.

 this is result

[root@g4mpkfukui Test-place]# gcc -mlong-double-128  size-1.c
size-1.c: In function `main':
size-1.c:4: Internal compiler error in easy_fp_constant, at config/rs6000/rs6000.c:1199
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
[root@g4mpkfukui Test-place]# 
----size-1.c------
#include <stdio.h>
int main()
{
	long double lda = 0.0;/* line 4*/

	printf("%d\n", sizeof(lda));
	return 0;
}
------------------
then I added -msoft-float,
this result is OK.

[root@g4mpkfukui Test-place]# gcc -mlong-double-128 -msoft-float  size-1.c 
[root@g4mpkfukui Test-place]# ./a.out                        
16
[root@g4mpkfukui Test-place]# 

However ,This is not good,How to use __addtf3?????

[root@g4mpkfukui Test-place]# gcc -mlong-double-128 -msoft-float  size-2.c 
/tmp/ccE7t7Yt.o: In function `main':
/tmp/ccE7t7Yt.o(.text+0xac): undefined reference to `__addtf3'
/tmp/ccE7t7Yt.o(.text+0xac): relocation truncated to fit: R_PPC_REL24 __addtf3
collect2: ld returned 1 exit status
[root@g4mpkfukui Test-place]# 
--------size-2.c-----------------
#include <stdio.h>
int main()
{
	long double lda = 0.0;
	long double ldb = 0.1;
	long double ldc;
	ldc = lda + ldb;

	printf("%d\n", sizeof(ldc));
	return 0;
}
===========================
[root@g4mpkfukui gcc-3.1.1]# grep -rn  __addtf3 *
gcc/libgcc-std.ver:21:  __addtf3
gcc/config/fp-bit.c:95:__addtf3 (){ abort(); }
[root@g4mpkfukui gcc-3.1.1]# 


[root@g4mpkfukui Test-place]# gcc -v
Reading specs from /usr/lib/gcc-lib/powerpc-unknown-linux-gnu/3.1.1/specs
Configured with: ../configure --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --disable-checking --enable-threads=posix --enable-altivec=no --prefix=/usr --with-system-zlib --host=powerpc-unknown-linux-gnu --enable-languages=c,c++,objc,f77,java
Thread model: posix
gcc version 3.1.1 20020524 (prerelease)
[root@g4mpkfukui Test-place]# 



fukui












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