qemu-devel
[Top][All Lists]
Advanced

[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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]