> > Yeah, I think the other comment should be adjusted accordingly.  I
> > didn't remember we have that one extra bit either ... ;)  (given wide-ints
> > have unsigned variants of ops I wonder if it is really necessary, but who
> > knows - the wide-int rep w/o a sign is really sth odd and I blame RTL 
> > for it).

Given that actual instructions do not have signed/unsigned types on them, and
RTL is an abstract model of target machine language, signedless operations do
make sense to me. At Gimple level we could probably wrap this further and
make sign part of the type and also have signed/unsigned types so one
can write normal C expressions rather than looking up wi:: api to do operations
where sign matters.

The consequences of the lack of sign was definitely dragging me away from wide
ints for a while. After finally giving it some tought this weekend it makes
sense, but it is not obvoius.
> 
> Hmm, yeah.  We definitely need the extra bit for widest_int, but I'm
> not sure why we need it for wide_int.

Yep, extra bit in wide int seems useless at least from highlevel POV :)

Honza
> 
> Thanks,
> Richard

Reply via email to