@@ -27,6 +27,11 @@
#include "fpu/softfloat.h"
+static bool alpha_cpu_datapath_is_big_endian(CPUState *cs)
+{
+ return false;
+}
+
static void alpha_cpu_set_pc(CPUState *cs, vaddr value)
{
CPUAlphaState *env = cpu_env(cs);
@@ -247,6 +252,7 @@ static void alpha_cpu_class_init(ObjectClass *oc, void *data)
&acc->parent_realize);
cc->class_by_name = alpha_cpu_class_by_name;
+ cc->datapath_is_big_endian = alpha_cpu_datapath_is_big_endian;
cc->has_work = alpha_cpu_has_work;
cc->mmu_index = alpha_cpu_mmu_index;
cc->dump_state = alpha_cpu_dump_state;
@@ -159,6 +159,11 @@ static ObjectClass *avr_cpu_class_by_name(const char *cpu_model)
return object_class_by_name(cpu_model);
}
+static bool avr_cpu_datapath_is_big_endian(CPUState *cs)
+{
+ return false;
+}
+
static void avr_cpu_dump_state(CPUState *cs, FILE *f, int flags)
{
CPUAVRState *env = cpu_env(cs);
@@ -230,7 +235,7 @@ static void avr_cpu_class_init(ObjectClass *oc, void *data)
&mcc->parent_phases);
cc->class_by_name = avr_cpu_class_by_name;
-
+ cc->datapath_is_big_endian = avr_cpu_datapath_is_big_endian;
cc->has_work = avr_cpu_has_work;
cc->mmu_index = avr_cpu_mmu_index;
cc->dump_state = avr_cpu_dump_state;
@@ -2008,6 +2008,11 @@ static char *x86_cpu_class_get_model_name(X86CPUClass *cc)
return cpu_model_from_type(class_name);
}
+static bool x86_cpu_datapath_is_big_endian(CPUState *cs)
+{
+ return false;
+}
+
typedef struct X86CPUVersionDefinition {
X86CPUVersion version;
const char *alias;
@@ -8588,6 +8593,7 @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data)
cc->class_by_name = x86_cpu_class_by_name;
cc->parse_features = x86_cpu_parse_featurestr;
+ cc->datapath_is_big_endian = x86_cpu_datapath_is_big_endian;
cc->has_work = x86_cpu_has_work;
cc->mmu_index = x86_cpu_mmu_index;
cc->dump_state = x86_cpu_dump_state;
@@ -742,6 +742,11 @@ static ObjectClass *loongarch_cpu_class_by_name(const char *cpu_model)
return oc;
}
+static bool loongarch_cpu_datapath_is_big_endian(CPUState *cs)
+{
+ return false;
+}
+
void loongarch_cpu_dump_state(CPUState *cs, FILE *f, int flags)
{
CPULoongArchState *env = cpu_env(cs);
@@ -836,6 +841,7 @@ static void loongarch_cpu_class_init(ObjectClass *c, void *data)
&lacc->parent_phases);
cc->class_by_name = loongarch_cpu_class_by_name;
+ cc->datapath_is_big_endian = loongarch_cpu_datapath_is_big_endian;
cc->has_work = loongarch_cpu_has_work;
cc->mmu_index = loongarch_cpu_mmu_index;
cc->dump_state = loongarch_cpu_dump_state;
@@ -29,6 +29,11 @@ static inline void set_feature(CPUTriCoreState *env, int feature)
env->features |= 1ULL << feature;
}
+static bool tricore_cpu_datapath_is_big_endian(CPUState *cs)
+{
+ return false;
+}
+
static const gchar *tricore_gdb_arch_name(CPUState *cs)
{
return "tricore";
@@ -191,6 +196,7 @@ static void tricore_cpu_class_init(ObjectClass *c, void *data)
resettable_class_set_parent_phases(rc, NULL, tricore_cpu_reset_hold, NULL,
&mcc->parent_phases);
cc->class_by_name = tricore_cpu_class_by_name;
+ cc->datapath_is_big_endian = tricore_cpu_datapath_is_big_endian;
cc->has_work = tricore_cpu_has_work;
cc->mmu_index = tricore_cpu_mmu_index;
For all targets which have endianness architecturally predefined as little endian (built using TARGET_BIG_ENDIAN=n), their datapath_is_big_endian() handler simply returns %false. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- target/alpha/cpu.c | 6 ++++++ target/avr/cpu.c | 7 ++++++- target/i386/cpu.c | 6 ++++++ target/loongarch/cpu.c | 6 ++++++ target/tricore/cpu.c | 6 ++++++ 5 files changed, 30 insertions(+), 1 deletion(-)