bug-gmp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug other/13873] gcc/longlong.h uses test for PPC


From: Sean McNeil
Subject: Re: [Bug other/13873] gcc/longlong.h uses test for PPC
Date: Tue, 27 Jan 2004 06:00:59 -0800

This is a restatement of the bug in longlong.h for the sake of reporting
to GMP.  I've also included a simple patch to remove to test of PPC. 
PPC is too generic of a name to test for the target type.  In vxWorks,
there are numerous definitions of CPU values and PPC is one of them. 
Regardless of the target type.  Tests like these should always be
preceded with at least one underscore.  The most proper tests should be
for __cputype__ and these are already accounted for.  The comment
specifies it to be for GNU/Linux, SysV.  Please use another test if
required.  __powerpc__ should have been good enough, however.

*** gcc/longlong.h      22 Jan 2004 00:15:25 -0000      1.41
--- gcc/longlong.h      27 Jan 2004 13:59:56 -0000
*************** UDItype __umulsidi3 (USItype, USItype);
*** 639,645 ****
       || defined (__powerpc__) /* gcc */                               \
       || defined (__POWERPC__) /* BEOS */                              \
       || defined (__ppc__)     /* Darwin */                            \
-      || defined (PPC)         /* GNU/Linux, SysV */                   \
       ) && W_TYPE_SIZE == 32
  #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
    do {                                                                        
\
--- 639,644 ----
*************** UDItype __umulsidi3 (USItype, USItype);
*** 677,683 ****
    __asm__ ("{cntlz|cntlzw} %0,%1" : "=r" (count) : "r" (x))
  #define COUNT_LEADING_ZEROS_0 32
  #if defined (_ARCH_PPC) || defined (__powerpc__) || defined (__POWERPC__) \
!   || defined (__ppc__) || defined (PPC)
  #define umul_ppmm(ph, pl, m0, m1) \
    do {                                                                        
\
      USItype __m0 = (m0), __m1 = (m1);                                 \
--- 676,682 ----
    __asm__ ("{cntlz|cntlzw} %0,%1" : "=r" (count) : "r" (x))
  #define COUNT_LEADING_ZEROS_0 32
  #if defined (_ARCH_PPC) || defined (__powerpc__) || defined (__POWERPC__) \
!   || defined (__ppc__)
  #define umul_ppmm(ph, pl, m0, m1) \
    do {                                                                        
\
      USItype __m0 = (m0), __m1 = (m1);                                 \

On Mon, 2004-01-26 at 21:53, pinskia at gcc dot gnu dot org wrote:
> ------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-27 
> 05:53 -------
> Two things, longlong.c comes from GMP, report it to them, we can take a patch 
> iff you sent it 
> upstream also.
> Please just send a patch to address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]