GNU bug report logs - #12754
factor.c selects 64 bit code from longlong.h on 32-bit hppa systems

Previous Next

Package: coreutils;

Reported by: John David Anglin <dave.anglin <at> nrc-cnrc.gc.ca>

Date: Sun, 28 Oct 2012 19:50:01 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: John David Anglin <dave.anglin <at> nrc-cnrc.gc.ca>
Subject: bug#12754: closed (Re: bug#12754: factor.c selects 64 bit code
 from longlong.h on 32-bit hppa systems)
Date: Sun, 04 Nov 2012 00:58:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#12754: factor.c selects 64 bit code from longlong.h on 32-bit hppa systems

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 12754 <at> debbugs.gnu.org.

-- 
12754: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12754
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Pádraig Brady <P <at> draigBrady.com>
To: Torbjorn Granlund <tg <at> gmplib.org>
Cc: 12754-done <at> debbugs.gnu.org, John David Anglin <dave <at> hiauly1.hia.nrc.ca>,
	John David Anglin <dave.anglin <at> bell.net>
Subject: Re: bug#12754: factor.c selects 64 bit code from longlong.h on 32-bit
	hppa systems
Date: Sun, 04 Nov 2012 00:54:09 +0000
On 10/30/2012 01:59 AM, Pádraig Brady wrote:
> Since 2.0 is the only arch that supports the 64 bit hppa code in longlong.h,
> the following enables the code to compile by default.
>
> diff --git a/src/longlong.h b/src/longlong.h
> index 8d71611..8b01696 100644
> --- a/src/longlong.h
> +++ b/src/longlong.h
> @@ -679,7 +679,7 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtype, UWtype, UWtype);
>   /* These macros are for ABI=2.0w.  In ABI=2.0n they can't be used, since GCC
>      (3.2) puts longlong into two adjacent 32-bit registers.  Presumably this
>      is just a case of no direct support for 2.0n but treating it like 1.0. */
> -#if defined (__hppa) && W_TYPE_SIZE == 64 && ! defined (_LONG_LONG_LIMB)
> +#if defined (__hppa) && defined (_PA_RISC2_0) && W_TYPE_SIZE == 64 && ! defined (_LONG_LONG_LIMB)
>   #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
>     __asm__ ("add%I5 %5,%r4,%1\n\tadd,dc %r2,%r3,%0"                     \
>             : "=r" (sh), "=&r" (sl)                                      \
>
> Note even though I've not encountered a system yet where uintmax_t != 64 bit,
> I'll add the guards around "#define W_TYPE_SIZE", previously mentioned in
> this thread, in a separate patch.

I've now pushed the patch set discussed in this thread,
so I'm marking this bug as done.

cheers,
Pádraig.

[Message part 3 (message/rfc822, inline)]
From: John David Anglin <dave <at> hiauly1.hia.nrc.ca>
To: bug-coreutils <at> gnu.org
Cc: John David Anglin <dave <at> hiauly1.hia.nrc.ca>
Subject: factor.c selects 64 bit code from longlong.h on 32-bit hppa systems
Date: Sun, 28 Oct 2012 15:46:44 -0400
[Message part 4 (text/plain, inline)]
When USE_LONGLONG_H is defined, factor.c unilaterally defines W_TYPE_SIZE
to 64.  This selects the wrong code from longlong.h on 32-bit hppa systems
causing an assembly failure.

Attached is a hack which should work on most but probably not all systems.

Dave
-- 
J. David Anglin                                  dave.anglin <at> nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
[factor.c.d (text/plain, attachment)]

This bug report was last modified 12 years and 205 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.