[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/53] disas: Move disas.c into the target-independent source set
|
From: |
Richard Henderson |
|
Subject: |
[PULL 08/53] disas: Move disas.c into the target-independent source set |
|
Date: |
Thu, 11 May 2023 09:04:05 +0100 |
From: Thomas Huth <thuth@redhat.com>
By using target_words_bigendian() instead of an ifdef,
we can build this code once.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230508133745.109463-3-thuth@redhat.com>
[rth: Type change done in a separate patch]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
disas/disas.c | 10 +++++-----
disas/meson.build | 3 ++-
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/disas/disas.c b/disas/disas.c
index 45614af02d..f405f4762a 100644
--- a/disas/disas.c
+++ b/disas/disas.c
@@ -122,11 +122,11 @@ void disas_initialize_debug_target(CPUDebug *s, CPUState
*cpu)
s->cpu = cpu;
s->info.read_memory_func = target_read_memory;
s->info.print_address_func = print_address;
-#if TARGET_BIG_ENDIAN
- s->info.endian = BFD_ENDIAN_BIG;
-#else
- s->info.endian = BFD_ENDIAN_LITTLE;
-#endif
+ if (target_words_bigendian()) {
+ s->info.endian = BFD_ENDIAN_BIG;
+ } else {
+ s->info.endian = BFD_ENDIAN_LITTLE;
+ }
CPUClass *cc = CPU_GET_CLASS(cpu);
if (cc->disas_set_info) {
diff --git a/disas/meson.build b/disas/meson.build
index f40230c58f..832727e4b3 100644
--- a/disas/meson.build
+++ b/disas/meson.build
@@ -11,6 +11,7 @@ common_ss.add(when: 'CONFIG_SH4_DIS', if_true: files('sh4.c'))
common_ss.add(when: 'CONFIG_SPARC_DIS', if_true: files('sparc.c'))
common_ss.add(when: 'CONFIG_XTENSA_DIS', if_true: files('xtensa.c'))
common_ss.add(when: capstone, if_true: [files('capstone.c'), capstone])
+common_ss.add(files('disas.c'))
softmmu_ss.add(files('disas-mon.c'))
-specific_ss.add(files('disas.c'), capstone)
+specific_ss.add(capstone)
--
2.34.1
- [PULL 00/53] tcg patch queue, Richard Henderson, 2023/05/11
- [PULL 01/53] target/m68k: Fix gen_load_fp for OS_LONG, Richard Henderson, 2023/05/11
- [PULL 05/53] disas: Remove target_ulong from the interface, Richard Henderson, 2023/05/11
- [PULL 04/53] disas: Move disas.c to disas/, Richard Henderson, 2023/05/11
- [PULL 07/53] disas: Move softmmu specific code to separate file, Richard Henderson, 2023/05/11
- [PULL 11/53] tcg/i386: Introduce prepare_host_addr, Richard Henderson, 2023/05/11
- [PULL 13/53] tcg/aarch64: Introduce prepare_host_addr, Richard Henderson, 2023/05/11
- [PULL 08/53] disas: Move disas.c into the target-independent source set,
Richard Henderson <=
- [PULL 14/53] tcg/arm: Introduce prepare_host_addr, Richard Henderson, 2023/05/11
- [PULL 18/53] tcg/riscv: Introduce prepare_host_addr, Richard Henderson, 2023/05/11
- [PULL 09/53] cpu: expose qemu_cpu_list_lock for lock-guard use, Richard Henderson, 2023/05/11
- [PULL 02/53] accel/tcg: Fix atomic_mmu_lookup for reads, Richard Henderson, 2023/05/11
- [PULL 17/53] tcg/ppc: Introduce prepare_host_addr, Richard Henderson, 2023/05/11
- [PULL 06/53] disas: Remove target-specific headers, Richard Henderson, 2023/05/11
- [PULL 10/53] accel/tcg/tcg-accel-ops-rr: ensure fairness with icount, Richard Henderson, 2023/05/11
- [PULL 12/53] tcg/i386: Use indexed addressing for softmmu fast path, Richard Henderson, 2023/05/11
- [PULL 25/53] tcg/loongarch64: Convert tcg_out_qemu_{ld,st}_slow_path, Richard Henderson, 2023/05/11
- [PULL 26/53] tcg/mips: Convert tcg_out_qemu_{ld,st}_slow_path, Richard Henderson, 2023/05/11