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: John David Anglin <dave.anglin <at> bell.net>
To: Pádraig Brady <P <at> draigBrady.com>
Cc: 12754 <at> debbugs.gnu.org, John David Anglin <dave <at> hiauly1.hia.nrc.ca>, Torbjorn Granlund <tg <at> gmplib.org>
Subject: bug#12754: factor.c selects 64 bit code from longlong.h on 32-bit hppa systems
Date: Mon, 29 Oct 2012 23:34:29 -0400
On 29-Oct-12, at 9:59 PM, Pádraig Brady wrote:

> --------- 2.0 --------
> #define _PA_RISC2_0 1
> #define __hppa__ 1
>
> 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.

The issue is _PA_RISC2_0 is not sufficient to distinguish between the  
32-bit
and 64-bit PA runtimes.  While all PA 2.0 systems accept double word  
add instructions,
it's possible for the context to get clobbered between the add and  
add,dc
instructions in the asm on Linux and narrow HP-UX kernels.  Not sure  
about BSD
but it generally follows Linux.

GCC only generates double word instructions when compiling for the 64- 
bit runtime.
For the 32-bit runtime, a long long has to be placed in two separate  
registers to
meet the calling conventions.  So, long longs are handled the same as  
for PA 1.X.

The ABI=2.0w refers to a 64-bit HP-UX kernel.  All 64-bit HP-UX  
kernels support
both the 32 and 64-bit runtimes.  It is possible to optimize certain  
operations in the 32-bit
runtime using the 64-bit registers on but the benefit is not as great  
as one might expect
because of the calling convention requirements.

An additional check such as the size of long is needed to distinguish  
the two cases.

Dave
--
John David Anglin	dave.anglin <at> bell.net







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.