[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch 4.1.3] Correctly handle zero operands with gcc on PA
From: |
John David Anglin |
Subject: |
Re: [patch 4.1.3] Correctly handle zero operands with gcc on PA |
Date: |
Thu, 27 May 2004 19:08:34 -0400 (EDT) |
> > The narrow kernels don't support the 64-bit runtime.
>
> I don't think I was aware there was a 32-bit kernel mode. That
> happens on sparcv9 solaris too, where a native build will fall-back
> automatically to the 32-bit ABI. If that doesn't already happen on
> hpux then I'd like to make it so.
I don't believe that it does. Machines that run the narrow PA 2.0
kernel are fairly rare. I think the early machines contained PDC (ROM)
code that didn't provide the features needed for the wide kernel.
I believe that even the narrow PA 2.0 kernels do 64-bit register
saves when saving the process context so that is possible to perform
64-bit operations between calls.
> > For this reason, config.guess does an additional
> > check on CC to determine the properties of CC.
>
> We don't drive the ABI from the compiler, but rather the other way
> around. We establish default CFLAGS for the requested (or best
> possible) ABI.
>
> I'm aware this ABI scheme is specific to gmp, but very few other gnu
> packages care about the level of detail we do.
>
> > The main issue is that the straight-forward configure command doesn't
> > work. Configure has selected the "2.0w" ABI when gcc is generating
> > code for the 32-bit runtime.
>
> My understanding is that gcc is built either 32-bit or 64-bit, so you
> need to use the right one.
>
> In the next gmp we'll be checking sizeof(long) to see what sort of gcc
> we've got, to let the default ABI fallback to what works. (gmp 4.1
> pre-dated any gcc support for 2.0, hence the lack of any mention of it
> in the configure.)
Checking the sizeof(long) would certainly work on the PA to determine
whether gcc is 32-bit or 64-bit. The __LP64__ define is another way
to tell.
There are also the arch predefines that I mentioned. These tell you the
code level of the compiler. The _PA_RISC1_1 and _PA_RISC2_0 defines
have been in gcc for some time. The _PA_RISC1_0 define was added in 3.3.
The HP compiler also generates these define.
Dave
--
J. David Anglin address@hidden
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)