[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 24/55] target/arm: fetch code with translator_ld
From: |
Alex Bennée |
Subject: |
[PATCH v5 24/55] target/arm: fetch code with translator_ld |
Date: |
Mon, 14 Oct 2019 11:49:17 +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 v5 04/55] translate-all: use cpu_in_exclusive_work_context() in tb_flush, (continued)
- [PATCH v5 04/55] translate-all: use cpu_in_exclusive_work_context() in tb_flush, Alex Bennée, 2019/10/14
- [PATCH v5 05/55] docs/devel: add plugins.rst design document, Alex Bennée, 2019/10/14
- [PATCH v5 03/55] cpu: introduce cpu_in_exclusive_context(), Alex Bennée, 2019/10/14
- [PATCH v5 06/55] configure: add --enable-plugins (MOVE TO END), Alex Bennée, 2019/10/14
- [PATCH v5 02/55] trace: add mmu_index to mem_info, Alex Bennée, 2019/10/14
- [PATCH v5 09/55] plugin: add implementation of the api, Alex Bennée, 2019/10/14
- [PATCH v5 10/55] queue: add QTAILQ_REMOVE_SEVERAL, Alex Bennée, 2019/10/14
- [PATCH v5 07/55] plugin: add user-facing API, Alex Bennée, 2019/10/14
- [PATCH v5 11/55] cputlb: document get_page_addr_code, Alex Bennée, 2019/10/14
- [PATCH v5 24/55] target/arm: fetch code with translator_ld,
Alex Bennée <=
- [PATCH v5 22/55] plugin-gen: add plugin_insn_append, Alex Bennée, 2019/10/14
- [PATCH v5 15/55] atomic_template: add inline trace/plugin helpers, Alex Bennée, 2019/10/14
- [PATCH v5 20/55] *-user: plugin syscalls, Alex Bennée, 2019/10/14
- [PATCH v5 25/55] target/ppc: fetch code with translator_ld, Alex Bennée, 2019/10/14
- [PATCH v5 12/55] cputlb: introduce get_page_addr_code_hostp, Alex Bennée, 2019/10/14
- [PATCH v5 50/55] include/exec: wrap cpu_ldst.h in CONFIG_TCG, Alex Bennée, 2019/10/14
- [PATCH v5 21/55] cpu: hook plugin vcpu events, Alex Bennée, 2019/10/14
- [PATCH v5 37/55] vl: support -plugin option, Alex Bennée, 2019/10/14
- [PATCH v5 40/55] tests/tcg/Makefile.target: fix path to config-host.mak, Alex Bennée, 2019/10/14