[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: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [PATCH v3 25/50] translator: add translator_ld{ub, sw, uw, l, q} |
Date: |
Tue, 30 Jul 2019 13:41:14 +0100 |
User-agent: |
mu4e 1.3.3; emacs 27.0.50 |
Richard Henderson <address@hidden> writes:
> 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.
Yeah - this really only caters to the translator for guests which can
switch their mode.
> 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.
Hmm how to properly audit that _code isn't being used elsewhere. You get
lost in a maze of macros pretty quickly :-/
So you are proposing dropping the _code helpers from cpu_ldst_*_template
and directly binding to the low level load/softmmu function from
translator.h? Do we ever need _code access that isn't part of the
translator loading instructions?
>
>
> r~
--
Alex Bennée
- Re: [Qemu-devel] [PATCH v3 25/50] translator: add translator_ld{ub, sw, uw, l, q},
Alex Bennée <=
- Re: [Qemu-devel] [PATCH v3 25/50] translator: add translator_ld{ub, sw, uw, l, q}, Richard Henderson, 2019/07/30
- Re: [Qemu-devel] [PATCH v3 25/50] translator: add translator_ld{ub, sw, uw, l, q}, Alex Bennée, 2019/07/30
- Re: [Qemu-devel] [PATCH v3 25/50] translator: add translator_ld{ub, sw, uw, l, q}, Alex Bennée, 2019/07/30