mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
exec: Rename target_words_bigendian() -> target_big_endian()
In commit98ed8ecfc9
("exec: introduce target_words_bigendian() helper") target_words_bigendian() was matching the definition it was depending on (TARGET_WORDS_BIGENDIAN). Later in commitee3eb3a7ce
("Replace TARGET_WORDS_BIGENDIAN") the definition was renamed as TARGET_BIG_ENDIAN but we didn't update the helper. Do it now mechanically using: $ sed -i -e s/target_words_bigendian/target_big_endian/g \ $(git grep -wl target_words_bigendian) Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20250417210025.68322-1-philmd@linaro.org>
This commit is contained in:
parent
d4a785ba30
commit
b939b8e42a
8 changed files with 15 additions and 15 deletions
|
@ -11,15 +11,15 @@
|
|||
#include "qemu/bswap.h"
|
||||
|
||||
/**
|
||||
* target_words_bigendian:
|
||||
* target_big_endian:
|
||||
* Returns true if the (default) endianness of the target is big endian,
|
||||
* false otherwise. Common code should normally never need to know about the
|
||||
* endianness of the target, so please do *not* use this function unless you
|
||||
* know very well what you are doing!
|
||||
*/
|
||||
bool target_words_bigendian(void);
|
||||
bool target_big_endian(void);
|
||||
#ifdef COMPILING_PER_TARGET
|
||||
#define target_words_bigendian() TARGET_BIG_ENDIAN
|
||||
#define target_big_endian() TARGET_BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -29,7 +29,7 @@ bool target_words_bigendian(void);
|
|||
#ifdef COMPILING_PER_TARGET
|
||||
#define target_needs_bswap() (HOST_BIG_ENDIAN != TARGET_BIG_ENDIAN)
|
||||
#else
|
||||
#define target_needs_bswap() (HOST_BIG_ENDIAN != target_words_bigendian())
|
||||
#define target_needs_bswap() (HOST_BIG_ENDIAN != target_big_endian())
|
||||
#endif /* COMPILING_PER_TARGET */
|
||||
|
||||
static inline uint16_t tswap16(uint16_t s)
|
||||
|
@ -83,7 +83,7 @@ static inline void tswap64s(uint64_t *s)
|
|||
/* Return ld{word}_{le,be}_p following target endianness. */
|
||||
#define LOAD_IMPL(word, args...) \
|
||||
do { \
|
||||
if (target_words_bigendian()) { \
|
||||
if (target_big_endian()) { \
|
||||
return glue(glue(ld, word), _be_p)(args); \
|
||||
} else { \
|
||||
return glue(glue(ld, word), _le_p)(args); \
|
||||
|
@ -120,7 +120,7 @@ static inline uint64_t ldn_p(const void *ptr, int sz)
|
|||
/* Call st{word}_{le,be}_p following target endianness. */
|
||||
#define STORE_IMPL(word, args...) \
|
||||
do { \
|
||||
if (target_words_bigendian()) { \
|
||||
if (target_big_endian()) { \
|
||||
glue(glue(st, word), _be_p)(args); \
|
||||
} else { \
|
||||
glue(glue(st, word), _le_p)(args); \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue