This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
libgcc2 type patch
- To: gcc-patches at gcc dot gnu dot org
- Subject: libgcc2 type patch
- From: Michael Hayes <m dot hayes at elec dot canterbury dot ac dot nz>
- Date: Wed, 01 Nov 2000 12:40:17 +1300 (NZDT)
- Cc: cchava at redhat dot com
This patch corrects the last patch to libgcc2.{c,h} to use Wtype and
DWtype so that I can build a c4x cross compiler. This beast has no SI
and DI types.
Michael.
2000-11-01 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
* libgcc2.h: Use Wtype for SItype and DWtype for DItype in prototypes.
* libgcc2.c (__absvsi2): Use Wtype and DWtype.
(__absvdi2, __addvsi3, __addvdi3, __subvsi3): Likewise.
(__subvdi3, __mulvsi3, __mulvdi3, __negvsi2, __negvdi2): Likewise.
Index: libgcc2.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/libgcc2.h,v
retrieving revision 1.10
diff -c -3 -p -r1.10 libgcc2.h
*** libgcc2.h 2000/10/20 23:32:09 1.10
--- libgcc2.h 2000/10/31 23:29:24
*************** extern UWtype __udiv_w_sdiv (UWtype *, U
*** 256,271 ****
extern word_type __cmpdi2 (DWtype, DWtype);
extern word_type __ucmpdi2 (DWtype, DWtype);
! extern SItype __absvsi2 (SItype);
! extern DItype __absvdi2 (DItype);
! extern SItype __addvsi3 (SItype, SItype);
! extern DItype __addvdi3 (DItype, DItype);
! extern SItype __subvsi3 (SItype, SItype);
! extern DItype __subvdi3 (DItype, DItype);
! extern SItype __mulvsi3 (SItype, SItype);
! extern DItype __mulvdi3 (DItype, DItype);
! extern SItype __negvsi2 (SItype);
! extern DItype __negvdi2 (DItype);
#if BITS_PER_UNIT == 8
extern DWtype __fixdfdi (DFtype);
--- 257,272 ----
extern word_type __cmpdi2 (DWtype, DWtype);
extern word_type __ucmpdi2 (DWtype, DWtype);
! extern Wtype __absvsi2 (Wtype);
! extern DWtype __absvdi2 (DWtype);
! extern Wtype __addvsi3 (Wtype, Wtype);
! extern DWtype __addvdi3 (DWtype, DWtype);
! extern Wtype __subvsi3 (Wtype, Wtype);
! extern DWtype __subvdi3 (DWtype, DWtype);
! extern Wtype __mulvsi3 (Wtype, Wtype);
! extern DWtype __mulvdi3 (DWtype, DWtype);
! extern Wtype __negvsi2 (Wtype);
! extern DWtype __negvdi2 (DWtype);
#if BITS_PER_UNIT == 8
extern DWtype __fixdfdi (DFtype);
Index: libgcc2.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/libgcc2.c,v
retrieving revision 1.105
diff -c -3 -p -r1.105 libgcc2.c
*** libgcc2.c 2000/10/20 23:32:09 1.105
--- libgcc2.c 2000/10/31 23:29:25
*************** __negdi2 (DWtype u)
*** 66,75 ****
#endif
#ifdef L_addvsi3
! SItype
! __addvsi3 (SItype a, SItype b)
{
! SItype w;
w = a + b;
--- 66,75 ----
#endif
#ifdef L_addvsi3
! Wtype
! __addvsi3 (Wtype a, Wtype b)
{
! Wtype w;
w = a + b;
*************** __addvsi3 (SItype a, SItype b)
*** 81,90 ****
#endif
#ifdef L_addvdi3
! DItype
! __addvdi3 (DItype a, DItype b)
{
! DItype w;
w = a + b;
--- 81,90 ----
#endif
#ifdef L_addvdi3
! DWtype
! __addvdi3 (DWtype a, DWtype b)
{
! DWtype w;
w = a + b;
*************** __addvdi3 (DItype a, DItype b)
*** 96,108 ****
#endif
#ifdef L_subvsi3
! SItype
! __subvsi3 (SItype a, SItype b)
{
#ifdef L_addvsi3
return __addvsi3 (a, (-b));
#else
! DItype w;
w = a - b;
--- 96,108 ----
#endif
#ifdef L_subvsi3
! Wtype
! __subvsi3 (Wtype a, Wtype b)
{
#ifdef L_addvsi3
return __addvsi3 (a, (-b));
#else
! DWtype w;
w = a - b;
*************** __subvsi3 (SItype a, SItype b)
*** 115,127 ****
#endif
#ifdef L_subvdi3
! DItype
! __subvdi3 (DItype a, DItype b)
{
#ifdef L_addvdi3
return (a, (-b));
#else
! DItype w;
w = a - b;
--- 115,127 ----
#endif
#ifdef L_subvdi3
! DWtype
! __subvdi3 (DWtype a, DWtype b)
{
#ifdef L_addvdi3
return (a, (-b));
#else
! DWtype w;
w = a - b;
*************** __subvdi3 (DItype a, DItype b)
*** 134,143 ****
#endif
#ifdef L_mulvsi3
! SItype
! __mulvsi3 (SItype a, SItype b)
{
! DItype w;
w = a * b;
--- 134,143 ----
#endif
#ifdef L_mulvsi3
! Wtype
! __mulvsi3 (Wtype a, Wtype b)
{
! DWtype w;
w = a * b;
*************** __mulvsi3 (SItype a, SItype b)
*** 149,158 ****
#endif
#ifdef L_negvsi2
! SItype
! __negvsi2 (SItype a)
{
! SItype w;
w = -a;
--- 149,158 ----
#endif
#ifdef L_negvsi2
! Wtype
! __negvsi2 (Wtype a)
{
! Wtype w;
w = -a;
*************** __negvsi2 (SItype a)
*** 164,173 ****
#endif
#ifdef L_negvdi2
! DItype
! __negvdi2 (DItype a)
{
! DItype w;
w = -a;
--- 164,173 ----
#endif
#ifdef L_negvdi2
! DWtype
! __negvdi2 (DWtype a)
{
! DWtype w;
w = -a;
*************** __negvdi2 (DItype a)
*** 179,188 ****
#endif
#ifdef L_absvsi2
! SItype
! __absvsi2 (SItype a)
{
! SItype w = a;
if (a < 0)
#ifdef L_negvsi2
--- 179,188 ----
#endif
#ifdef L_absvsi2
! Wtype
! __absvsi2 (Wtype a)
{
! Wtype w = a;
if (a < 0)
#ifdef L_negvsi2
*************** __absvsi2 (SItype a)
*** 199,208 ****
#endif
#ifdef L_absvdi2
! DItype
! __absvdi2 (DItype a)
{
! DItype w = a;
if (a < 0)
#ifdef L_negvsi2
--- 199,208 ----
#endif
#ifdef L_absvdi2
! DWtype
! __absvdi2 (DWtype a)
{
! DWtype w = a;
if (a < 0)
#ifdef L_negvsi2
*************** __absvdi2 (DItype a)
*** 219,228 ****
#endif
#ifdef L_mulvdi3
! DItype
! __mulvdi3 (DItype u, DItype v)
{
! DItype w;
w = u * v;
--- 219,228 ----
#endif
#ifdef L_mulvdi3
! DWtype
! __mulvdi3 (DWtype u, DWtype v)
{
! DWtype w;
w = u * v;