[M3devel] representation of enums?
Tony Hosking
hosking at cs.purdue.edu
Mon Sep 13 15:48:46 CEST 2010
Zeros.
On 12 Sep 2010, at 21:27, Jay K wrote:
>
> Values are sign extended or zero extended?
>
> - Jay
>
> ----------------------------------------
>> From: hosking at cs.purdue.edu
>> Date: Sun, 12 Sep 2010 20:44:49 -0400
>> To: jay.krell at cornell.edu
>> CC: m3devel at elegosoft.com
>> Subject: Re: [M3devel] representation of enums?
>>
>> On 12 Sep 2010, at 20:33, Jay K wrote:
>>
>>>
>>> How are enums represented?
>>>
>>> As the smallest of 8, 16, 32 bit unsigned integer that can hold all the values?
>>
>> Stored, yes. All operations on enum are as INTEGER.
>>
>>> An enum with 128 or 255 values -- 8 bits or 16?
>>> I assume 8.
>>
>> 8
>>
>>> Packable into fewer bits, if they fit presumably.
>>
>> BITS FOR, yes.
>>
>>>
>>> - Jay
>>>
>>>
>>>
>>>
>>>
>>
>
More information about the M3devel
mailing list