[M3devel] cg.declare_subrange should pass on cgtype

Jay jay.krell at cornell.edu
Tue Mar 5 14:30:08 CET 2013


I want to view the value in a debugger. 
Without having to cast it.


By your reasoning, for record fields, among float, double, int32, int64, uint32, uint64, we'd only need 2.


We want strong accurate types in "declare", not just operations like "add".
  

Declare_subrange: is there a point to domain_type? I.e. how about declare_subrange(cgtype, min, max)? I'd have to see if cm3cg and then m3gdb use it.


 - Jay

On Mar 4, 2013, at 10:29 PM, Tony Hosking <hosking at cs.purdue.edu> wrote:

> 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/d624dd2e/attachment-0002.html>


More information about the M3devel mailing list