Re: [PATCH 10/27] Replace config-time define HOST_WORDS_BIGENDIAN

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

 



On 3/16/22 10:53, marcandre.lureau@xxxxxxxxxx wrote:
From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>

Replace a config-time define with a compile time condition
define (compatible with clang and gcc) that must be declared prior to
its usage. This avoids having a global configure time define, but also
prevents from bad usage, if the config header wasn't included before.

This can help to make some code independent from qemu too.

gcc supports __BYTE_ORDER__ from about 4.6 and clang from 3.2.

Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
---
  meson.build                             |  1 -
  accel/tcg/atomic_template.h             |  4 +-
  audio/audio.h                           |  2 +-
  hw/display/pl110_template.h             |  6 +--
  hw/net/can/ctucan_core.h                |  2 +-
  hw/net/vmxnet3.h                        |  4 +-
  include/exec/cpu-all.h                  |  4 +-
  include/exec/cpu-common.h               |  2 +-
  include/exec/memop.h                    |  2 +-
  include/exec/memory.h                   |  2 +-
  include/fpu/softfloat-types.h           |  2 +-
  include/hw/core/cpu.h                   |  2 +-
  include/hw/i386/intel_iommu.h           |  6 +--
  include/hw/i386/x86-iommu.h             |  4 +-
  include/hw/virtio/virtio-access.h       |  6 +--
  include/hw/virtio/virtio-gpu-bswap.h    |  2 +-
  include/libdecnumber/dconfig.h          |  2 +-
  include/net/eth.h                       |  2 +-
  include/qemu/bswap.h                    |  8 ++--
  include/qemu/compiler.h                 |  2 +
  include/qemu/host-utils.h               |  2 +-
  include/qemu/int128.h                   |  2 +-
  include/ui/qemu-pixman.h                |  2 +-
  net/util.h                              |  2 +-
  target/arm/cpu.h                        |  8 ++--
  target/arm/translate-a64.h              |  2 +-
  target/arm/vec_internal.h               |  2 +-
  target/i386/cpu.h                       |  2 +-
  target/mips/cpu.h                       |  2 +-
  target/ppc/cpu.h                        |  2 +-
  target/s390x/tcg/vec.h                  |  2 +-
  target/xtensa/cpu.h                     |  2 +-
  tests/fp/platform.h                     |  4 +-
  accel/kvm/kvm-all.c                     |  4 +-
  audio/dbusaudio.c                       |  2 +-
  disas.c                                 |  2 +-
  hw/core/loader.c                        |  4 +-
  hw/display/artist.c                     |  6 +--
  hw/display/pxa2xx_lcd.c                 |  2 +-
  hw/display/vga.c                        | 12 +++---
  hw/display/virtio-gpu-gl.c              |  2 +-
  hw/s390x/event-facility.c               |  2 +-
  hw/virtio/vhost.c                       |  2 +-
  linux-user/arm/nwfpe/double_cpdo.c      |  4 +-
  linux-user/arm/nwfpe/fpa11_cpdt.c       |  4 +-
  linux-user/ppc/signal.c                 |  3 +-
  linux-user/syscall.c                    |  6 +--
  net/net.c                               |  4 +-
  target/alpha/translate.c                |  2 +-
  target/arm/crypto_helper.c              |  2 +-
  target/arm/helper.c                     |  2 +-
  target/arm/kvm64.c                      |  4 +-
  target/arm/neon_helper.c                |  2 +-
  target/arm/sve_helper.c                 |  4 +-
  target/arm/translate-sve.c              |  6 +--
  target/arm/translate-vfp.c              |  2 +-
  target/arm/translate.c                  |  2 +-
  target/hppa/translate.c                 |  2 +-
  target/i386/tcg/translate.c             |  2 +-
  target/mips/tcg/lmmi_helper.c           |  2 +-
  target/mips/tcg/msa_helper.c            | 54 ++++++++++++-------------
  target/ppc/arch_dump.c                  |  2 +-
  target/ppc/int_helper.c                 | 22 +++++-----
  target/ppc/kvm.c                        |  4 +-
  target/ppc/mem_helper.c                 |  2 +-
  target/riscv/vector_helper.c            |  2 +-
  target/s390x/tcg/translate.c            |  2 +-
  target/sparc/vis_helper.c               |  4 +-
  tcg/tcg-op.c                            |  4 +-
  tcg/tcg.c                               | 12 +++---
  tests/qtest/vhost-user-blk-test.c       |  2 +-
  tests/qtest/virtio-blk-test.c           |  2 +-
  ui/vdagent.c                            |  2 +-
  ui/vnc.c                                |  2 +-
  util/bitmap.c                           |  2 +-
  util/host-utils.c                       |  2 +-
  target/ppc/translate/vmx-impl.c.inc     |  4 +-
  target/ppc/translate/vsx-impl.c.inc     |  2 +-
  target/riscv/insn_trans/trans_rvv.c.inc |  4 +-
  target/s390x/tcg/translate_vx.c.inc     |  2 +-
  tcg/aarch64/tcg-target.c.inc            |  4 +-
  tcg/arm/tcg-target.c.inc                |  4 +-
  tcg/mips/tcg-target.c.inc               |  2 +-
  tcg/ppc/tcg-target.c.inc                | 10 ++---
  tcg/riscv/tcg-target.c.inc              |  4 +-
  85 files changed, 173 insertions(+), 173 deletions(-)

For the ppc part:

Reviewed-by: Cédric Le Goater <clg@xxxxxxxx>

Thanks,

C.




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux