[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 6/8] target/mips: Implement CPUClass::is_big_endian
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 6/8] target/mips: Implement CPUClass::is_big_endian |
Date: |
Fri, 4 Oct 2024 13:21:16 -0300 |
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/mips/cpu.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/target/mips/cpu.c b/target/mips/cpu.c
index 89655b1900f..ad70ad802a7 100644
--- a/target/mips/cpu.c
+++ b/target/mips/cpu.c
@@ -132,6 +132,11 @@ static vaddr mips_cpu_get_pc(CPUState *cs)
return cpu->env.active_tc.PC;
}
+static bool mips_cpu_is_big_endian(CPUState *cs)
+{
+ return mips_env_is_bigendian(cpu_env(cs));
+}
+
static bool mips_cpu_has_work(CPUState *cs)
{
CPUMIPSState *env = cpu_env(cs);
@@ -577,6 +582,7 @@ static void mips_cpu_class_init(ObjectClass *c, void *data)
&mcc->parent_phases);
cc->class_by_name = mips_cpu_class_by_name;
+ cc->is_big_endian = mips_cpu_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 0/8] hw/core/cpu: Expose cpu_is_big_endian() method, Philippe Mathieu-Daudé, 2024/10/04
- [PATCH 3/8] target/arm: Implement CPUClass::is_big_endian, Philippe Mathieu-Daudé, 2024/10/04
- [PATCH 4/8] target/microblaze: Implement CPUClass::is_big_endian, Philippe Mathieu-Daudé, 2024/10/04
- [PATCH 5/8] target/mips: Declare mips_env_is_bigendian() in 'internal.h', Philippe Mathieu-Daudé, 2024/10/04
- [PATCH 6/8] target/mips: Implement CPUClass::is_big_endian,
Philippe Mathieu-Daudé <=
- [PATCH 7/8] target/ppc: Register CPUClass::is_big_endian, Philippe Mathieu-Daudé, 2024/10/04
- [PATCH 8/8] hw/core/cpu: Expose cpu_is_big_endian() method, Philippe Mathieu-Daudé, 2024/10/04