From patchwork Wed Dec 4 20:25:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 2018445 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=dYzfBRLR; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Y3Th24DLrz1yRL for ; Thu, 5 Dec 2024 07:31:30 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIvz0-0003En-5g; Wed, 04 Dec 2024 15:28:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tIvyu-0002hB-7w for qemu-ppc@nongnu.org; Wed, 04 Dec 2024 15:28:20 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIvyr-00038I-Cg for qemu-ppc@nongnu.org; Wed, 04 Dec 2024 15:28:19 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-434a10588f3so1391195e9.1 for ; Wed, 04 Dec 2024 12:28:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733344096; x=1733948896; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZYu2t8Q4K67n2tT9qceLBDjYsH4wW4eKuLgzo6hScDA=; b=dYzfBRLRD0fTFjAs/fq+wBKrnGNAcuIsmmF9jx+5hXU9q1WJqKwu+BU22g+J5hz2bK wvTRrdWnfUpbFTG2A5u4fIPWDLH78sA+ILOFpplm95ziB+f6c9m4MUJ0lbaSQi3QO2hU JAXbkfqVeMHntqr95Uobu2aWWwBz2zUC1lEcpP5b7VZW4JhrdideLaZAspjQyoiG6uBq tMPahGblKgUttfwvDsR9DcejxlDwnLpPGUFANVb/HvQ6teM4/m2wpwt/P00+1flVF1cT GljokPxb88LLkfWcFLfJ1yPWyDfzWvxzkmZ1olLeRTajfv+Lq3pMuyhHcDoX4IdsA2Sp F4Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733344096; x=1733948896; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZYu2t8Q4K67n2tT9qceLBDjYsH4wW4eKuLgzo6hScDA=; b=APYXNnn93L5LrCBxv0dsP4Ya1LjIcwdVxhAx/VVG6HFrLazKiMWU7HGe6ubqikMvVn PgeyWkXw697dXg+nHiFWrmUaLw+gqSLbhNf0dFllHCMPKQxcp1E30BLJFDNw4YXz8Tdj koRIY0OIZC4HtsCzeC1K4OlvFIC+cCNcPyyMMH/dgjdIJvUxfkcXLpcHIX5F0dXlo22c AkZXGt3asdB6hICE7HZKKmjr1C6B2kxTZ0NWyQRESQmGgQBfDBSeLopQfvDTJaIurjyG nkfOJdNQWmCQOgOuQ3eZePYsu3K2RUDR/4+DNUNOPyCDyVP4GRtfVkKi80Uot/sGNRDE dxAQ== X-Forwarded-Encrypted: i=1; AJvYcCURufLwuPlDG4NUbqWAJ8CaTWt84PBupmbz6BPrq3RtULacbfj1Q0TNz7Ja5Gn/Gk7Z+jf1rlOcVQ==@nongnu.org X-Gm-Message-State: AOJu0Yy2GAY4ujDPtCiz/JXGt2mhiMH/xi+AKfPBCaPnmo1/fe17B1ru bGe1iFiQe9SRc5XY+tDYtQXvaNyN7sXhMuDf9GbyRiud5TKyJ7Z3jrVOPTmneOM= X-Gm-Gg: ASbGnctwoKyndYXu6KAZpiDuBdWoUeTYTe0vE1yJ0vPax39sligjiVQgiOAhWHw5XbM OmAbZH7GAkexXu+4L9/HlrNYAt6SXHDGf7NwvJ6UVHk2weGUaq8r/+45rOTnsXSpmvD1VPY9o5e jPRLK6LZs+o3rbElvaQOa49ANMvijS2DDOn8tSkJ2t1hu+iIddR9vQf+gHwXa9z9HH+zt5w6Aqt NrPgKEBHyrSUQb06lSUWZ7SvS/FUunKX3XbrUqGSRBXyLk62e6c7bvWi5/zpb90B2lHInz7KaNl J4DmqJGH0znlFkfeKE4CJJio X-Google-Smtp-Source: AGHT+IF4snyZRj1x+fZto74C7GPyLBpTIZREW05o8Ez4NAPz1TUe9+xBdT4v+C8HGPWrLN9B4UYDYg== X-Received: by 2002:a05:6000:1acb:b0:385:fa2e:a354 with SMTP id ffacd0b85a97d-38607c23f80mr5121998f8f.47.1733344095986; Wed, 04 Dec 2024 12:28:15 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434d527e287sm35412065e9.12.2024.12.04.12.28.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 04 Dec 2024 12:28:14 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Daniel Henrique Barboza , "Michael S. Tsirkin" , Peter Maydell , Laurent Vivier , Mark Cave-Ayland , Alistair Francis , Anton Johansson , Zhao Liu , "Edgar E. Iglesias" , David Hildenbrand , qemu-s390x@nongnu.org, Max Filippov , Paolo Bonzini , Nicholas Piggin , qemu-arm@nongnu.org, Thomas Huth , qemu-riscv@nongnu.org, Alistair Francis , qemu-ppc@nongnu.org, Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PATCH 17/20] disas: Use cpu_datapath_is_big_endian() Date: Wed, 4 Dec 2024 21:25:59 +0100 Message-ID: <20241204202602.58083-18-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241204202602.58083-1-philmd@linaro.org> References: <20241204202602.58083-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-ppc@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org Rather that using the binary endianness, use the vCPU one. Signed-off-by: Philippe Mathieu-Daudé --- disas/disas-common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/disas/disas-common.c b/disas/disas-common.c index 7377de0715c..ef91c43449e 100644 --- a/disas/disas-common.c +++ b/disas/disas-common.c @@ -7,7 +7,6 @@ #include "disas/disas.h" #include "disas/capstone.h" #include "hw/core/cpu.h" -#include "exec/tswap.h" #include "disas-internal.h" @@ -61,7 +60,7 @@ void disas_initialize_debug_target(CPUDebug *s, CPUState *cpu) s->cpu = cpu; s->info.print_address_func = print_address; - if (qemu_binary_is_bigendian()) { + if (cpu_datapath_is_big_endian(cpu)) { s->info.endian = BFD_ENDIAN_BIG; } else { s->info.endian = BFD_ENDIAN_LITTLE;