From owner-freebsd-sparc Tue Dec 16 21:19:36 1997 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.7/8.8.7) id VAA10012 for sparc-outgoing; Tue, 16 Dec 1997 21:19:36 -0800 (PST) (envelope-from owner-freebsd-sparc@FreeBSD.ORG) Received: from quark.ChrisBowman.com (crb.mnsinc.com [206.239.213.225]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id VAA09967 for ; Tue, 16 Dec 1997 21:19:06 -0800 (PST) (envelope-from crb@ChrisBowman.com) Received: from localhost (crb@localhost) by quark.ChrisBowman.com (8.8.8/8.8.7) with SMTP id AAA07146; Wed, 17 Dec 1997 00:26:31 -0500 (EST) (envelope-from crb@ChrisBowman.com) X-Authentication-Warning: quark.ChrisBowman.com: crb owned process doing -bs Date: Wed, 17 Dec 1997 00:26:31 -0500 (EST) From: "Christopher R. Bowman" To: Greg Lehey cc: freebsd-sparc@FreeBSD.ORG Subject: Re: Data types (was: Re: FAQ FreeBSD-Sparc [frequent posting]) In-Reply-To: <19971217114053.51947@lemis.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-sparc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Wed, 17 Dec 1997, Greg Lehey wrote: >On Wed, Dec 17, 1997 at 12:26:34AM +0100, Oliver Fromme wrote: >> In list.freebsd-sparc perhaps@yes.no wrote: >>>> Assumptions about the size of int will need fixed. >>> >>> OK, what assumptions are correct on UltraSPARC? (Here comes a set of >>> possible assumptions; could you try to say which are wrong, and I'll >>> try to fix the places where some of them occur?) >>> [...] >> >> On DEC Alpha (at least with DEC's cc), the following is true: >> - sizeof(short) == 2 >> - sizeof(int) == 4 >> - sizeof(long) == 8 >> - sizeof(void*) == 8 >> Which is a good choice, IMHO. I don't think it is a problem to >> have sizeof(int) != sizeof(void*), at least I haven't had any >> problems with that on Alphas. Software which assumes that ints >> and pointers are of equal size is broken anyway. >> >> On the other hand, I don't know how efficient it is to access >> 32 bit units on the UltraSparc, compared to 64 bit units. >> If 32 bit accesses involve a penalty (especially if they are >> not 64-bit-aligned), it might be worth to use sizeof(int) = >> sizeof(long) = 8. > >Agreed on both points. But doesn't it make more sense to see how >Solaris 2/SunOS 5 defines them? > >> 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. > >Sure there is. You can always modify it. But without an excellent >reason, I don't think it's a good idea to change things from the way >other operating systems on the same platform do it. > >Greg In fact, if any kind of binary compatability (which would be a wonderful thing) is desired, having portability of header files, and interfaces would be greatly facilitated. Imagine a Yahoo banner, FreeBSD/SPARC runs faster than Slowaris! --------- Christopher R. Bowman crb@ChrisBowman.com My home page