[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 0/4] fpu: Remove use of int_fast*_t types
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PATCH 0/4] fpu: Remove use of int_fast*_t types |
Date: |
Tue, 26 Jan 2016 11:30:02 +0000 |
This patchset removes the uses of int_fast*_t types from the
softfloat code:
* the return types for the "convert to 16 bit integer" functions
are changed to int16_t
* uses of int_fast*_t for a shift count or an exponent value
are changed to int
Basically, where the type was being used to mean what should
logically be exactly 16 bits we use int16_t; where it was just
being used for a value which isn't inherently 16 bits wide
we switch to plain int.
Compatibility note: both these changes match the logical definition
of int_fast*_t so if the code was not previously buggily relying
on the width it happened to be they will not introduce any new bugs.
In practice on glibc int_fast16_t is 32-bits on 32-bit platforms
and 64-bits on 64-bit platforms so we are changing the underlying
type size. I have tested by running a bunch of ARM regression
tests with 'risu', so I'm pretty happy this doesn't cause problems.
The final patch removes some back-compat defines from osdep.h;
it depends on both the earlier patches in this series and also
on the targe-mips patch I sent out yesterday:
http://patchwork.ozlabs.org/patch/572843/
(there are no other uses of the int_fast* types in QEMU.)
thanks
-- PMM
Peter Maydell (4):
fpu: Remove use of int_fast16_t in conversions to int16
fpu: Use plain 'int' rather than 'int_fast16_t' for shift counts
fpu: Use plain 'int' rather than 'int_fast16_t' for exponents
osdep.h: Remove int_fast*_t Solaris compatibility code
fpu/softfloat-macros.h | 18 +++---
fpu/softfloat.c | 162 ++++++++++++++++++++++++++----------------------
include/fpu/softfloat.h | 16 ++---
include/qemu/osdep.h | 7 ---
4 files changed, 104 insertions(+), 99 deletions(-)
--
1.9.1
- [Qemu-devel] [PATCH 0/4] fpu: Remove use of int_fast*_t types,
Peter Maydell <=
- [Qemu-devel] [PATCH 1/4] fpu: Remove use of int_fast16_t in conversions to int16, Peter Maydell, 2016/01/26
- [Qemu-devel] [PATCH 3/4] fpu: Use plain 'int' rather than 'int_fast16_t' for exponents, Peter Maydell, 2016/01/26
- [Qemu-devel] [PATCH 4/4] osdep.h: Remove int_fast*_t Solaris compatibility code, Peter Maydell, 2016/01/26
- [Qemu-devel] [PATCH 2/4] fpu: Use plain 'int' rather than 'int_fast16_t' for shift counts, Peter Maydell, 2016/01/26
- Re: [Qemu-devel] [PATCH 0/4] fpu: Remove use of int_fast*_t types, Aurelien Jarno, 2016/01/29