[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 40/73] target/arm: fetch code with translator_ld
From: |
Alex Bennée |
Subject: |
[PULL v2 40/73] target/arm: fetch code with translator_ld |
Date: |
Fri, 25 Oct 2019 07:36:40 +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>
diff --git a/target/arm/arm_ldst.h b/target/arm/arm_ldst.h
index 5e0ac8bef06..45edb108f6a 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
- [PULL v2 19/73] cpu: introduce cpu_in_exclusive_context(), (continued)
- [PULL v2 19/73] cpu: introduce cpu_in_exclusive_context(), Alex Bennée, 2019/10/25
- [PULL v2 56/73] plugin: add qemu_plugin_outs helper, Alex Bennée, 2019/10/25
- [PULL v2 72/73] MAINTAINERS: add me for the TCG plugins code, Alex Bennée, 2019/10/25
- [PULL v2 59/73] tests/plugin: add sample plugins, Alex Bennée, 2019/10/25
- [PULL v2 22/73] plugin: add user-facing API, Alex Bennée, 2019/10/25
- [PULL v2 12/73] travis.yml: cache the clang sanitizer build, Alex Bennée, 2019/10/25
- [PULL v2 21/73] docs/devel: add plugins.rst design document, Alex Bennée, 2019/10/25
- [PULL v2 65/73] tests/plugin: add a hotblocks plugin, Alex Bennée, 2019/10/25
- [PULL v2 24/73] plugin: add implementation of the api, Alex Bennée, 2019/10/25
- [PULL v2 55/73] plugin: add qemu_plugin_insn_disas helper, Alex Bennée, 2019/10/25
- [PULL v2 40/73] target/arm: fetch code with translator_ld,
Alex Bennée <=
- [PULL v2 52/73] configure: add --enable-plugins, Alex Bennée, 2019/10/25
- [PULL v2 28/73] tcg: add tcg_gen_st_ptr, Alex Bennée, 2019/10/25
- [PULL v2 71/73] scripts/checkpatch.pl: don't complain about (foo, /* empty */), Alex Bennée, 2019/10/25
- [PULL v2 36/73] cpu: hook plugin vcpu events, Alex Bennée, 2019/10/25
- [PULL v2 58/73] linux-user: support -plugin option, Alex Bennée, 2019/10/25
- [PULL v2 38/73] cputlb: ensure _cmmu helper functions follow the naming standard, Alex Bennée, 2019/10/25
- [PULL v2 18/73] trace: add mmu_index to mem_info, Alex Bennée, 2019/10/25
- [PULL v2 20/73] translate-all: use cpu_in_exclusive_work_context() in tb_flush, Alex Bennée, 2019/10/25
- [PULL v2 30/73] atomic_template: add inline trace/plugin helpers, Alex Bennée, 2019/10/25
- [PULL v2 62/73] tests/tcg: move "virtual" tests to EXTRA_TESTS, Alex Bennée, 2019/10/25