[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/5] BIT_RANGE convenience macro

From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 1/5] BIT_RANGE convenience macro
Date: Mon, 20 Jun 2016 15:17:54 +0100

On 20 June 2016 at 15:11, Dr. David Alan Gilbert <address@hidden> wrote:
> * Peter Maydell (address@hidden) 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".

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]