[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 11/20] target/mips: Implement CPUClass::datapath_is_big_endian
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 11/20] target/mips: Implement CPUClass::datapath_is_big_endian |
Date: |
Wed, 4 Dec 2024 21:25:53 +0100 |
Implement MIPS datapath_is_big_endian() handler using
the already existing mips_env_is_bigendian() method.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/mips/cpu.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/target/mips/cpu.c b/target/mips/cpu.c
index d0a43b6d5c7..13d0ceaa8af 100644
--- a/target/mips/cpu.c
+++ b/target/mips/cpu.c
@@ -27,6 +27,7 @@
#include "internal.h"
#include "kvm_mips.h"
#include "qemu/module.h"
+#include "sysemu/hw_accel.h"
#include "sysemu/kvm.h"
#include "sysemu/qtest.h"
#include "exec/exec-all.h"
@@ -132,6 +133,13 @@ static vaddr mips_cpu_get_pc(CPUState *cs)
return cpu->env.active_tc.PC;
}
+static bool mips_cpu_datapath_is_big_endian(CPUState *cs)
+{
+ cpu_synchronize_state(cs);
+
+ return mips_env_is_bigendian(cpu_env(cs));
+}
+
static bool mips_cpu_has_work(CPUState *cs)
{
CPUMIPSState *env = cpu_env(cs);
@@ -581,6 +589,7 @@ static void mips_cpu_class_init(ObjectClass *c, void *data)
&mcc->parent_phases);
cc->class_by_name = mips_cpu_class_by_name;
+ cc->datapath_is_big_endian = mips_cpu_datapath_is_big_endian;
cc->has_work = mips_cpu_has_work;
cc->mmu_index = mips_cpu_mmu_index;
cc->dump_state = mips_cpu_dump_state;
--
2.45.2
- [PATCH 02/20] hw/core/cpu: Introduce CPUClass::datapath_is_big_endian() handler, (continued)
- [PATCH 02/20] hw/core/cpu: Introduce CPUClass::datapath_is_big_endian() handler, Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 03/20] target/arm: Implement CPUClass::datapath_is_big_endian, Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 04/20] target/ppc: Register CPUClass::datapath_is_big_endian, Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 05/20] target/rx: Implement CPUClass::datapath_is_big_endian, Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 06/20] target/sparc: Implement CPUClass::datapath_is_big_endian, Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 07/20] target/riscv: Implement CPUClass::datapath_is_big_endian, Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 08/20] target/sh4: Expose CPUSH4State::little_endian property, Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 09/20] target/sh4: Implement CPUClass::datapath_is_big_endian, Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 10/20] target/microblaze: Implement CPUClass::datapath_is_big_endian, Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 11/20] target/mips: Implement CPUClass::datapath_is_big_endian,
Philippe Mathieu-Daudé <=
- [PATCH 12/20] target/xtensa: Implement xtensa_isa_is_big_endian(), Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 13/20] target/xtensa: Implement CPUClass::datapath_is_big_endian, Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 14/20] target: Implement CPUClass::datapath_is_big_endian (little-endian), Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 15/20] target: Implement CPUClass::datapath_is_big_endian (big-endian), Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 16/20] hw/core/cpu: Expose cpu_datapath_is_big_endian() method, Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 17/20] disas: Use cpu_datapath_is_big_endian(), Philippe Mathieu-Daudé, 2024/12/04
- [PATCH 18/20] hw/core/generic-loader: Use cpu_datapath_is_big_endian(), Philippe Mathieu-Daudé, 2024/12/04