diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2021-08-18 12:13:02 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2021-08-25 13:02:14 +0200 |
commit | bf78469cc8ddb117b6db4a353e59fb4664a96de4 (patch) | |
tree | 3b1045e369113905d849e6f2258ab51baa15a3b1 /target/mips/tcg/translate.h | |
parent | 0cfd392d7b419cdbe5284b8227d95ab3daaea860 (diff) | |
download | qemu-bf78469cc8ddb117b6db4a353e59fb4664a96de4.zip qemu-bf78469cc8ddb117b6db4a353e59fb4664a96de4.tar.gz qemu-bf78469cc8ddb117b6db4a353e59fb4664a96de4.tar.bz2 |
target/mips: Replace TARGET_WORDS_BIGENDIAN by cpu_is_bigendian()
Add the inlined cpu_is_bigendian() function in "translate.h".
Replace the TARGET_WORDS_BIGENDIAN #ifdef'ry by calls to
cpu_is_bigendian().
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210818164321.2474534-6-f4bug@amsat.org>
Diffstat (limited to 'target/mips/tcg/translate.h')
-rw-r--r-- | target/mips/tcg/translate.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/target/mips/tcg/translate.h b/target/mips/tcg/translate.h index 4b4fa2c..6111493 100644 --- a/target/mips/tcg/translate.h +++ b/target/mips/tcg/translate.h @@ -224,4 +224,9 @@ bool decode_ext_vr54xx(DisasContext *ctx, uint32_t insn); static bool trans_##NAME(DisasContext *ctx, arg_##NAME *a) \ { return FUNC(ctx, a, __VA_ARGS__); } +static inline bool cpu_is_bigendian(DisasContext *ctx) +{ + return extract32(ctx->CP0_Config0, CP0C0_BE, 1); +} + #endif |