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~