[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 1/6] target-mips: Stop using uint_fast*_t types in r4
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 1/6] target-mips: Stop using uint_fast*_t types in r4k_tlb_t struct |
Date: |
Fri, 19 Feb 2016 16:36:50 +0000 |
The r4k_tlb_t structure uses the uint_fast*_t types. Most of these
uses are in bitfields and are thus pointless, because the bitfield
itself specifies the width of the type; just use 'unsigned int'
instead. (On glibc uint_fast16_t is defined as either 32 or 64 bits,
so we know the code is not reliant on it being exactly 16 bits.)
There is also one use of uint_fast8_t, which we replace with uint8_t,
because both are exactly 8 bits on glibc and this is the only
place outside the softfloat code which uses an int_fast*_t type.
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Aurelien Jarno <address@hidden>
---
target-mips/cpu.h | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/target-mips/cpu.h b/target-mips/cpu.h
index 17817c3..86b6333 100644
--- a/target-mips/cpu.h
+++ b/target-mips/cpu.h
@@ -19,19 +19,19 @@ typedef struct r4k_tlb_t r4k_tlb_t;
struct r4k_tlb_t {
target_ulong VPN;
uint32_t PageMask;
- uint_fast8_t ASID;
- uint_fast16_t G:1;
- uint_fast16_t C0:3;
- uint_fast16_t C1:3;
- uint_fast16_t V0:1;
- uint_fast16_t V1:1;
- uint_fast16_t D0:1;
- uint_fast16_t D1:1;
- uint_fast16_t XI0:1;
- uint_fast16_t XI1:1;
- uint_fast16_t RI0:1;
- uint_fast16_t RI1:1;
- uint_fast16_t EHINV:1;
+ uint8_t ASID;
+ unsigned int G:1;
+ unsigned int C0:3;
+ unsigned int C1:3;
+ unsigned int V0:1;
+ unsigned int V1:1;
+ unsigned int D0:1;
+ unsigned int D1:1;
+ unsigned int XI0:1;
+ unsigned int XI1:1;
+ unsigned int RI0:1;
+ unsigned int RI1:1;
+ unsigned int EHINV:1;
uint64_t PFN[2];
};
--
1.9.1
- [Qemu-devel] [PULL 0/6] softfloat queue, Peter Maydell, 2016/02/19
- [Qemu-devel] [PULL 1/6] target-mips: Stop using uint_fast*_t types in r4k_tlb_t struct,
Peter Maydell <=
- [Qemu-devel] [PULL 3/6] fpu: Use plain 'int' rather than 'int_fast16_t' for shift counts, Peter Maydell, 2016/02/19
- [Qemu-devel] [PULL 2/6] fpu: Remove use of int_fast16_t in conversions to int16, Peter Maydell, 2016/02/19
- [Qemu-devel] [PULL 6/6] MAINTAINERS: Add section for FPU emulation, Peter Maydell, 2016/02/19
- [Qemu-devel] [PULL 5/6] osdep.h: Remove int_fast*_t Solaris compatibility code, Peter Maydell, 2016/02/19
- [Qemu-devel] [PULL 4/6] fpu: Use plain 'int' rather than 'int_fast16_t' for exponents, Peter Maydell, 2016/02/19
- Re: [Qemu-devel] [PULL 0/6] softfloat queue, Peter Maydell, 2016/02/19