[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 23/54] target/arm: fetch code with translator_ld
From: |
Alex Bennée |
Subject: |
[PATCH v6 23/54] target/arm: fetch code with translator_ld |
Date: |
Thu, 17 Oct 2019 14:15:44 +0100 |
From: "Emilio G. Cota" <address@hidden>
Now the arm_ld*_code functions are only used at translate time we can
just pass down to translator_ld functions.
Signed-off-by: Emilio G. Cota <address@hidden>
[AJB: convert from plugin_insn_append to translator_ld]
Signed-off-by: Alex Bennée <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
---
v4
- use translator_ld like the rest of them
---
target/arm/arm_ldst.h | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/target/arm/arm_ldst.h b/target/arm/arm_ldst.h
index 5e0ac8bef0..45edb108f6 100644
--- a/target/arm/arm_ldst.h
+++ b/target/arm/arm_ldst.h
@@ -20,25 +20,20 @@
#ifndef ARM_LDST_H
#define ARM_LDST_H
-#include "exec/cpu_ldst.h"
+#include "exec/translator.h"
#include "qemu/bswap.h"
/* Load an instruction and return it in the standard little-endian order */
static inline uint32_t arm_ldl_code(CPUARMState *env, target_ulong addr,
bool sctlr_b)
{
- uint32_t insn = cpu_ldl_code(env, addr);
- if (bswap_code(sctlr_b)) {
- return bswap32(insn);
- }
- return insn;
+ return translator_ldl_swap(env, addr, bswap_code(sctlr_b));
}
/* Ditto, for a halfword (Thumb) instruction */
static inline uint16_t arm_lduw_code(CPUARMState *env, target_ulong addr,
bool sctlr_b)
{
- uint16_t insn;
#ifndef CONFIG_USER_ONLY
/* In big-endian (BE32) mode, adjacent Thumb instructions have been swapped
within each word. Undo that now. */
@@ -46,11 +41,7 @@ static inline uint16_t arm_lduw_code(CPUARMState *env,
target_ulong addr,
addr ^= 2;
}
#endif
- insn = cpu_lduw_code(env, addr);
- if (bswap_code(sctlr_b)) {
- return bswap16(insn);
- }
- return insn;
+ return translator_lduw_swap(env, addr, bswap_code(sctlr_b));
}
#endif
--
2.20.1
- [PATCH v6 01/54] trace: expand mem_info:size_shift to 4 bits, (continued)
- [PATCH v6 01/54] trace: expand mem_info:size_shift to 4 bits, Alex Bennée, 2019/10/17
- [PATCH v6 03/54] cpu: introduce cpu_in_exclusive_context(), Alex Bennée, 2019/10/17
- [PATCH v6 04/54] translate-all: use cpu_in_exclusive_work_context() in tb_flush, Alex Bennée, 2019/10/17
- [PATCH v6 12/54] tcg: add tcg_gen_st_ptr, Alex Bennée, 2019/10/17
- [PATCH v6 02/54] trace: add mmu_index to mem_info, Alex Bennée, 2019/10/17
- [PATCH v6 06/54] plugin: add user-facing API, Alex Bennée, 2019/10/17
- [PATCH v6 08/54] plugin: add implementation of the api, Alex Bennée, 2019/10/17
- [PATCH v6 05/54] docs/devel: add plugins.rst design document, Alex Bennée, 2019/10/17
- [PATCH v6 09/54] queue: add QTAILQ_REMOVE_SEVERAL, Alex Bennée, 2019/10/17
- [PATCH v6 10/54] cputlb: document get_page_addr_code, Alex Bennée, 2019/10/17
- [PATCH v6 23/54] target/arm: fetch code with translator_ld,
Alex Bennée <=
- [PATCH v6 21/54] plugin-gen: add plugin_insn_append, Alex Bennée, 2019/10/17
- [PATCH v6 19/54] *-user: plugin syscalls, Alex Bennée, 2019/10/17
- [PATCH v6 11/54] cputlb: introduce get_page_addr_code_hostp, Alex Bennée, 2019/10/17
- [PATCH v6 07/54] plugin: add core code, Alex Bennée, 2019/10/17
- [PATCH v6 42/54] tests/plugin: add sample plugins, Alex Bennée, 2019/10/17
- [PATCH v6 24/54] target/ppc: fetch code with translator_ld, Alex Bennée, 2019/10/17
- [PATCH v6 13/54] plugin-gen: add module for TCG-related code, Alex Bennée, 2019/10/17
- [PATCH v6 39/54] plugin: add qemu_plugin_outs helper, Alex Bennée, 2019/10/17
- [PATCH v6 29/54] target/alpha: fetch code with translator_ld, Alex Bennée, 2019/10/17