[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 25/50] translator: add translator_ld{ub, sw,
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v3 25/50] translator: add translator_ld{ub, sw, uw, l, q} |
Date: |
Mon, 17 Jun 2019 14:06:39 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 |
On 6/14/19 10:11 AM, Alex Bennée wrote:
> +#define GEN_TRANSLATOR_LD(fullname, name, type, swap_fn) \
> + static inline type \
> + fullname ## _swap(CPUArchState *env, abi_ptr pc, bool do_swap) \
> + { \
> + type ret = cpu_ ## name ## _code(env, pc); \
> + \
> + if (do_swap) { \
> + ret = swap_fn(ret); \
> + } \
This feels like we should have done this at a different level. We already have
lower-level functions that read from memory with the proper endianness.
It seems that we don't have them for *_code, but that could be fixed. Or,
indeed, bypassed, since these could be the new official interface, deprecating
the *_code functions.
r~
- [Qemu-devel] [PATCH v3 30/50] target/hppa: fetch code with translator_ld, (continued)
- [Qemu-devel] [PATCH v3 30/50] target/hppa: fetch code with translator_ld, Alex Bennée, 2019/06/14
- [Qemu-devel] [PATCH v3 19/50] tcg: let plugins instrument memory accesses, Alex Bennée, 2019/06/14
- [Qemu-devel] [PATCH v3 15/50] tcg: add MO_HADDR to TCGMemOp, Alex Bennée, 2019/06/14
- [Qemu-devel] [PATCH v3 37/50] translator: inject instrumentation from plugins, Alex Bennée, 2019/06/14
- [Qemu-devel] [PATCH v3 13/50] plugin-gen: add module for TCG-related code, Alex Bennée, 2019/06/14
- [Qemu-devel] [PATCH v3 25/50] translator: add translator_ld{ub, sw, uw, l, q}, Alex Bennée, 2019/06/14
- Re: [Qemu-devel] [PATCH v3 25/50] translator: add translator_ld{ub, sw, uw, l, q},
Richard Henderson <=
- [Qemu-devel] [PATCH v3 48/50] include/exec: wrap cpu_ldst.h in CONFIG_TCG, Alex Bennée, 2019/06/14
- [Qemu-devel] [PATCH v3 50/50] TODO: API changes to make?, Alex Bennée, 2019/06/14
- [Qemu-devel] [PATCH v3 31/50] target/m68k: fetch code with translator_ld, Alex Bennée, 2019/06/14
- [Qemu-devel] [PATCH v3 27/50] target/ppc: fetch code with translator_ld, Alex Bennée, 2019/06/14
- [Qemu-devel] [PATCH v3 36/50] target/openrisc: fetch code with translator_ld, Alex Bennée, 2019/06/14
- Re: [Qemu-devel] [PATCH v3 00/50] tcg plugin support, Aleksandar Markovic, 2019/06/14