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: Mike Stump <mikestump at comcast dot net>
- To: Richard Sandiford <rdsandiford at googlemail dot com>
- Cc: zadeck at naturalbridge dot com, gcc-patches at gcc dot gnu dot org
- Date: Sat, 19 Oct 2013 11:41:02 -0700
- 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>
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.