[PATCH v2 0/5] target/mips: Replace TARGET_WORDS_BIGENDIAN by cpu_is_bigendian()

Philippe Mathieu-Daudé posted 5 patches 2 years, 8 months ago
Failed in applying to current master (apply log)
target/mips/tcg/translate.h              |   6 ++
target/mips/tcg/ldst_helper.c            | 122 +++++++++++++----------
target/mips/tcg/translate.c              |  71 ++++++-------
target/mips/tcg/nanomips_translate.c.inc |  20 ++--
4 files changed, 122 insertions(+), 97 deletions(-)
[PATCH v2 0/5] target/mips: Replace TARGET_WORDS_BIGENDIAN by cpu_is_bigendian()
Posted by Philippe Mathieu-Daudé 2 years, 8 months ago
Missing review: 1-3

MIPS CPU store its endianess in the CP0 Config0 register.
Use that runtime information instead of #ifdef'ry checking
TARGET_WORDS_BIGENDIAN by introducing the cpu_is_bigendian()
helper.

Since v1:
- Addressed rth's comments (call cpu_is_bigendian/get_lmask once)
- Add rth R-b on patches 4-5

Philippe Mathieu-Daudé (5):
  target/mips: Call cpu_is_bigendian & inline GET_OFFSET in ld/st
    helpers
  target/mips: Replace GET_LMASK() macro by get_lmask(32) function
  target/mips: Replace GET_LMASK64() macro by get_lmask(64) function
  target/mips: Store CP0_Config0 in DisasContext
  target/mips: Replace TARGET_WORDS_BIGENDIAN by cpu_is_bigendian()

 target/mips/tcg/translate.h              |   6 ++
 target/mips/tcg/ldst_helper.c            | 122 +++++++++++++----------
 target/mips/tcg/translate.c              |  71 ++++++-------
 target/mips/tcg/nanomips_translate.c.inc |  20 ++--
 4 files changed, 122 insertions(+), 97 deletions(-)

-- 
2.31.1

Re: [PATCH v2 0/5] target/mips: Replace TARGET_WORDS_BIGENDIAN by cpu_is_bigendian()
Posted by Philippe Mathieu-Daudé 2 years, 8 months ago
On 8/18/21 11:55 PM, Philippe Mathieu-Daudé wrote:
> MIPS CPU store its endianess in the CP0 Config0 register.
> Use that runtime information instead of #ifdef'ry checking
> TARGET_WORDS_BIGENDIAN by introducing the cpu_is_bigendian()
> helper.
> 
> Philippe Mathieu-Daudé (5):
>   target/mips: Call cpu_is_bigendian & inline GET_OFFSET in ld/st
>     helpers
>   target/mips: Replace GET_LMASK() macro by get_lmask(32) function
>   target/mips: Replace GET_LMASK64() macro by get_lmask(64) function
>   target/mips: Store CP0_Config0 in DisasContext
>   target/mips: Replace TARGET_WORDS_BIGENDIAN by cpu_is_bigendian()

Thanks, applied to mips-next.