This is the mail archive of the
mailing list for the GCC project.
Re: [wide-int] Go back to having undefined exccess bits on read
- From: Kenneth Zadeck <zadeck at naturalbridge dot com>
- To: Mike Stump <mikestump at comcast dot net>, Richard Sandiford <rdsandiford at googlemail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 19 Oct 2013 16:09:11 -0400
- Subject: Re: [wide-int] Go back to having undefined exccess bits on read
- Authentication-results: sourceware.org; auth=none
- References: <87mwm55oir dot fsf at talisman dot default> <E0EE0C1F-4AEB-4490-A53B-0CA9298B4C03 at comcast dot net>
On 10/19/2013 02:41 PM, Mike Stump wrote:
no, they should not be undefined on write. if they are undefined on
write, then it makes tree_fits* (the successor functions from
integer_hostp) much more complex.
On Oct 19, 2013, at 7:22 AM, Richard Sandiford <firstname.lastname@example.org> wrote:
As discussed, this patch effectively goes back to your original idea of
having excess upper bits in a HWI being undefined on read (at least as
the default assumption). wide_int itself still ensures that the excess
bits are stored as signs though.
Or we could decide that it isn't worth the hassle and just leave excess
upper bits as undefined on write too, which really is going back to your
original model. :-)
I don't get it. If the bits are undefined upon read, then, they should be undefined upon write. It doesn't make any sense to me to have them be undefined upon read and defined upon write. To me, one describes the semantics of the data, then once that is done, all else falls out from that. If no one is allowed to deviate their behavior upon a bit (that bit is don't care), then, trivially reads need to zap it out, and writes can write anything into it.