[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 02/10] target: Set disassemble_info::endian value for big-endian
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 02/10] target: Set disassemble_info::endian value for big-endian targets |
Date: |
Mon, 27 Jan 2025 12:54:18 +0100 |
Have the CPUClass::disas_set_info() callback set the
disassemble_info::endian field for big-endian targets.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/hppa/cpu.c | 1 +
target/m68k/cpu.c | 1 +
target/openrisc/cpu.c | 1 +
target/s390x/cpu.c | 1 +
target/sparc/cpu.c | 1 +
5 files changed, 5 insertions(+)
diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c
index f2441d4d7fb..1bc5cd746ec 100644
--- a/target/hppa/cpu.c
+++ b/target/hppa/cpu.c
@@ -144,6 +144,7 @@ static int hppa_cpu_mmu_index(CPUState *cs, bool ifetch)
static void hppa_cpu_disas_set_info(CPUState *cs, disassemble_info *info)
{
info->mach = bfd_mach_hppa20;
+ info->endian = BFD_ENDIAN_BIG;
info->print_insn = print_insn_hppa;
}
diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c
index 5eac4a38c62..ff167aaea71 100644
--- a/target/m68k/cpu.c
+++ b/target/m68k/cpu.c
@@ -122,6 +122,7 @@ static void m68k_cpu_reset_hold(Object *obj, ResetType type)
static void m68k_cpu_disas_set_info(CPUState *s, disassemble_info *info)
{
info->print_insn = print_insn_m68k;
+ info->endian = BFD_ENDIAN_BIG;
info->mach = 0;
}
diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c
index 0669ba2fd10..b81179bbbaa 100644
--- a/target/openrisc/cpu.c
+++ b/target/openrisc/cpu.c
@@ -83,6 +83,7 @@ static int openrisc_cpu_mmu_index(CPUState *cs, bool ifetch)
static void openrisc_disas_set_info(CPUState *cpu, disassemble_info *info)
{
+ info->endian = BFD_ENDIAN_BIG;
info->print_insn = print_insn_or1k;
}
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
index 3bea014f9ee..972d265478d 100644
--- a/target/s390x/cpu.c
+++ b/target/s390x/cpu.c
@@ -243,6 +243,7 @@ static void s390_cpu_disas_set_info(CPUState *cpu,
disassemble_info *info)
{
info->mach = bfd_mach_s390_64;
info->cap_arch = CS_ARCH_SYSZ;
+ info->endian = BFD_ENDIAN_BIG;
info->cap_insn_unit = 2;
info->cap_insn_split = 6;
}
diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c
index e3b46137178..9fd222e4c82 100644
--- a/target/sparc/cpu.c
+++ b/target/sparc/cpu.c
@@ -106,6 +106,7 @@ static bool sparc_cpu_exec_interrupt(CPUState *cs, int
interrupt_request)
static void cpu_sparc_disas_set_info(CPUState *cpu, disassemble_info *info)
{
info->print_insn = print_insn_sparc;
+ info->endian = BFD_ENDIAN_BIG;
#ifdef TARGET_SPARC64
info->mach = bfd_mach_sparc_v9b;
#endif
--
2.47.1
- [PATCH 00/10] disas: Have CPUClass::disas_set_info() callback set the endianness, Philippe Mathieu-Daudé, 2025/01/27
- [PATCH 01/10] target: Set disassemble_info::endian value for little-endian targets, Philippe Mathieu-Daudé, 2025/01/27
- [PATCH 02/10] target: Set disassemble_info::endian value for big-endian targets,
Philippe Mathieu-Daudé <=
- [PATCH 03/10] target/arm: Set disassemble_info::endian value in disas_set_info(), Philippe Mathieu-Daudé, 2025/01/27
- [PATCH 04/10] target/microblaze: Set disassemble_info::endian value in disas_set_info, Philippe Mathieu-Daudé, 2025/01/27
- [PATCH 05/10] target/mips: Set disassemble_info::endian value in disas_set_info(), Philippe Mathieu-Daudé, 2025/01/27
- [PATCH 06/10] target/ppc: Set disassemble_info::endian value in disas_set_info(), Philippe Mathieu-Daudé, 2025/01/27