qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH 1/2] include/qemu/int128.h: define struct Int128 according to


From: Peter Maydell
Subject: Re: [PATCH 1/2] include/qemu/int128.h: define struct Int128 according to the host endianness
Date: Thu, 26 Aug 2021 14:14:37 +0100

On Thu, 26 Aug 2021 at 14:11, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Tue, 24 Aug 2021 at 21:12, <matheus.ferst@eldorado.org.br> wrote:
> >
> > From: Matheus Ferst <matheus.ferst@eldorado.org.br>
> >
> > Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> > Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
> > ---
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

Oh, you could add a comment before the struct definition:

 /*
  * We guarantee that the in-memory byte representation of an
  * Int128 is that of a host-endian-order 128-bit integer
  * (whether using this struct or the __int128_t version of the type).
  * Some code using this type relies on this (eg when copying it into
  * guest memory or a gdb protocol buffer, or by using Int128 in
  * a union with other integer types).
  */
 struct Int128 {
     ....

so we don't forget why we put this ifdef in.

-- PMM



reply via email to

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