On 9/30/24 02:10, Philippe Mathieu-Daudé wrote:
In order to re-use cpu_is_bigendian(), declare it on "internal.h"
after renaming it as cpu_is_bigendian_env().
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
target/mips/internal.h | 6 ++++++
target/mips/tcg/ldst_helper.c | 15 +++++----------
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/target/mips/internal.h b/target/mips/internal.h
index a9a22ea00e..1ce2bbf62d 100644
--- a/target/mips/internal.h
+++ b/target/mips/internal.h
@@ -9,6 +9,7 @@
#define MIPS_INTERNAL_H
#include "exec/memattrs.h"
+#include "exec/memop.h"
#ifdef CONFIG_TCG
#include "tcg/tcg-internal.h"
#endif
@@ -287,6 +288,11 @@ static inline int mips_vp_active(CPUMIPSState *env)
return 1;
}
+static inline bool cpu_is_bigendian_env(CPUMIPSState *env)
+{
+ return extract32(env->CP0_Config0, CP0C0_BE, 1);
+}
Using the cpu_is_bigendian name for DisasContext is the error I think.
r~