[PATCH 0/4] system/memory: Allow restricting legacy 'native-endian' APIs

Philippe Mathieu-Daudé posted 4 patches 1 month, 3 weeks ago
Failed in applying to current master (apply log)
docs/devel/loads-stores.rst                  | 10 +--
configs/targets/aarch64-softmmu.mak          |  1 +
configs/targets/alpha-softmmu.mak            |  1 +
configs/targets/arm-softmmu.mak              |  1 +
configs/targets/avr-softmmu.mak              |  1 +
configs/targets/hppa-softmmu.mak             |  1 +
configs/targets/i386-softmmu.mak             |  1 +
configs/targets/loongarch64-softmmu.mak      |  1 +
configs/targets/m68k-softmmu.mak             |  1 +
configs/targets/microblaze-softmmu.mak       |  1 +
configs/targets/microblazeel-softmmu.mak     |  1 +
configs/targets/mips-softmmu.mak             |  1 +
configs/targets/mips64-softmmu.mak           |  1 +
configs/targets/mips64el-softmmu.mak         |  1 +
configs/targets/mipsel-softmmu.mak           |  1 +
configs/targets/or1k-softmmu.mak             |  1 +
configs/targets/ppc-softmmu.mak              |  1 +
configs/targets/ppc64-softmmu.mak            |  1 +
configs/targets/riscv32-softmmu.mak          |  1 +
configs/targets/riscv64-softmmu.mak          |  1 +
configs/targets/rx-softmmu.mak               |  1 +
configs/targets/s390x-softmmu.mak            |  1 +
configs/targets/sh4-softmmu.mak              |  1 +
configs/targets/sh4eb-softmmu.mak            |  1 +
configs/targets/sparc-softmmu.mak            |  1 +
configs/targets/sparc64-softmmu.mak          |  1 +
configs/targets/tricore-softmmu.mak          |  1 +
configs/targets/x86_64-softmmu.mak           |  1 +
configs/targets/xtensa-softmmu.mak           |  1 +
configs/targets/xtensaeb-softmmu.mak         |  1 +
include/accel/tcg/cpu-ldst.h                 |  2 +
include/exec/translator.h                    |  2 +-
include/qemu/bswap.h                         |  5 ++
include/system/memory_cached.h               |  2 +
system/memory-internal.h                     |  2 +
include/exec/memory_ldst.h.inc               |  2 +
include/exec/memory_ldst_cached.h.inc        | 30 +++++++++
include/exec/memory_ldst_phys.h.inc          |  2 +
include/system/memory_ldst_endian.h.inc      |  4 ++
include/system/memory_ldst_phys_endian.h.inc | 10 +++
system/memory.c                              | 68 ++++++++++++++------
system/memory_ldst.c.inc                     |  2 +
scripts/make-config-poison.sh                |  1 +
43 files changed, 146 insertions(+), 25 deletions(-)
[PATCH 0/4] system/memory: Allow restricting legacy 'native-endian' APIs
Posted by Philippe Mathieu-Daudé 1 month, 3 weeks ago
Have all targets set the TARGET_USE_LEGACY_NATIVE_ENDIAN_API
definition, then restrict our headers to only expose legacy
"native" endian declarations when this definition exists.
This will allow us to gradually clean the repository,
eventually removing the legacy API.

(The motivation is the single-binary project).

Philippe Mathieu-Daudé (4):
  system/memory: Use explicit endianness in ram_device::read/write()
  system/memory: Introduce LD/ST helpers with @m suffix (for MemOp)
  configs/targets: Introduce TARGET_USE_LEGACY_NATIVE_ENDIAN_API
  system/memory: Restrict legacy 'native-endian' APIs

 docs/devel/loads-stores.rst                  | 10 +--
 configs/targets/aarch64-softmmu.mak          |  1 +
 configs/targets/alpha-softmmu.mak            |  1 +
 configs/targets/arm-softmmu.mak              |  1 +
 configs/targets/avr-softmmu.mak              |  1 +
 configs/targets/hppa-softmmu.mak             |  1 +
 configs/targets/i386-softmmu.mak             |  1 +
 configs/targets/loongarch64-softmmu.mak      |  1 +
 configs/targets/m68k-softmmu.mak             |  1 +
 configs/targets/microblaze-softmmu.mak       |  1 +
 configs/targets/microblazeel-softmmu.mak     |  1 +
 configs/targets/mips-softmmu.mak             |  1 +
 configs/targets/mips64-softmmu.mak           |  1 +
 configs/targets/mips64el-softmmu.mak         |  1 +
 configs/targets/mipsel-softmmu.mak           |  1 +
 configs/targets/or1k-softmmu.mak             |  1 +
 configs/targets/ppc-softmmu.mak              |  1 +
 configs/targets/ppc64-softmmu.mak            |  1 +
 configs/targets/riscv32-softmmu.mak          |  1 +
 configs/targets/riscv64-softmmu.mak          |  1 +
 configs/targets/rx-softmmu.mak               |  1 +
 configs/targets/s390x-softmmu.mak            |  1 +
 configs/targets/sh4-softmmu.mak              |  1 +
 configs/targets/sh4eb-softmmu.mak            |  1 +
 configs/targets/sparc-softmmu.mak            |  1 +
 configs/targets/sparc64-softmmu.mak          |  1 +
 configs/targets/tricore-softmmu.mak          |  1 +
 configs/targets/x86_64-softmmu.mak           |  1 +
 configs/targets/xtensa-softmmu.mak           |  1 +
 configs/targets/xtensaeb-softmmu.mak         |  1 +
 include/accel/tcg/cpu-ldst.h                 |  2 +
 include/exec/translator.h                    |  2 +-
 include/qemu/bswap.h                         |  5 ++
 include/system/memory_cached.h               |  2 +
 system/memory-internal.h                     |  2 +
 include/exec/memory_ldst.h.inc               |  2 +
 include/exec/memory_ldst_cached.h.inc        | 30 +++++++++
 include/exec/memory_ldst_phys.h.inc          |  2 +
 include/system/memory_ldst_endian.h.inc      |  4 ++
 include/system/memory_ldst_phys_endian.h.inc | 10 +++
 system/memory.c                              | 68 ++++++++++++++------
 system/memory_ldst.c.inc                     |  2 +
 scripts/make-config-poison.sh                |  1 +
 43 files changed, 146 insertions(+), 25 deletions(-)

-- 
2.52.0