On 6/1/26 20:00, Richard Henderson wrote:
On 1/7/26 02:57, Philippe Mathieu-Daudé wrote:
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
  target/alpha/translate.c | 7 ++++++-
  1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/target/alpha/translate.c b/target/alpha/translate.c
index 3be97057465..4f918cbfe63 100644
--- a/target/alpha/translate.c
+++ b/target/alpha/translate.c
@@ -96,6 +96,11 @@ static TCGv cpu_lock_value;
  static TCGv cpu_pal_ir[31];
  #endif
+static inline MemOp mo_endian(DisasContext *dc)
+{
+    return MO_TE;
+}
+
  void alpha_translate_init(void)
  {
  #define DEF_VAR(V)  { &cpu_##V, #V, offsetof(CPUAlphaState, V) }
@@ -2905,7 +2910,7 @@ static void alpha_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu)
  {
      DisasContext *ctx = container_of(dcbase, DisasContext, base);
      uint32_t insn = translator_ldl_end(cpu_env(cpu), &ctx->base,
-                                       ctx->base.pc_next, MO_TE);
+                                       ctx->base.pc_next, mo_endian(ctx));
      ctx->base.pc_next += 4;
      ctx->base.is_jmp = translate_one(ctx, insn);

I don't think we need this or the next.

Shouldn't we define mo_endian() for each target for consistency?

The note about big-endian cray alpha was a mere curiosity.

Well, I like it and it doesn't hurt :)

Reply via email to