[M3devel] 64bit INTEGERs, WIDECHAR: language specified or configuration/target dependent?
Rodney M. Bates
rodney_bates at lcwb.coop
Thu May 28 23:56:06 CEST 2015
On 05/28/2015 09:21 AM, Hendrik Boom wrote:
> On Thu, May 28, 2015 at 07:46:12PM +0200, Elmar Stellnberger wrote:
>> Am 28.05.15 um 04:03 schrieb Antony Hosking:
>>> BYTESIZE(ADDRESS) = BYTESIZE(INTEGER) in cm3 on all target platforms. I don't really understand what you are proposing.
>>>
>> on AMD64: BITSIZE(INTEGER) = BITSIZE(LONGINT) = 64bit
>>
>> I have just noticed that and when taking a practical standpoint -
>> i.e. what really matters to new and old programs -
>> this is a really bad decision which I wish to change for the next release.
>>
>> If you have not examined it yet please reclaim the design decisions
>> for leaving int 32bit in C:
>>
>> /However things turned out to be very different when the extension from
>> 32bit to 64bit was at stake. There was no more gain by automatically
>> extending the value ranges from 2^32 to 2^64 for 95% of all application
>> purposes while the memory hierarchy has increasingly become a bottle
>> neck in recent time. Additionally doubling the size of all integers would
>> initially have doubled our memory needs which would have been a
>> potential drawback for introducing the AMD64 arch. Just think of a machine
>> with 4GB of RAM: It can not be addressed by 32bit (only ~3GB can) while
>> making all INTS 64bit would have shrunken our memory to an effective size
>> of 2GB. Luckily the decision was taken differently this time:
>>
>> * keep all ints of at most 32bit and just extend pointers to 64bit
>> /
>>
>> Same reasoning applies to Modula-3. - and I believe you have failed
>> to notice when
>> making your decisions for cm3 5.8.6. Or do you want to tell me that
>> Modula-3
>> developers are more prudent than the C/C++ community?
>>
>> Even worse I have discovered the following:
>> BITS 8 FOR INTEGER and BITS 32 FOR INTEGER do not work with cm3 5.8.6:
>
> As I understand it from Rodney Bates' reply to my recent post,
> BITS 8 FOR INTEGER should never have worked. BITS 32 FOR INTEGER
> should work only if INTEGER is 32 bits wide.
>
Yes.
>>
>> :: BITS FOR size too small, must be at least (64)
>>
>> That will break existing legacy code when trying to compile it with
>> cm3 5.8.6.
>
--
Rodney Bates
rodney.m.bates at acm.org
More information about the M3devel
mailing list