[M3commit] CVS Update: cm3 (64 bit integers...)
hosking at cs.purdue.edu
Sun Aug 26 17:28:49 CEST 2007
On Aug 26, 2007, at 8:08 AM, j k wrote:
> Here is the change:
> < TYPE T = BITS 64 FOR [ -16_7fffffffffffffffL-1L ..
> 16_7fffffffffffffffL ];
> > (*TYPE T = BITS 64 FOR [ -16_7fffffffffffffffL-1L ..
> 16_7fffffffffffffffL ];*)
> > TYPE T = BITS BITSIZE(LONGINT) FOR [ FIRST(LONGINT) .. LAST
> (LONGINT) ];
This should be OK.
> Otherwise you get a compile error when the constants overflow at
> compile time.
You only get the compiler error for NT386, for which LONGINT is 32-
bits because the non-gcc backend can handle only 32-bit integers.
What we really need is for NT386 to use a back-end that is capable of
64 bits. NT386GNU may be the easiest route to this.
> I still think all this stuff is a little wierd. Can we write off
> ALPHA_OSF, assert that INTEGER is 32 bits, and introduce a new type
> that is the same size as a pointer?
No way. INTEGER is intended to be abstract -- as defined in the
> Again I think the types you want are:
> INT8, INT16, INT32, INT64 -- signed types with exact sizes, the
> same on all platforms (INT64 yet missing on Win32)
> UINT8, UINT16, UINT32, UINT64 -- unsigned types with exact
> sizes, the same on all platforms (UINT64 yet missing on Win32)
> SIZE_T, ?SSIZE_T? or ?PTRDIFF_T?-- unsigned and signed types for
> storing addresses, or sizes of arrays, or array indices, or the
> differences thereof, PERHAPS guaranteed to be 32 bits or 64 bits
> INTEGER -- same as SSIZE_T ?or? INT32??
> What's the pickle story? Are pickles interchangable beteen
> Alpha and non-Alpha?
> Should probably be equiv to SSIZE_T. That's what Alpha has.
> LONGINT -- same as INT64
This leads us into the swamp, full of nightmares and dragons.
> - Jay
> > Date: Sun, 26 Aug 2007 13:43:01 +0000
> > To: m3commit at elegosoft.com
> > From: jkrell at elego.de
> > Subject: [M3commit] CVS Update: cm3
> > CVSROOT: /usr/cvs
> > Changes by: jkrell at birch. 07/08/26 13:43:01
> > Modified files:
> > cm3/m3-libs/libm3/src/types/: Int64.i3
> > Log message:
> > Fix it to compile for Win32's temporary 32 bit Int64.
> > Is this correct? I think so.
> Messenger Café — open for fun 24/7. Hot games, cool activities
> served daily. Visit now.
More information about the M3commit