[M3devel] cg.declare_subrange should pass on cgtype

Tony Hosking hosking at cs.purdue.edu
Tue Mar 5 07:29:34 CET 2013


Signedness should be irrelevant.
It is only the storage that is specified by this.
The interpretation of the bits, including signed/unsigned, is in the operations performed on those bits.
e.g., load 8 bits sign extended.

Why do you need to know the signedness?


Antony Hosking | Associate Professor | Computer Science | Purdue University
305 N. University Street | West Lafayette | IN 47907 | USA
Mobile +1 765 427 5484





On Mar 5, 2013, at 5:21 PM, Jay <jay.krell at cornell.edu> wrote:

> Close, but also signedness.
> 
>  - Jay
> 
> On Mar 4, 2013, at 9:56 PM, Tony Hosking <hosking at cs.purdue.edu> wrote:
> 
>> Isn’t it already there (implicitly) in the bitsize to be used to represent the range?
>> The representation CG.Type chosen in the front-end dictates exactly what is needed in terms of bits (8, 16, 32, 64).
>> The backend is supposed to respect the bitsize.
>> So, why do you need to duplicate that information?
>> 
>> On Mar 5, 2013, at 4:33 PM, Jay K <jay.krell at cornell.edu> wrote:
>> 
>>> cg.declare_subrange should include the cgtype the frontend
>>> is going to use for the type.
>>> 
>>> 
>>> I'm pretty darn certain of this.
>>> 
>>> 
>>> Otherwise a backend very might want/need to duplicate
>>> the logic in m3front/types/SubrangeType.m3 SetRep.
>>> 
>>> The logic isn't that complicated, but really, declare_subrange
>>> should take the information.
>>> 
>>> I intend to write and commit that either tonight or within a week.
>>> I assume this is ok..as I'm pretty certain of it..
>>> 
>>> 
>>>  - Jay
>>> 
>>> 
>> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20130305/8ee73328/attachment-0002.html>


More information about the M3devel mailing list