This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Target FUNCTION_{PRO,EPI}LOGUE question
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Subject: Re: Target FUNCTION_{PRO,EPI}LOGUE question
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Thu, 28 Jun 2001 13:51:20 +0100 (BST)
- cc: <gcc at gcc dot gnu dot org>
On Thu, 28 Jun 2001, Richard Kenner wrote:
> But it isn't the widest type - that's HOST_WIDEST_INT.
>
> Why was *that* added? And whoever added it didn't modify the documentation
> in hwint.h saying that HOST_WIDE_INT is the widest host type.
It supports 64-bit preprocessor arithmetic without the inefficiency of
making HOST_WIDE_INT 64-bit on 32-bit systems. This is slightly broken,
since in general you want (per C99) the *target* intmax_t and uintmax_t,
not the host ones.
Fundamentally, a typedef relating to the HOST should not be used for a
TARGET type. I agree that we need a multiple precision arithmetic library
for use for target arithmetic. ISTR that the Fortran 95 front end uses
GMP for its own purposes; that it has been mentioned that the Ada front
end includes a multiple precision arithmetic implementation; and that the
COBOL front end needs 128-bit arithmetic on 32-bit systems. I tend to
think we should just use GMP - with wrappers for functions on target types
(with and without overflow checking) so we can change the underlying
multiple precision library if necessary - including it in the source tree
and providing a --with-system-gmp configure option - though Torbjorn
Granlund thinks GMP is inappropriate for this
<URL:http://gcc.gnu.org/ml/gcc/2000-11/msg00725.html>. Then, where
genuinely dealing with the host, types such as long, int and size_t could
be used.
--
Joseph S. Myers
jsm28@cam.ac.uk