diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-05-19 17:29:27 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-05-23 18:54:28 -0700 |
commit | fbea7a4084e54f3e604da0b4f8b36ac457d7efc8 (patch) | |
tree | 1a01bbda4801a634509da8c7369198309a45724e /target/sparc | |
parent | d54a20b9dda55d3d1492e447680da80ebc05b76b (diff) | |
download | qemu-fbea7a4084e54f3e604da0b4f8b36ac457d7efc8.zip qemu-fbea7a4084e54f3e604da0b4f8b36ac457d7efc8.tar.gz qemu-fbea7a4084e54f3e604da0b4f8b36ac457d7efc8.tar.bz2 |
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>
Diffstat (limited to 'target/sparc')
-rw-r--r-- | target/sparc/ldst_helper.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c index 7972d56..981a47d 100644 --- a/target/sparc/ldst_helper.c +++ b/target/sparc/ldst_helper.c @@ -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(); |