On 20 June 2016 at 15:11, Dr. David Alan Gilbert <dgilb...@redhat.com> wrote: > * Peter Maydell (peter.mayd...@linaro.org) wrote: >> I prefer a "start, length" macro to "position, position", >> because this matches what we already have for the deposit >> and extract functions in this header. > > I think it depends on the use; I agree that makes sense > for things like extracting an n-bit integer; in this case > what we have is something which is fixed at bit 51 and > another bit - we dont ever think about the difference between > those two bits.
Well, sure, sometimes device descriptions define fields in registers as "from bit X to bit Y", but we don't have two versions of extract32(). We've already settled on using "start, length" for other operations in this header, so I think we should continue in that vein, not have some things using "start, length" and others using "start, end". thanks -- PMM