Re: [5/8] Add narrow_bit_field_mem

2012-10-31 Thread Mike Stump
On Oct 31, 2012, at 2:45 AM, Richard Biener wrote:. > My comment was for isolated code parts that are being rewritten > (I think it was the wide-int class). Consistency comes first. In the case of wide int, we only use references in one very narrow way. We use const T& as parameters instead of

Re: [5/8] Add narrow_bit_field_mem

2012-10-31 Thread Richard Biener
On Wed, Oct 31, 2012 at 9:16 AM, Eric Botcazou wrote: >> Would it be OK with a pointer, but keeping the interface the same? >> That's certainly fine by me. > > Yes, a pointer would make things more legible here. > >> That's one of the things I'm not sure about after the C++ conversion: >> I've not

Re: [5/8] Add narrow_bit_field_mem

2012-10-31 Thread Eric Botcazou
> Would it be OK with a pointer, but keeping the interface the same? > That's certainly fine by me. Yes, a pointer would make things more legible here. > That's one of the things I'm not sure about after the C++ conversion: > I've noticed some references creep in, but when should we use reference

Re: [5/8] Add narrow_bit_field_mem

2012-10-31 Thread Richard Sandiford
Eric Botcazou writes: >> This patch splits out a fairly common operation: that of narrowing a MEM >> to a particular mode and adjusting the bit number accordingly. >> >> I've kept with "bit_field" rather than "bitfield" for consistency with >> the callers, although we do have "bitfield" in "adjus

Re: [5/8] Add narrow_bit_field_mem

2012-10-30 Thread Eric Botcazou
> This patch splits out a fairly common operation: that of narrowing a MEM > to a particular mode and adjusting the bit number accordingly. > > I've kept with "bit_field" rather than "bitfield" for consistency with > the callers, although we do have "bitfield" in "adjust_bitfield_address". My bad

[5/8] Add narrow_bit_field_mem

2012-10-30 Thread Richard Sandiford
This patch splits out a fairly common operation: that of narrowing a MEM to a particular mode and adjusting the bit number accordingly. I've kept with "bit_field" rather than "bitfield" for consistency with the callers, although we do have "bitfield" in "adjust_bitfield_address". Tested as descri