Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Dec 1997 04:31:53 +0100 (MET)
From:      Oliver Fromme <olli@dorifer.heim3.tu-clausthal.de>
To:        freebsd-sparc@FreeBSD.ORG
Subject:   Re: Data types (was: Re: FAQ FreeBSD-Sparc [frequent posting])
Message-ID:  <199712170331.EAA15014@dorifer.heim3.tu-clausthal.de>

next in thread | raw e-mail | index | archive | help
In list.freebsd-sparc Wes Peters wrote (17 Dec 1997 02:54:50 +0100):
 > > On Wed, 17 Dec 1997, Oliver Fromme wrote:
 > > 
 > > > Is there a special version of gcc for UltraSparc?  If so, we
 > > > will have to use its idea of the data type sizes, I'm afraid,
 > > > so there's no choice.
 > 
 > Certainly *not*.  Changing the machine definitions file is quite easy, really, 
 > but you might have to debug some nasty bugs on the back-end of the compiler. 
 > If there are particular data sizes that *really* make sense on the Ultra 
 > architecture, we should use those.

Good point.  (But if those data sizes *really* make sense, the
gcc for UltraSparc should already use them, shouldn't it?)

Just to add two thoughts:
 - Gcc has a "long long" type (not ANSI-C compliant, of course)
   which is 64 bits on the x86 platform.  We should _not_ use
   that convention on the UltraSparc which is natively 64 bit.
   At least sizeof(long) should be 8.
 - In Solaris, sizeof(int) is 4.  I suppose it's because of the
   required binary compatibility.  (BTW:  Will we ever want to
   be able to run Solaris binaries under FreeBSD-Sparc?  That
   would probably be a tough piece of work.)

So the question is:  32 or 64 bits for ints?  I think the
answer depends on how efficient 32-bit accesses (possibly not
64-bit-aligned) are one the UltraSparc, as I mentioned in my
previous posting.

Personally I'd prefer 32 bits (if there are no efficiency
reasons for 64 bits), because it seems to be more elegant to
me.  Then we would have types for all the common sizes:
8 bits (char), 16 bits (short), 32 bits (int), 64 bits (long).
This is not exactly a technical reason, though (I don't think
that there's software that has problems if there is no 32 bit
type).

Regards
   Oliver

-- 
Oliver Fromme, Leibnizstr. 18-61, 38678 Clausthal, Germany
(Info: finger userinfo:olli@dorifer.heim3.tu-clausthal.de)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712170331.EAA15014>