target/mips: Replace MO_TE by mo_endian_env() in get_pte()

Replace compile-time MO_TE evaluation by runtime mo_endian_env()
one, which expand target endianness from vCPU env.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Tested-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20241010215015.44326-5-philmd@linaro.org>
This commit is contained in:
Philippe Mathieu-Daudé 2024-09-26 18:42:28 +02:00
parent 3e10be7579
commit 2cf8226fcd

View File

@ -601,7 +601,7 @@ static bool get_pte(CPUMIPSState *env, uint64_t vaddr, MemOp op,
return false;
}
oi = make_memop_idx(op | MO_TE, ptw_mmu_idx);
oi = make_memop_idx(op | mo_endian_env(env), ptw_mmu_idx);
if (op == MO_64) {
*pte = cpu_ldq_mmu(env, vaddr, oi, 0);
} else {