TImode for libgcc2.c on Alpha
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Sat Apr 15 09:37:00 GMT 2000
The function in libgcc2.c really need to be TImode (to support bitsizetype)
calculations, among other things, so I comittd the following:
Sat Apr 15 10:59:19 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* configure.in (alpha*-*-*): Aad config/alpha/t-alpha.
* configure: Rebuilt.
* libgcc2.c (__fixunstfDI): Renamed from __fixunstfdi.
(__fixunsxfDI): Renamed from __fixunsxfdi.
(__fixunsdfDI): Renamed from __fixunsdfdi.
(__fixunssfDI): Renamed from __fixunssfdi.
(__floatdisf): Use proper type in REP_BIT macro.
(__fixunsxfSI): Renamed from __fixunsxfsi.
(__fixunsdfSI): Renamed from __fixunsdfsi.
(__fixunssfSI): Renamed from __fixunssfsi.
* libgcc2.h: Add cases for MIN_UNITS_PER_WORD > 4.
Change location of macros and upper-case some names as above.
* longlong.h ([alpha]): Use PARAMS, not __P in decl of __udiv__qrnnd.
* config/alpha/t-alpha, config/alpha/qrnnd.asm: New files.
*** configure 2000/04/08 14:29:51 1.349
--- configure 2000/04/15 15:35:17
*** 3329,3333 ****
xm_file="alpha/xm-alpha-interix.h xm-interix.h"
xmake_file="x-interix alpha/t-pe"
! tmake_file="alpha/t-interix alpha/t-ieee"
if test x$enable_threads = xyes ; then
thread_file='posix'
--- 3329,3333 ----
xm_file="alpha/xm-alpha-interix.h xm-interix.h"
xmake_file="x-interix alpha/t-pe"
! tmake_file="alpha/t-alpha alpha/t-interix alpha/t-ieee"
if test x$enable_threads = xyes ; then
thread_file='posix'
*************** for machine in $build $host $target; do
*** 3342,3346 ****
tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
target_cpu_default="MASK_GAS"
! tmake_file="alpha/t-ieee"
gas=no
xmake_file=none
--- 3342,3346 ----
tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
target_cpu_default="MASK_GAS"
! tmake_file="alpha/t-alpha alpha/t-ieee"
gas=no
xmake_file=none
*************** for machine in $build $host $target; do
*** 3350,3354 ****
tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
target_cpu_default="MASK_GAS"
! tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux alpha/t-crtbe alpha/t-ieee"
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
xmake_file=none
--- 3350,3354 ----
tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
target_cpu_default="MASK_GAS"
! tmake_file="t-linux t-linux-gnulibc1 alpha/t-alpha alpha/t-linux alpha/t-crtbe alpha/t-ieee"
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
xmake_file=none
*************** for machine in $build $host $target; do
*** 3361,3365 ****
tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
target_cpu_default="MASK_GAS"
! tmake_file="t-linux alpha/t-linux alpha/t-crtbe alpha/t-ieee"
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
xmake_file=none
--- 3361,3365 ----
tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
target_cpu_default="MASK_GAS"
! tmake_file="t-linux alpha/t-linux alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
xmake_file=none
*************** for machine in $build $host $target; do
*** 3372,3376 ****
tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsd-elf.h"
target_cpu_default="MASK_GAS"
! tmake_file="alpha/t-crtbe alpha/t-ieee"
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
xmake_file=none
--- 3372,3376 ----
tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsd-elf.h"
target_cpu_default="MASK_GAS"
! tmake_file="alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
xmake_file=none
*************** for machine in $build $host $target; do
*** 3381,3385 ****
# default x-alpha is only appropriate for dec-osf.
target_cpu_default="MASK_GAS"
! tmake_file="alpha/t-ieee"
;;
--- 3381,3385 ----
# default x-alpha is only appropriate for dec-osf.
target_cpu_default="MASK_GAS"
! tmake_file="alpha/t-alpha alpha/t-ieee"
;;
*************** for machine in $build $host $target; do
*** 3394,3398 ****
fi
use_collect2=yes
! tmake_file="alpha/t-ieee"
case $machine in
*-*-osf1*)
--- 3394,3398 ----
fi
use_collect2=yes
! tmake_file="alpha/t-alpha alpha/t-ieee"
case $machine in
*-*-osf1*)
*************** for machine in $build $host $target; do
*** 3420,3424 ****
alpha*-*-vxworks*)
tm_file="${tm_file} dbx.h alpha/vxworks.h"
! tmake_file="alpha/t-ieee"
if x$gas != xyes
then
--- 3420,3424 ----
alpha*-*-vxworks*)
tm_file="${tm_file} dbx.h alpha/vxworks.h"
! tmake_file="alpha/t-alpha alpha/t-ieee"
if x$gas != xyes
then
*************** for machine in $build $host $target; do
*** 3431,3435 ****
tm_file="${tm_file} alpha/alpha32.h alpha/win-nt.h winnt/win-nt.h"
xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
! tmake_file="t-libc-ok alpha/t-ieee"
xmake_file=winnt/x-winnt
extra_host_objs=oldnames.o
--- 3431,3435 ----
tm_file="${tm_file} alpha/alpha32.h alpha/win-nt.h winnt/win-nt.h"
xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
! tmake_file="t-libc-ok alpha/t-alpha alpha/t-ieee"
xmake_file=winnt/x-winnt
extra_host_objs=oldnames.o
*************** for machine in $build $host $target; do
*** 3446,3450 ****
tm_file=alpha/vms.h
xm_file="${xm_file} alpha/xm-vms.h"
! tmake_file="alpha/t-vms alpha/t-ieee"
;;
arc-*-elf*)
--- 3446,3450 ----
tm_file=alpha/vms.h
xm_file="${xm_file} alpha/xm-vms.h"
! tmake_file="alpha/t-alpha alpha/t-vms alpha/t-ieee"
;;
arc-*-elf*)
*************** for machine in $build $host $target; do
*** 3558,3562 ****
tm_file=arm/pe.h
tmake_file=arm/t-pe
! extra_objs=pe.o
;;
avr-*-*)
--- 3558,3562 ----
tm_file=arm/pe.h
tmake_file=arm/t-pe
! extra_objs="pe.o"
;;
avr-*-*)
*************** for machine in $build $host $target; do
*** 5724,5727 ****
--- 5724,5733 ----
tmake_file=rs6000/t-xnewas
else
+ tmake_file=rs6000/t-newas
+ fi
+ if test "$gnu_ld" = yes
+ then
+ xmake_file=rs6000/x-aix41-gld
+ else
tmake_file="rs6000/t-newas rs6000/t-aix41"
fi
*** configure.in 2000/04/08 14:29:51 1.353
--- configure.in 2000/04/15 15:35:34
*************** changequote([,])dnl
*** 600,604 ****
xm_file="alpha/xm-alpha-interix.h xm-interix.h"
xmake_file="x-interix alpha/t-pe"
! tmake_file="alpha/t-interix alpha/t-ieee"
if test x$enable_threads = xyes ; then
thread_file='posix'
--- 600,604 ----
xm_file="alpha/xm-alpha-interix.h xm-interix.h"
xmake_file="x-interix alpha/t-pe"
! tmake_file="alpha/t-alpha alpha/t-interix alpha/t-ieee"
if test x$enable_threads = xyes ; then
thread_file='posix'
*************** changequote([,])dnl
*** 613,617 ****
tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
target_cpu_default="MASK_GAS"
! tmake_file="alpha/t-ieee"
gas=no
xmake_file=none
--- 613,617 ----
tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
target_cpu_default="MASK_GAS"
! tmake_file="alpha/t-alpha alpha/t-ieee"
gas=no
xmake_file=none
*************** changequote([,])dnl
*** 621,625 ****
tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
target_cpu_default="MASK_GAS"
! tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux alpha/t-crtbe alpha/t-ieee"
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
xmake_file=none
--- 621,625 ----
tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
target_cpu_default="MASK_GAS"
! tmake_file="t-linux t-linux-gnulibc1 alpha/t-alpha alpha/t-linux alpha/t-crtbe alpha/t-ieee"
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
xmake_file=none
*************** changequote([,])dnl
*** 632,636 ****
tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
target_cpu_default="MASK_GAS"
! tmake_file="t-linux alpha/t-linux alpha/t-crtbe alpha/t-ieee"
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
xmake_file=none
--- 632,636 ----
tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
target_cpu_default="MASK_GAS"
! tmake_file="t-linux alpha/t-linux alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
xmake_file=none
*************** changequote([,])dnl
*** 643,647 ****
tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsd-elf.h"
target_cpu_default="MASK_GAS"
! tmake_file="alpha/t-crtbe alpha/t-ieee"
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
xmake_file=none
--- 643,647 ----
tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsd-elf.h"
target_cpu_default="MASK_GAS"
! tmake_file="alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
xmake_file=none
*************** changequote([,])dnl
*** 652,656 ****
# default x-alpha is only appropriate for dec-osf.
target_cpu_default="MASK_GAS"
! tmake_file="alpha/t-ieee"
;;
--- 652,656 ----
# default x-alpha is only appropriate for dec-osf.
target_cpu_default="MASK_GAS"
! tmake_file="alpha/t-alpha alpha/t-ieee"
;;
*************** changequote([,])dnl
*** 665,669 ****
fi
use_collect2=yes
! tmake_file="alpha/t-ieee"
case $machine in
*-*-osf1*)
--- 665,669 ----
fi
use_collect2=yes
! tmake_file="alpha/t-alpha alpha/t-ieee"
case $machine in
*-*-osf1*)
*************** changequote([,])dnl
*** 695,699 ****
alpha*-*-vxworks*)
tm_file="${tm_file} dbx.h alpha/vxworks.h"
! tmake_file="alpha/t-ieee"
if [ x$gas != xyes ]
then
--- 695,699 ----
alpha*-*-vxworks*)
tm_file="${tm_file} dbx.h alpha/vxworks.h"
! tmake_file="alpha/t-alpha alpha/t-ieee"
if [ x$gas != xyes ]
then
*************** changequote([,])dnl
*** 706,710 ****
tm_file="${tm_file} alpha/alpha32.h alpha/win-nt.h winnt/win-nt.h"
xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
! tmake_file="t-libc-ok alpha/t-ieee"
xmake_file=winnt/x-winnt
extra_host_objs=oldnames.o
--- 706,710 ----
tm_file="${tm_file} alpha/alpha32.h alpha/win-nt.h winnt/win-nt.h"
xm_file="${xm_file} config/winnt/xm-winnt.h alpha/xm-winnt.h"
! tmake_file="t-libc-ok alpha/t-alpha alpha/t-ieee"
xmake_file=winnt/x-winnt
extra_host_objs=oldnames.o
*************** changequote([,])dnl
*** 721,725 ****
tm_file=alpha/vms.h
xm_file="${xm_file} alpha/xm-vms.h"
! tmake_file="alpha/t-vms alpha/t-ieee"
;;
arc-*-elf*)
--- 721,725 ----
tm_file=alpha/vms.h
xm_file="${xm_file} alpha/xm-vms.h"
! tmake_file="alpha/t-alpha alpha/t-vms alpha/t-ieee"
;;
arc-*-elf*)
*** libgcc2.c 2000/03/23 12:14:06 1.89
--- libgcc2.c 2000/04/15 15:35:48
*************** __lshrdi3 (DWtype u, word_type b)
*** 90,100 ****
{
w.s.high = 0;
! w.s.low = (UWtype)uu.s.high >> -bm;
}
else
{
! UWtype carries = (UWtype)uu.s.high << bm;
! w.s.high = (UWtype)uu.s.high >> b;
! w.s.low = ((UWtype)uu.s.low >> b) | carries;
}
--- 90,101 ----
{
w.s.high = 0;
! w.s.low = (UWtype) uu.s.high >> -bm;
}
else
{
! UWtype carries = (UWtype) uu.s.high << bm;
!
! w.s.high = (UWtype) uu.s.high >> b;
! w.s.low = ((UWtype) uu.s.low >> b) | carries;
}
*************** __ashldi3 (DWtype u, word_type b)
*** 120,130 ****
{
w.s.low = 0;
! w.s.high = (UWtype)uu.s.low << -bm;
}
else
{
! UWtype carries = (UWtype)uu.s.low >> bm;
! w.s.low = (UWtype)uu.s.low << b;
! w.s.high = ((UWtype)uu.s.high << b) | carries;
}
--- 121,132 ----
{
w.s.low = 0;
! w.s.high = (UWtype) uu.s.low << -bm;
}
else
{
! UWtype carries = (UWtype) uu.s.low >> bm;
!
! w.s.low = (UWtype) uu.s.low << b;
! w.s.high = ((UWtype) uu.s.high << b) | carries;
}
*************** __ashrdi3 (DWtype u, word_type b)
*** 155,161 ****
else
{
! UWtype carries = (UWtype)uu.s.high << bm;
w.s.high = uu.s.high >> b;
! w.s.low = ((UWtype)uu.s.low >> b) | carries;
}
--- 157,164 ----
else
{
! UWtype carries = (UWtype) uu.s.high << bm;
!
w.s.high = uu.s.high >> b;
! w.s.low = ((UWtype) uu.s.low >> b) | carries;
}
*************** __ucmpdi2 (DWtype a, DWtype b)
*** 669,673 ****
DWtype
! __fixunstfdi (TFtype a)
{
TFtype b;
--- 672,676 ----
DWtype
! __fixunstfDI (TFtype a)
{
TFtype b;
*************** __fixtfdi (TFtype a)
*** 701,706 ****
{
if (a < 0)
! return - __fixunstfdi (-a);
! return __fixunstfdi (a);
}
#endif
--- 704,709 ----
{
if (a < 0)
! return - __fixunstfDI (-a);
! return __fixunstfDI (a);
}
#endif
*************** __fixtfdi (TFtype a)
*** 711,715 ****
DWtype
! __fixunsxfdi (XFtype a)
{
XFtype b;
--- 714,718 ----
DWtype
! __fixunsxfDI (XFtype a)
{
XFtype b;
*************** __fixxfdi (XFtype a)
*** 743,748 ****
{
if (a < 0)
! return - __fixunsxfdi (-a);
! return __fixunsxfdi (a);
}
#endif
--- 746,751 ----
{
if (a < 0)
! return - __fixunsxfDI (-a);
! return __fixunsxfDI (a);
}
#endif
*************** __fixxfdi (XFtype a)
*** 753,757 ****
DWtype
! __fixunsdfdi (DFtype a)
{
DFtype b;
--- 756,760 ----
DWtype
! __fixunsdfDI (DFtype a)
{
DFtype b;
*************** __fixdfdi (DFtype a)
*** 785,790 ****
{
if (a < 0)
! return - __fixunsdfdi (-a);
! return __fixunsdfdi (a);
}
#endif
--- 788,793 ----
{
if (a < 0)
! return - __fixunsdfDI (-a);
! return __fixunsdfDI (a);
}
#endif
*************** __fixdfdi (DFtype a)
*** 795,799 ****
DWtype
! __fixunssfdi (SFtype original_a)
{
/* Convert the SFtype to a DFtype, because that is surely not going
--- 798,802 ----
DWtype
! __fixunssfDI (SFtype original_a)
{
/* Convert the SFtype to a DFtype, because that is surely not going
*************** __fixunssfdi (SFtype original_a)
*** 814,818 ****
v <<= WORD_SIZE;
/* Remove high part from the DFtype, leaving the low part as flonum. */
! a -= (DFtype)v;
/* Convert that to fixed (but not to DWtype!) and add it in.
Sometimes A comes out negative. This is significant, since
--- 817,821 ----
v <<= WORD_SIZE;
/* Remove high part from the DFtype, leaving the low part as flonum. */
! a -= (DFtype) v;
/* Convert that to fixed (but not to DWtype!) and add it in.
Sometimes A comes out negative. This is significant, since
*************** __fixsfdi (SFtype a)
*** 831,836 ****
{
if (a < 0)
! return - __fixunssfdi (-a);
! return __fixunssfdi (a);
}
#endif
--- 834,839 ----
{
if (a < 0)
! return - __fixunssfDI (-a);
! return __fixunssfDI (a);
}
#endif
*************** __floatdisf (DWtype u)
*** 944,952 ****
&& DF_SIZE > (DI_SIZE - DF_SIZE + SF_SIZE))
{
! #define REP_BIT ((UWtype) 1 << (DI_SIZE - DF_SIZE))
if (! (- ((DWtype) 1 << DF_SIZE) < u
&& u < ((DWtype) 1 << DF_SIZE)))
{
! if ((UWtype) u & (REP_BIT - 1))
u |= REP_BIT;
}
--- 947,955 ----
&& DF_SIZE > (DI_SIZE - DF_SIZE + SF_SIZE))
{
! #define REP_BIT ((UDWtype) 1 << (DI_SIZE - DF_SIZE))
if (! (- ((DWtype) 1 << DF_SIZE) < u
&& u < ((DWtype) 1 << DF_SIZE)))
{
! if ((UDWtype) u & (REP_BIT - 1))
u |= REP_BIT;
}
*************** __floatdisf (DWtype u)
*** 975,979 ****
UWtype
! __fixunsxfsi (XFtype a)
{
if (a >= - (DFtype) LONG_MIN)
--- 978,982 ----
UWtype
! __fixunsxfSI (XFtype a)
{
if (a >= - (DFtype) LONG_MIN)
*************** __fixunsxfsi (XFtype a)
*** 997,1001 ****
UWtype
! __fixunsdfsi (DFtype a)
{
if (a >= - (DFtype) LONG_MIN)
--- 1000,1004 ----
UWtype
! __fixunsdfSI (DFtype a)
{
if (a >= - (DFtype) LONG_MIN)
*************** __fixunsdfsi (DFtype a)
*** 1019,1023 ****
UWtype
! __fixunssfsi (SFtype a)
{
if (a >= - (SFtype) LONG_MIN)
--- 1022,1026 ----
UWtype
! __fixunssfSI (SFtype a)
{
if (a >= - (SFtype) LONG_MIN)
*** libgcc2.h 2000/03/27 11:43:01 1.4
--- libgcc2.h 2000/04/15 15:35:52
*************** typedef unsigned int USItype __attribute
*** 100,105 ****
--- 100,110 ----
typedef int DItype __attribute__ ((mode (DI)));
typedef unsigned int UDItype __attribute__ ((mode (DI)));
+ #if MIN_UNITS_PER_WORD > 4
+ /* These typedefs are usually forbidden on archs with UNITS_PER_WORD 4 */
+ typedef int TItype __attribute__ ((mode (TI)));
+ typedef unsigned int UTItype __attribute__ ((mode (TI)));
#endif
#endif
+ #endif
#if BITS_PER_UNIT == 8
*************** typedef int word_type __attribute__ ((mo
*** 154,158 ****
#define double bogus_type
! #if MIN_UNITS_PER_WORD > 2
#define W_TYPE_SIZE (4 * BITS_PER_UNIT)
#define Wtype SItype
--- 159,173 ----
#define double bogus_type
! #if MIN_UNITS_PER_WORD > 4
! #define W_TYPE_SIZE (8 * BITS_PER_UNIT)
! #define Wtype DItype
! #define UWtype UDItype
! #define HWtype DItype
! #define UHWtype UDItype
! #define DWtype TItype
! #define UDWtype UTItype
! #define __NW(a,b) __ ## a ## di ## b
! #define __NDW(a,b) __ ## a ## ti ## b
! #elif MIN_UNITS_PER_WORD > 2
#define W_TYPE_SIZE (4 * BITS_PER_UNIT)
#define Wtype SItype
*************** typedef int word_type __attribute__ ((mo
*** 186,189 ****
--- 201,234 ----
#endif
+ #define __muldi3 __NDW(mul,3)
+ #define __divdi3 __NDW(div,3)
+ #define __udivdi3 __NDW(udiv,3)
+ #define __moddi3 __NDW(mod,3)
+ #define __umoddi3 __NDW(umod,3)
+ #define __negdi2 __NDW(neg,2)
+ #define __lshrdi3 __NDW(lshr,3)
+ #define __ashldi3 __NDW(ashl,3)
+ #define __ashrdi3 __NDW(ashr,3)
+ #define __ffsdi2 __NDW(ffs,2)
+ #define __cmpdi2 __NDW(cmp,2)
+ #define __ucmpdi2 __NDW(ucmp,2)
+ #define __udivmoddi4 __NDW(udivmod,4)
+ #define __fixunstfDI __NDW(fixunstf,)
+ #define __fixtfdi __NDW(fixtf,)
+ #define __fixunsxfDI __NDW(fixunsxf,)
+ #define __fixxfdi __NDW(fixxf,)
+ #define __fixunsdfDI __NDW(fixunsdf,)
+ #define __fixdfdi __NDW(fixdf,)
+ #define __fixunssfDI __NDW(fixunssf,)
+ #define __fixsfdi __NDW(fixsf,)
+ #define __floatdixf __NDW(float,xf)
+ #define __floatditf __NDW(float,tf)
+ #define __floatdidf __NDW(float,df)
+ #define __floatdisf __NDW(float,sf)
+ #define __fixunsxfSI __NW(fixunsxf,)
+ #define __fixunstfSI __NW(fixunstf,)
+ #define __fixunsdfSI __NW(fixunsdf,)
+ #define __fixunssfSI __NW(fixunssf,)
+
extern DWtype __muldi3 (DWtype, DWtype);
extern DWtype __divdi3 (DWtype, DWtype);
*************** extern UDWtype __udivdi3 (UDWtype, UDWty
*** 191,194 ****
--- 236,240 ----
extern UDWtype __umoddi3 (UDWtype, UDWtype);
extern DWtype __moddi3 (DWtype, DWtype);
+
/* __udivmoddi4 is static inline when building other libgcc2 portions. */
#if (!defined (L_udivdi3) && !defined (L_divdi3) && \
*************** extern DWtype __fixsfdi (SFtype);
*** 221,272 ****
extern DFtype __floatdidf (DWtype);
extern SFtype __floatdisf (DWtype);
! extern UWtype __fixunsdfsi (DFtype);
! extern UWtype __fixunssfsi (SFtype);
! extern DWtype __fixunsdfdi (DFtype);
! extern DWtype __fixunssfdi (SFtype);
#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 96
extern DWtype __fixxfdi (XFtype);
! extern DWtype __fixunsxfdi (XFtype);
extern XFtype __floatdixf (DWtype);
! extern UWtype __fixunsxfsi (XFtype);
#endif
#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128
! extern DWtype __fixunstfdi (TFtype);
extern DWtype __fixtfdi (TFtype);
extern TFtype __floatditf (DWtype);
#endif
#endif /* BITS_PER_UNIT == 8 */
-
- #define __muldi3 __NDW(mul,3)
- #define __divdi3 __NDW(div,3)
- #define __udivdi3 __NDW(udiv,3)
- #define __moddi3 __NDW(mod,3)
- #define __umoddi3 __NDW(umod,3)
- #define __negdi2 __NDW(neg,2)
- #define __lshrdi3 __NDW(lshr,3)
- #define __ashldi3 __NDW(ashl,3)
- #define __ashrdi3 __NDW(ashr,3)
- #define __ffsdi2 __NDW(ffs,2)
- #define __cmpdi2 __NDW(cmp,2)
- #define __ucmpdi2 __NDW(ucmp,2)
- #define __udivmoddi4 __NDW(udivmod,4)
- #define __fixunstfdi __NDW(fixunstf,)
- #define __fixtfdi __NDW(fixtf,)
- #define __fixunsxfdi __NDW(fixunsxf,)
- #define __fixxfdi __NDW(fixxf,)
- #define __fixunsdfdi __NDW(fixunsdf,)
- #define __fixdfdi __NDW(fixdf,)
- #define __fixunssfdi __NDW(fixunssf,)
- #define __fixsfdi __NDW(fixsf,)
- #define __floatdixf __NDW(float,xf)
- #define __floatditf __NDW(float,tf)
- #define __floatdidf __NDW(float,df)
- #define __floatdisf __NDW(float,sf)
- #define __fixunsxfsi __NW(fixunsxf,)
- #define __fixunstfsi __NW(fixunstf,)
- #define __fixunsdfsi __NW(fixunsdf,)
- #define __fixunssfsi __NW(fixunssf,)
/* DWstructs are pairs of Wtype values in the order determined by
--- 267,288 ----
extern DFtype __floatdidf (DWtype);
extern SFtype __floatdisf (DWtype);
! extern UWtype __fixunsdfSI (DFtype);
! extern UWtype __fixunssfSI (SFtype);
! extern DWtype __fixunsdfDI (DFtype);
! extern DWtype __fixunssfDI (SFtype);
#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 96
extern DWtype __fixxfdi (XFtype);
! extern DWtype __fixunsxfDI (XFtype);
extern XFtype __floatdixf (DWtype);
! extern UWtype __fixunsxfSI (XFtype);
#endif
#if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128
! extern DWtype __fixunstfDI (TFtype);
extern DWtype __fixtfdi (TFtype);
extern TFtype __floatditf (DWtype);
#endif
#endif /* BITS_PER_UNIT == 8 */
/* DWstructs are pairs of Wtype values in the order determined by
*** longlong.h 2000/02/17 04:40:47 1.17
--- longlong.h 2000/04/15 15:36:03
***************
*** 169,173 ****
(r) = __r; \
} while (0)
! extern UDItype __udiv_qrnnd __P ((UDItype *, UDItype, UDItype, UDItype));
#define UDIV_TIME 220
#endif /* LONGLONG_STANDALONE */
--- 169,173 ----
(r) = __r; \
} while (0)
! extern UDItype __udiv_qrnnd PARAMS ((UDItype *, UDItype, UDItype, UDItype));
#define UDIV_TIME 220
#endif /* LONGLONG_STANDALONE */
*** /dev/null Thu Mar 2 21:48:59 2000
--- config/alpha/qrnnd.asm Sat Apr 15 06:23:19 2000
***************
*** 0 ****
--- 1,163 ----
+ # Alpha 21064 __udiv_qrnnd
+ # Copyright (C) 1992, 1994, 1995, 2000 Free Software Foundation, Inc.
+
+ # This file is part of GCC.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # In addition to the permissions in the GNU General Public License, the
+ # Free Software Foundation gives you unlimited permission to link the
+ # compiled version of this file with other programs, and to distribute
+ # those programs without any restriction coming from the use of this
+ # file. (The General Public License restrictions do apply in other
+ # respects; for example, they cover modification of the file, and
+ # distribution when not linked into another program.)
+
+ # This file is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU General Public License
+ # along with GCC; see the file COPYING. If not, write to the
+ # Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
+
+ .set noreorder
+ .set noat
+
+ .text
+
+ .globl __udiv_qrnnd
+ .ent __udiv_qrnnd
+ __udiv_qrnnd:
+ .frame $30,0,$26,0
+ .prologue 0
+
+ #define cnt $2
+ #define tmp $3
+ #define rem_ptr $16
+ #define n1 $17
+ #define n0 $18
+ #define d $19
+ #define qb $20
+ #define AT $at
+
+ ldiq cnt,16
+ blt d,$largedivisor
+
+ $loop1: cmplt n0,0,tmp
+ addq n1,n1,n1
+ bis n1,tmp,n1
+ addq n0,n0,n0
+ cmpule d,n1,qb
+ subq n1,d,tmp
+ cmovne qb,tmp,n1
+ bis n0,qb,n0
+ cmplt n0,0,tmp
+ addq n1,n1,n1
+ bis n1,tmp,n1
+ addq n0,n0,n0
+ cmpule d,n1,qb
+ subq n1,d,tmp
+ cmovne qb,tmp,n1
+ bis n0,qb,n0
+ cmplt n0,0,tmp
+ addq n1,n1,n1
+ bis n1,tmp,n1
+ addq n0,n0,n0
+ cmpule d,n1,qb
+ subq n1,d,tmp
+ cmovne qb,tmp,n1
+ bis n0,qb,n0
+ cmplt n0,0,tmp
+ addq n1,n1,n1
+ bis n1,tmp,n1
+ addq n0,n0,n0
+ cmpule d,n1,qb
+ subq n1,d,tmp
+ cmovne qb,tmp,n1
+ bis n0,qb,n0
+ subq cnt,1,cnt
+ bgt cnt,$loop1
+ stq n1,0(rem_ptr)
+ bis $31,n0,$0
+ ret $31,($26),1
+
+ $largedivisor:
+ and n0,1,$4
+
+ srl n0,1,n0
+ sll n1,63,tmp
+ or tmp,n0,n0
+ srl n1,1,n1
+
+ and d,1,$6
+ srl d,1,$5
+ addq $5,$6,$5
+
+ $loop2: cmplt n0,0,tmp
+ addq n1,n1,n1
+ bis n1,tmp,n1
+ addq n0,n0,n0
+ cmpule $5,n1,qb
+ subq n1,$5,tmp
+ cmovne qb,tmp,n1
+ bis n0,qb,n0
+ cmplt n0,0,tmp
+ addq n1,n1,n1
+ bis n1,tmp,n1
+ addq n0,n0,n0
+ cmpule $5,n1,qb
+ subq n1,$5,tmp
+ cmovne qb,tmp,n1
+ bis n0,qb,n0
+ cmplt n0,0,tmp
+ addq n1,n1,n1
+ bis n1,tmp,n1
+ addq n0,n0,n0
+ cmpule $5,n1,qb
+ subq n1,$5,tmp
+ cmovne qb,tmp,n1
+ bis n0,qb,n0
+ cmplt n0,0,tmp
+ addq n1,n1,n1
+ bis n1,tmp,n1
+ addq n0,n0,n0
+ cmpule $5,n1,qb
+ subq n1,$5,tmp
+ cmovne qb,tmp,n1
+ bis n0,qb,n0
+ subq cnt,1,cnt
+ bgt cnt,$loop2
+
+ addq n1,n1,n1
+ addq $4,n1,n1
+ bne $6,$Odd
+ stq n1,0(rem_ptr)
+ bis $31,n0,$0
+ ret $31,($26),1
+
+ $Odd:
+ /* q' in n0. r' in n1 */
+ addq n1,n0,n1
+
+ cmpult n1,n0,tmp # tmp := carry from addq
+ subq n1,d,AT
+ addq n0,tmp,n0
+ cmovne tmp,AT,n1
+
+ cmpult n1,d,tmp
+ addq n0,1,AT
+ cmoveq tmp,AT,n0
+ subq n1,d,AT
+ cmoveq tmp,AT,n1
+
+ stq n1,0(rem_ptr)
+ bis $31,n0,$0
+ ret $31,($26),1
+
+ .end __udiv_qrnnd
*** /dev/null Thu Mar 2 21:48:59 2000
--- config/alpha/t-alpha Sat Apr 15 06:10:12 2000
***************
*** 0 ****
--- 1,6 ----
+ # This is really part of libgcc1, but this will cause them to be
+ # built correctly, so... [taken from t-sparclite]
+ LIB2FUNCS_EXTRA = qrnnd.S
+
+ qrnnd.S: $(srcdir)/config/alpha/qrnnd.asm
+ cat $(srcdir)/config/alpha/qrnnd.asm > qrnnd.S
More information about the Gcc-patches
mailing list