[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/2] Provide sextract32() and sextract64()
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 0/2] Provide sextract32() and sextract64() |
Date: |
Fri, 19 Jul 2013 12:02:12 +0100 |
Ping^2 !
thanks
-- PMM
On 12 July 2013 16:05, Peter Maydell <address@hidden> wrote:
> Ping!
>
> thanks
> -- PMM
>
> On 28 June 2013 12:40, Peter Maydell <address@hidden> wrote:
>> A common operation in instruction decoding is to take a field
>> from an instruction that represents a signed integer in some
>> arbitrary number of bits, and sign extend it into a C signed
>> integer type for manipulation. Provide new functions sextract32()
>> and sextract64() which perform this operation; they are like
>> the existing extract32() and extract64() except that the field
>> is sign-extended into the returned result.
>>
>> I agree with Markus that sign-extending versions of our
>> extract functions are more flexible than the simple sext()
>> I proposed in an earlier RFC, hence the switch in this patch.
>> The other change is patch 2, which provides some simple test
>> cases. (Will be handy if we ever decide to revamp to avoid
>> the dependency on shift-left-signed behaviour.)
>>
>> Peter Maydell (2):
>> bitops: Provide sextract32() and sextract64()
>> tests: Add test-bitops.c with some sextract tests
>>
>> include/qemu/bitops.h | 50 +++++++++++++++++++++++++++++++++
>> tests/Makefile | 2 ++
>> tests/test-bitops.c | 75
>> +++++++++++++++++++++++++++++++++++++++++++++++++
>> 3 files changed, 127 insertions(+)
>> create mode 100644 tests/test-bitops.c
>>