All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: "Andreas Färber" <andreas.faerber@web.de>
Cc: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
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:28:15 +0100	[thread overview]
Message-ID: <20110307232815.GC10422@hall.aurel32.net> (raw)
In-Reply-To: <8485AB60-2200-47C0-89BB-E0B9B3A2B7B8@web.de>

On Tue, Mar 08, 2011 at 12:02:39AM +0100, Andreas Färber wrote:
> Am 07.03.2011 um 10:56 schrieb Aurelien Jarno:
> 
> >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.
> 
> SoftFloat distinguishes between [s]bits* and [u]int*. Wherever
> exact-width semantics were needed, [s]bits* was used (or should have
> been) and this is converted in 03/10. It was Peter's demand [1] that
> we retain this distinction and it was my suggestion to then use
> [u]int_fast*_t, which provides such semantics for POSIX, since the
> colliding use of [u]int* and its accidental uses outside SoftFloat
> are what this series seeks to address. The difference is that with
> POSIX the semantics are system-defined whereas right now they are
> QEMU-defined.

The patch actually changes the semantic. Before int, ie 32 bit was used
for int16. With your changes it can now be 16, 32 or 64 bit depending on
the host. This is the kind of changes we don't want, it means problems
are going to depend on the host for no real reason.

This is actually what you observed later in the series: there are types
mismatch in your patches, though they match on your machine (probably
32-bit), but not on mine.

> Most of the series was crafted in a semi-automatic fashion, doing a
> search and reviewing each hit before replacing. If we drop the type
> distinction and use uint16_t for both bits16 and uint16 then we
> cannot easily do the second step you propose.
> 
> My and, I figured, Peter's intent was to do this conversion without
> changing semantics as far as possible. Softfloat-native turned out
> difficult in that aspect, since it followed the definitions of the
> header rather than the types used in the SoftFloat implementation.
> There, the conversions need more careful review of whether they
> wrongly rely on fixed-width semantics.
> 
> But seeing the persistent rate of softfloat bug fixes, I would ask
> to address the license issue sooner than later. Doesn't need to be
> my patch, if someone feels tempted to do better.
> 

