On 1/7/26 07:05, Philippe Mathieu-Daudé wrote:
> 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é <philmd@linaro.org>
>>> ---
>>> 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?
Eh. You wouldn't suggest this for x86, surely?
r~