qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] slirp: Use lduw_be_p in slirp_input


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] slirp: Use lduw_be_p in slirp_input
Date: Fri, 18 Jan 2019 11:54:38 +0000

On Fri, 18 Jan 2019 at 11:37, Marc-André Lureau
<address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]