qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] trivial: Simplify the spots that use TARGET_BIG_ENDIAN as a


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] trivial: Simplify the spots that use TARGET_BIG_ENDIAN as a numeric value
Date: Thu, 7 Sep 2023 14:32:45 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.0

On 7/9/23 13:35, Thomas Huth wrote:
TARGET_BIG_ENDIAN is *always* defined, either as 0 for little endian
targets or as 1 for big endian targets. So we can use this as a value
directly in places that need such a 0 or 1 for some reason, instead
of taking a detour through an additional local variable or something
similar.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
  target/arm/cpu.h     | 12 ++----------
  cpu.c                |  6 +-----
  hw/microblaze/boot.c |  9 ++-------
  hw/mips/jazz.c       | 10 ++--------
  hw/mips/malta.c      | 21 ++++-----------------
  hw/mips/mipssim.c    |  9 +--------
  hw/nios2/boot.c      |  9 ++-------
  hw/xtensa/sim.c      |  7 +------
  hw/xtensa/xtfpga.c   | 10 +++-------
  9 files changed, 18 insertions(+), 75 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]