qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: "Eric Blake" <eblake@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Samuel Thibault" <samuel.thibault@gnu.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Jan Kiszka" <jan.kiszka@siemens.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] slirp: Use lduw_be_p in slirp_input
Date: Fri, 18 Jan 2019 11:54:38 +0000	[thread overview]
Message-ID: <CAFEAcA99Hwg29UETpecKYrvVLM_xPV4wecr1ecgz2pAYmwuFfw@mail.gmail.com> (raw)
In-Reply-To: <CAJ+F1C+PX8d+py3q=CZAND+TkgatXjAQPNP-NXZkz+NBChmZXQ@mail.gmail.com>

On Fri, 18 Jan 2019 at 11:37, Marc-André Lureau
<marcandre.lureau@gmail.com> wrote:
> The GStreamer solution is also quite readable.
> https://gitlab.freedesktop.org/gstreamer/gstreamer/blob/master/gst/gstutils.h#L165

It has the disadvantage that you can never legitimately
set GST_HAVE_UNALIGNED_ACCESS (because it is always
undefined-behaviour by the C standard) and the slow-path
versions are slow-and-clunky. Using malloc like the QEMU
approach has the advantage of telling the compiler
what you're doing so it can emit the optimal code on
systems where it works.

thanks
-- PMM

  reply	other threads:[~2019-01-18 11:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-26  3:42 [Qemu-devel] [PATCH] slirp: Use lduw_be_p in slirp_input Richard Henderson
2018-12-26 10:57 ` Peter Maydell
2018-12-26 11:04 ` Philippe Mathieu-Daudé
2019-01-16 23:50 ` Samuel Thibault
2019-01-17  0:05   ` Richard Henderson
2019-01-17 13:16   ` Philippe Mathieu-Daudé
2019-01-17 13:22     ` Samuel Thibault
2019-01-17 13:56     ` Peter Maydell
2019-01-18 11:25       ` Marc-André Lureau
2019-01-18 11:37         ` Marc-André Lureau
2019-01-18 11:54           ` Peter Maydell [this message]
2019-01-23 11:29 ` no-reply

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=CAFEAcA99Hwg29UETpecKYrvVLM_xPV4wecr1ecgz2pAYmwuFfw@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=eblake@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=samuel.thibault@gnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).