This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Calls to qp float lib out of sparcv9 head compiler
- From: Olivier Hainque <hainque at ACT-Europe dot FR>
- To: gcc at gcc dot gnu dot org
- Date: 26 Feb 2002 16:38:58 +0100
- Subject: Calls to qp float lib out of sparcv9 head compiler
Hello,
With 3.1 20020225 (experimental), configured for sparcv9-solaris2.8, the
output for the source below with -m64 contains calls to some qp float
library functions.
These calls seem unnecessary to me, and they actually are a problem for
vxworks targets as these functions are not available. -mhard-quad-float is
not an possible option for our target.
The WindRiver compiler's output for sparc64-vxworks is provided for comparison
purposes.
Any help/comment would be greatly appreciated. If this turns out to be a bug,
I can sure setup a more "formal" report and send to the appropriate list.
Thanks in advance,
Kind Regards,
Olivier
--
int main (void)
{
long double X = 0.0;
long double Y = 1.0;
unsigned long V1 = (unsigned long) (X);
unsigned long long V2 = (unsigned long long) (X);
return 0;
}
With a recent 3.1 head, configured with :
--host=sparc-sun-solaris2.8 --target=sparcv9-sun-solaris2.8
--enable-languages=c --disable-nls
$ ./cc1 -O2 -m64 ttx.c -o -
...
main:
!#PROLOGUE# 0
save %sp, -208, %sp
!#PROLOGUE# 1
sethi %hh(.LLC0), %o1
sethi %lm(.LLC0), %o2
or %o1, %hm(.LLC0), %o1
add %fp, 2015, %l2
sllx %o1, 32, %o1
mov %l2, %o0
add %o1, %o2, %o1
mov 0, %i0
ldx [%o1+%lo(.LLC0)], %l0
ldx [%o1+%lo(.LLC0+8)], %l1
stx %l0, [%fp+2015]
call _Qp_qtoux, 0 <=======
stx %l1, [%fp+2023]
stx %l0, [%fp+2015]
stx %l1, [%fp+2023]
call _Qp_qtoux, 0 <=======
mov %l2, %o0
return %i7+8
nop
With our cross targetted to vxworks, we get :
$ sparc64-wrs-vxworks-gcc -m64 -O2 -S -o - ttx.c
...
main:
!#PROLOGUE# 0
save %sp, -224, %sp
!#PROLOGUE# 1
sethi %hi(.LLC0), %o1
add %fp, -32, %o0
or %o1, %lo(.LLC0), %o1
mov 0, %i0
call _Qp_dtoq, 0 <========
ldd [%o1], %f2
ldx [%fp-32], %o0
ldx [%fp-24], %o1
stx %o0, [%fp-48]
stx %o1, [%fp-40]
call _Qp_qtoux, 0 <========
add %fp, -48, %o0
return %i7+8
nop
.LLfe1:
.size main,.LLfe1-main
With WRS compiler, we have the following at O0 :
$ ccsparc64 -m64 -S -o - ttx.c
...
main:
!#PROLOGUE# 0
save %sp, -224, %sp
!#PROLOGUE# 1
sethi %hi(.LLC0), %o1
or %o1, %lo(.LLC0), %o0
ldx [%o0], %o1
stx %o1, [%fp-24]
sethi %hi(.LLC1), %o1
or %o1, %lo(.LLC1), %o0
ldx [%o0], %o1
stx %o1, [%fp-32]
ldd [%fp-24], %f4
fdtox %f4, %f2
st %f3, [%fp-36]
ldd [%fp-24], %f0
call __fixunsdfdi, 0
nop
stx %o0, [%fp-48]
mov 0, %i0
ba,pt %xcc, .LL2
nop
and with O2 : (!)
main:
!#PROLOGUE# 0
!#PROLOGUE# 1
retl
mov 0, %o0