Date: Sun, 18 Jan 1998 20:36:40 +0100 (CET) From: Oliver Fromme <olli@dorifer.heim3.tu-clausthal.de> To: freebsd-hackers@FreeBSD.ORG Subject: Re: New typedefs in sys/types.h Message-ID: <199801181936.UAA22085@dorifer.heim3.tu-clausthal.de>
next in thread | raw e-mail | index | archive | help
ichael K. Sanders <msanders@aros.net> 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801181936.UAA22085>