mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
accel/tcg: Unify cpu_{ld,st}*_{be,le}_mmu
With the current structure of cputlb.c, there is no difference between the little-endian and big-endian entry points, aside from the assert. Unify the pairs of functions. The only use of the functions with explicit endianness was in target/sparc64, and that was only to satisfy the assert: the correct endianness is already built into memop. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
d54a20b9dd
commit
fbea7a4084
9 changed files with 144 additions and 442 deletions
|
@ -1937,8 +1937,8 @@ static bool do_v7m_function_return(ARMCPU *cpu)
|
|||
*/
|
||||
mmu_idx = arm_v7m_mmu_idx_for_secstate(env, true);
|
||||
oi = make_memop_idx(MO_LEUL, arm_to_core_mmu_idx(mmu_idx));
|
||||
newpc = cpu_ldl_le_mmu(env, frameptr, oi, 0);
|
||||
newpsr = cpu_ldl_le_mmu(env, frameptr + 4, oi, 0);
|
||||
newpc = cpu_ldl_mmu(env, frameptr, oi, 0);
|
||||
newpsr = cpu_ldl_mmu(env, frameptr + 4, oi, 0);
|
||||
|
||||
/* Consistency checks on new IPSR */
|
||||
newpsr_exc = newpsr & XPSR_EXCP;
|
||||
|
|
|
@ -1334,25 +1334,13 @@ uint64_t helper_ld_asi(CPUSPARCState *env, target_ulong addr,
|
|||
ret = cpu_ldb_mmu(env, addr, oi, GETPC());
|
||||
break;
|
||||
case 2:
|
||||
if (asi & 8) {
|
||||
ret = cpu_ldw_le_mmu(env, addr, oi, GETPC());
|
||||
} else {
|
||||
ret = cpu_ldw_be_mmu(env, addr, oi, GETPC());
|
||||
}
|
||||
ret = cpu_ldw_mmu(env, addr, oi, GETPC());
|
||||
break;
|
||||
case 4:
|
||||
if (asi & 8) {
|
||||
ret = cpu_ldl_le_mmu(env, addr, oi, GETPC());
|
||||
} else {
|
||||
ret = cpu_ldl_be_mmu(env, addr, oi, GETPC());
|
||||
}
|
||||
ret = cpu_ldl_mmu(env, addr, oi, GETPC());
|
||||
break;
|
||||
case 8:
|
||||
if (asi & 8) {
|
||||
ret = cpu_ldq_le_mmu(env, addr, oi, GETPC());
|
||||
} else {
|
||||
ret = cpu_ldq_be_mmu(env, addr, oi, GETPC());
|
||||
}
|
||||
ret = cpu_ldq_mmu(env, addr, oi, GETPC());
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue