[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
- [PATCH 0/2] target/ppc: Fix vextu[bhw][lr]x on big endian hosts, matheus . ferst, 2021/08/24
- [PATCH 1/2] include/qemu/int128.h: define struct Int128 according to the host endianness, matheus . ferst, 2021/08/24
- [PATCH 2/2] target/ppc: fix vextu[bhw][lr]x helpers, matheus . ferst, 2021/08/24
- Re: [PATCH 0/2] target/ppc: Fix vextu[bhw][lr]x on big endian hosts, David Gibson, 2021/08/25
- Re: [PATCH 0/2] target/ppc: Fix vextu[bhw][lr]x on big endian hosts, Philippe Mathieu-Daudé, 2021/08/25
- Re: [PATCH 0/2] target/ppc: Fix vextu[bhw][lr]x on big endian hosts, Mark Cave-Ayland, 2021/08/25