From owner-freebsd-hackers Sun Jan 18 11:37:35 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA06442 for hackers-outgoing; Sun, 18 Jan 1998 11:37:35 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dorifer.heim3.tu-clausthal.de (dorifer.heim3.tu-clausthal.de [139.174.243.252]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA06394 for ; Sun, 18 Jan 1998 11:36:42 -0800 (PST) (envelope-from olli@dorifer.heim3.tu-clausthal.de) Received: (from olli@localhost) by dorifer.heim3.tu-clausthal.de (8.8.8/8.8.8) id UAA22085 for freebsd-hackers@FreeBSD.ORG; Sun, 18 Jan 1998 20:36:40 +0100 (CET) (envelope-from olli) Date: Sun, 18 Jan 1998 20:36:40 +0100 (CET) From: Oliver Fromme Message-Id: <199801181936.UAA22085@dorifer.heim3.tu-clausthal.de> To: freebsd-hackers@FreeBSD.ORG Subject: Re: New typedefs in sys/types.h Newsgroups: list.freebsd-hackers Organization: Administration Heim 3 Reply-To: freebsd-hackers@FreeBSD.ORG MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: TIN [version 1.2 RZTUC(3) PL2] Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk ichael K. Sanders wrote in list.freebsd-hackers: > In message <199801132239.WAA10230@awfulhak.org>, Brian Somers writes: > >> Well, FWIW, apparently Digital Unix has int = 32 and long = 64. > > > >As does OpenBSD/Alpha, and I believe NetBSD/Alpha. Nobody's been > >brave/stupid enough to make sizeof(int) != 4 yet ! > > Like there'd really be a whole lot of difference there... if > OpenBSD/alpha is that way, you're pretty safe in assuming NetBSD/alpha > is, since I doubt there have been many changes to that code. I'd like to add the fact that both 32 and 64 bits are "natural" sizes for the Alpha processor. It can perform memory accesses in 32 bits units as well as in 64 bits units. It also has special provisions to access 8 bit parts of its registers. It's also interesting to know that DEC's C compiler for Alpha has a special option which causes all pointer values to be below 2^32, and even a #pragma directive to make all pointers 32 bits. This certainly shouldn't matter for cleanly written software, but the truth it that there is still a lot of software which requires those options (e.g. Doom -- although that's probably not a typical example). To make a long story short, I'd vote for LP64, that is, 8 bit chars, 16 bit shorts, 32 bit ints, 64 bit longs and pointers. Maybe even 128 bit long long (BTW, the upcoming C9X standard even legalizes "long long"). Regards Oliver PS: The width of the memory bus of modern Alphas is 128 or 256 bits -- I don't think that should be taken into account when deciding about the size of ints. ;-) -- Oliver Fromme, Leibnizstr. 18-61, 38678 Clausthal, Germany (Info: finger userinfo:olli@dorifer.heim3.tu-clausthal.de)