bug-coreutils
[Top][All Lists]
Advanced

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

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


From: John David Anglin
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       address@hidden








reply via email to

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