[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 10/10] bitops.h: sextract64() return type should be i
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 10/10] bitops.h: sextract64() return type should be int64_t, not uint64_t |
Date: |
Wed, 11 Mar 2015 14:18:50 +0000 |
The documentation for sextract64() claims that the return type is
an int64_t, but the code itself disagrees. Fix the return type to
conform to the documentation and to bring it into line with
sextract32(), which returns int32_t.
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Message-id: address@hidden
---
include/qemu/bitops.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/qemu/bitops.h b/include/qemu/bitops.h
index 181bd46..90ca8df 100644
--- a/include/qemu/bitops.h
+++ b/include/qemu/bitops.h
@@ -354,7 +354,7 @@ static inline int32_t sextract32(uint32_t value, int start,
int length)
* Returns: the sign extended value of the bit field extracted from the
* input value.
*/
-static inline uint64_t sextract64(uint64_t value, int start, int length)
+static inline int64_t sextract64(uint64_t value, int start, int length)
{
assert(start >= 0 && length > 0 && length <= 64 - start);
/* Note that this implementation relies on right shift of signed
--
1.9.1
- [Qemu-devel] [PULL 00/10] target-arm queue, Peter Maydell, 2015/03/11
- [Qemu-devel] [PULL 10/10] bitops.h: sextract64() return type should be int64_t, not uint64_t,
Peter Maydell <=
- [Qemu-devel] [PULL 07/10] target-arm: Add missing compatible property to A57, Peter Maydell, 2015/03/11
- [Qemu-devel] [PULL 08/10] integrator/cp: Model CP control registers as sysbus device, Peter Maydell, 2015/03/11
- [Qemu-devel] [PULL 01/10] hw/arm/virt: fix cmdline parsing bug with CPU options and smp > 1, Peter Maydell, 2015/03/11
- [Qemu-devel] [PULL 09/10] integrator/cp: Implement CARDIN and WPROT signals, Peter Maydell, 2015/03/11
- [Qemu-devel] [PULL 03/10] stm32f2xx_USART: Add the stm32f2xx USART Controller, Peter Maydell, 2015/03/11
- [Qemu-devel] [PULL 05/10] stm32f205: Add the stm32f205 SoC, Peter Maydell, 2015/03/11
- [Qemu-devel] [PULL 02/10] stm32f2xx_timer: Add the stm32f2xx Timer, Peter Maydell, 2015/03/11
- [Qemu-devel] [PULL 04/10] stm32f2xx_SYSCFG: Add the stm32f2xx SYSCFG, Peter Maydell, 2015/03/11
- [Qemu-devel] [PULL 06/10] netduino2: Add the Netduino 2 Machine, Peter Maydell, 2015/03/11
- Re: [Qemu-devel] [PULL 00/10] target-arm queue, Peter Maydell, 2015/03/11