I agree it is something that should be fixed, however given we are
modifying this file for more than 5 years, a few days more or less won't
change anything.

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

  reply	other threads:[~2011-03-07 23:28 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-17 17:31 [Qemu-devel] [PATCH] softfloat: Fix function signature mismatches by using POSIX integer types Andreas Färber
2010-12-17 22:39 ` [Qemu-devel] [PATCH v2] " Andreas Färber
2010-12-18 16:25   ` [Qemu-devel] [PATCH v3 1/7] apic: Don't use SoftFloat uint32 type Andreas Färber
2010-12-18 16:25     ` [Qemu-devel] [PATCH v3 2/7] wdt_ib700: Don't use SoftFloat int64 type Andreas Färber
2010-12-18 16:25       ` [Qemu-devel] [PATCH v3 3/7] target-i386: Don't use SoftFloat uint64 type Andreas Färber
2010-12-18 16:25         ` [Qemu-devel] [PATCH v3 4/7] softfloat: Resolve type mismatches between declaration and implementation Andreas Färber
2010-12-18 16:25           ` [Qemu-devel] [PATCH v3 5/7] softfloat: Drop [s]bits{8, 16, 32, 64} types in favor of [u]int{8, 16, 32, 64}_t Andreas Färber
2010-12-18 16:25             ` [Qemu-devel] [PATCH v3 6/7] softfloat: Drop [u]int16 types in favor of [u]int_fast16_t Andreas Färber
2010-12-18 16:25               ` [Qemu-devel] [PATCH v3 7/7] softfloat: Make float{32, 64}_to_uint16_round_to_zero() use uint_fast16_t Andreas Färber
2011-01-01 13:47                 ` Andreas Färber
2011-01-04 19:39                   ` [Qemu-devel] [PATCH, RFC v4 1/5] softfloat: Prepend QEMU-style header with derivation notice Andreas Färber
2011-01-04 19:39                     ` [Qemu-devel] [PATCH v4 2/5] softfloat: Resolve type mismatches between declaration and implementation Andreas Färber
2011-01-04 19:39                       ` [Qemu-devel] [PATCH v4 3/5] softfloat: Drop [s]bits{8, 16, 32, 64} types in favor of [u]int{8, 16, 32, 64}_t Andreas Färber
2011-01-04 19:39                         ` [Qemu-devel] [PATCH v4 4/5] softfloat: Drop [u]int16 types in favor of [u]int_fast16_t Andreas Färber
2011-01-04 19:39                           ` [Qemu-devel] [FYI v4 5/5] softfloat: Make float{32, 64}_to_uint16_round_to_zero() use uint_fast16_t Andreas Färber
2011-03-07  0:34                             ` [Qemu-devel] [PATCH v5 01/10] [RESEND] softfloat: Prepend QEMU-style header with derivation notice Andreas Färber
2011-03-07  0:34                               ` [Qemu-devel] [PATCH v5 02/10] softfloat: Resolve type mismatches between declaration and implementation Andreas Färber
2011-03-07  0:34                                 ` [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 Andreas Färber
2011-03-07  0:34                                   ` [Qemu-devel] [PATCH v5 04/10] softfloat: Drop [u]int16 types in favor of [u]int_fast16_t Andreas Färber
2011-03-07  0:34                                     ` [Qemu-devel] [PATCH v5 05/10] softfloat: Use [u]int_fast16_t consistently Andreas Färber
2011-03-07  0:34                                       ` [Qemu-devel] [PATCH v5 06/10] softfloat: Drop [u]int8 types in favor of int_fast8_t Andreas Färber
2011-03-07  0:34                                         ` [Qemu-devel] [PATCH v5 07/10] softfloat: Drop [u]int32 types in favor of [u]int_fast32_t Andreas Färber
2011-03-07  0:34                                           ` [Qemu-devel] [PATCH v5 08/10] softfloat: Use [u]int_fast32_t consistently Andreas Färber
2011-03-07  0:34                                             ` [Qemu-devel] [PATCH v5 09/10] softfloat: Drop [u]int64 types in favor of [u]int_fast64_t Andreas Färber
2011-03-07  0:34                                               ` [Qemu-devel] [PATCH v5 10/10] softfloat: Use [u]int_fast64_t consistently Andreas Färber
2011-03-07  9:56                                                 ` Aurelien Jarno
2011-03-07 23:10                                                   ` Andreas Färber
2011-03-08  6:04                                                     ` Aurelien Jarno
2011-03-07  9:56                                           ` [Qemu-devel] [PATCH v5 07/10] softfloat: Drop [u]int32 types in favor of [u]int_fast32_t Aurelien Jarno
2011-03-07 23:16                                             ` Andreas Färber
2011-03-07 23:33                                               ` Aurelien Jarno
2011-03-07  9:56                                     ` [Qemu-devel] [PATCH v5 04/10] softfloat: Drop [u]int16 types in favor of [u]int_fast16_t Aurelien Jarno
2011-03-07 23:02                                       ` Andreas Färber
2011-03-07 23:28                                         ` Aurelien Jarno [this message]
2011-03-07 23:14                                       ` Peter Maydell
2011-03-07 23:37                                         ` Aurelien Jarno
2011-03-08  8:29                                           ` Peter Maydell
2011-03-08  8:49                                             ` Aurelien Jarno
2011-03-08 18:54                                             ` Andreas Färber
2011-03-21 21:11                                               ` Aurelien Jarno
2011-03-07  9:56                                   ` [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  9:56                                 ` [Qemu-devel] [PATCH v5 02/10] softfloat: Resolve type mismatches between declaration and implementation Aurelien Jarno
2011-03-07  9:56                               ` [Qemu-devel] [PATCH v5 01/10] [RESEND] softfloat: Prepend QEMU-style header with derivation notice Aurelien Jarno
2010-12-19 11:28           ` [Qemu-devel] [PATCH v3 4/7] softfloat: Resolve type mismatches between declaration and implementation Blue Swirl
2010-12-19 12:06             ` Andreas Färber
2010-12-18 20:19         ` [Qemu-devel] Re: [PATCH v3 3/7] target-i386: Don't use SoftFloat uint64 type Juan Quintela
2010-12-20  0:52         ` Huang Ying
2010-12-18 16:47       ` [Qemu-devel] Re: [PATCH v3 2/7] wdt_ib700: Don't use SoftFloat int64 type Richard W.M. Jones
2010-12-19 12:51         ` Andreas Färber
2010-12-19 14:16           ` Richard W.M. Jones
2010-12-19 14:28             ` Andreas Färber
2010-12-19 14:38               ` Blue Swirl
2010-12-19 15:07                 ` Andreas Färber
2010-12-19 15:17                   ` Blue Swirl
2010-12-19 11:20     ` [Qemu-devel] [PATCH v3 1/7] apic: Don't use SoftFloat uint32 type Blue Swirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110307232815.GC10422@hall.aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=andreas.faerber@web.de \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.