]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/openrisc: Replace MO_TE -> MO_BE
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 12 Mar 2025 09:27:08 +0000 (10:27 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 16 Oct 2025 15:07:28 +0000 (17:07 +0200)
We only build the OpenRISC targets using big endianness order:

  $ git grep TARGET_BIG_ENDIAN configs/targets/or1k-*
  configs/targets/or1k-linux-user.mak:2:TARGET_BIG_ENDIAN=y
  configs/targets/or1k-softmmu.mak:2:TARGET_BIG_ENDIAN=y

Therefore the MO_TE definition always expands to MO_BE. Use the
latter to simplify.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010070702.51484-12-philmd@linaro.org>

target/openrisc/translate.c

index 1a43e5ab6f7349211dc9b5c741530567949580db..3d9dfd663aad8ee6ee980e3c3e6589f0138a80b5 100644 (file)
@@ -61,7 +61,8 @@ typedef struct DisasContext {
 
 static inline MemOp mo_endian(DisasContext *dc)
 {
-    return MO_TE;
+    /* The SR_LEE bit sets the (little) endianness, but we don't implement it. */
+    return MO_BE;
 }
 
 static inline bool is_user(DisasContext *dc)