On 3/10/25 09:14, Pierrick Bouvier wrote:
On 3/10/25 09:08, Richard Henderson wrote:
On 3/9/25 21:58, Pierrick Bouvier wrote:
For now, they are duplicate of the same macros in cpu-all.h that we
eliminate in next commit.
Keep code readable by not defining them with macros, but simply their
implementation.
Signed-off-by: Pierrick Bouvier <pierrick.bouv...@linaro.org>
Why do you want these in bswap.h, rather than tswap.h?
They're target swaps, after all.
r~
No preference on that, I simply added them to the same file than their explicit endianness
variant. Would you prefer the endianness agnostic variant to be in tswap.h instead?
I think I would.
In addition, I think we want
#ifdef COMPILING_PER_TARGET
#define target_words_bigendian() TARGET_BIG_ENDIAN
#else
bool target_words_bigendian(void);
#endif
moving the conditional from around target_needs_bswap just below.
With that, we eliminate the extra branch that you're otherwise
adding to target-specific code with this patch.
r~