[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 04/10] softfloat: Drop [u]int16 types in favo
From: |
Aurelien Jarno |
Subject: |
Re: [Qemu-devel] [PATCH v5 04/10] softfloat: Drop [u]int16 types in favor of [u]int_fast16_t |
Date: |
Tue, 8 Mar 2011 00:37:55 +0100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Mon, Mar 07, 2011 at 11:14:11PM +0000, Peter Maydell wrote:
> On 7 March 2011 09:56, Aurelien Jarno <address@hidden> wrote:
> > On Mon, Mar 07, 2011 at 01:34:07AM +0100, Andreas Färber wrote:
> >> AIX already didn't use our definition, so let's start ripping out this one:
> >> As pointed out by Peter Maydell, int16 is currently int on most
> >> supported platforms, so let's replace it with int_fast16_t,
> >> allowing the system to use a wider type if appropriate.
> >
> > Do you have a rationale about the use of the fast version of the types?
> > As you said it allows the compiler to use a wider type if appropriate,
> > and this usually doesn't play very well when shifts are involved, which
> > is the case of the softfloat code. Have you verified that each
> > conversion is correct? On the other hand I really doubt it has a
> > measurable impact on speed.
> >
> > I would really go for uint16_t for now. This might be changed to the fast
> > version in a second step if we are sure everything is correct, but let's
> > don't mix the two steps for now.
>
> As Andreas says, the code as it is at the moment makes the "wider
> is OK" vs "exact width only" distinction, it just isn't using the
> standard typenames to do it. So changing "int16" to "int16_t" would
> be the change of semantics (both in theory and in practice, since at
> the moment "int16" is int).
>
I understand your point, but OTOH int_fast16_t means at least int16_t so
in practice it doesn't bring anything more than changing to int16_t,
except more pain as the size actually depends on the host.
If we want to change the int here, we should either use int32_t here
(which matches the size of int), or just look case by case and use the
correct type.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
address@hidden http://www.aurel32.net
- Re: [Qemu-devel] [PATCH v5 10/10] softfloat: Use [u]int_fast64_t consistently, (continued)
- Re: [Qemu-devel] [PATCH v5 07/10] softfloat: Drop [u]int32 types in favor of [u]int_fast32_t, Aurelien Jarno, 2011/03/07
- Re: [Qemu-devel] [PATCH v5 07/10] softfloat: Drop [u]int32 types in favor of [u]int_fast32_t, Andreas Färber, 2011/03/07
- Re: [Qemu-devel] [PATCH v5 07/10] softfloat: Drop [u]int32 types in favor of [u]int_fast32_t, Aurelien Jarno, 2011/03/07
- Re: [Qemu-devel] [PATCH v5 04/10] softfloat: Drop [u]int16 types in favor of [u]int_fast16_t, Aurelien Jarno, 2011/03/07
- Re: [Qemu-devel] [PATCH v5 04/10] softfloat: Drop [u]int16 types in favor of [u]int_fast16_t, Andreas Färber, 2011/03/07
- Re: [Qemu-devel] [PATCH v5 04/10] softfloat: Drop [u]int16 types in favor of [u]int_fast16_t, Aurelien Jarno, 2011/03/07
- Re: [Qemu-devel] [PATCH v5 04/10] softfloat: Drop [u]int16 types in favor of [u]int_fast16_t, Peter Maydell, 2011/03/07
- Re: [Qemu-devel] [PATCH v5 04/10] softfloat: Drop [u]int16 types in favor of [u]int_fast16_t,
Aurelien Jarno <=
- Re: [Qemu-devel] [PATCH v5 04/10] softfloat: Drop [u]int16 types in favor of [u]int_fast16_t, Peter Maydell, 2011/03/08
- Re: [Qemu-devel] [PATCH v5 04/10] softfloat: Drop [u]int16 types in favor of [u]int_fast16_t, Aurelien Jarno, 2011/03/08
- Re: [Qemu-devel] [PATCH v5 04/10] softfloat: Drop [u]int16 types in favor of [u]int_fast16_t, Andreas Färber, 2011/03/08
- Re: [Qemu-devel] [PATCH v5 04/10] softfloat: Drop [u]int16 types in favor of [u]int_fast16_t, Aurelien Jarno, 2011/03/21
- Re: [Qemu-devel] [PATCH v5 03/10] softfloat: Drop [s]bits{8, 16, 32, 64} types in favor of [u]int{8, 16, 32, 64}_t, Aurelien Jarno, 2011/03/07
Re: [Qemu-devel] [PATCH v5 02/10] softfloat: Resolve type mismatches between declaration and implementation, Aurelien Jarno, 2011/03/07
Re: [Qemu-devel] [PATCH v5 01/10] [RESEND] softfloat: Prepend QEMU-style header with derivation notice, Aurelien Jarno, 2011/03/07