From patchwork Mon Feb 10 22:18:22 2025 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: 863872 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d4c:0:b0:385:e875:8a9e with SMTP id a12csp14482wru; Mon, 10 Feb 2025 14:20:04 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWGQNeePbTXNJx26CM44KYI2ODP3tu0CfyAit0cYdZ/DBlDCzsztVPX5kLQmpZDrRmbC3pDWw==@linaro.org X-Google-Smtp-Source: AGHT+IEalxhw2QnNtxZ2S/J+UUabTEVyZoBCdH1gtOYcHAHCQobtGEQndrSB0UEGOQxJp5Cvaov4 X-Received: by 2002:a05:620a:254b:b0:7bd:bafc:32b0 with SMTP id af79cd13be357-7c047c94929mr2731108785a.47.1739226004030; Mon, 10 Feb 2025 14:20:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1739226004; cv=none; d=google.com; s=arc-20240605; b=MvhF/cnBuzCQ4hu5T4XhVIb7yLYOuR1cawjbDRGUxNQn6zu1Bp8TNfOeVibmlIObFn Y10W9nKjhMS4ghhSrl79JeUcl9OtCVi+pMj3IDlTASSRXKNTe9e4kdF7o0Ls+HQJJbIe yEvWhkCGASiufh86Viz3SwEQ+edttRhhgnkFwD9ts+HW0tXF5fEV/wzwp7EklZwN/Zks xl2xnVfQfm7inPLUTH5I4EKHo2av99SBMrhCP06NSZAlqV8RK7G5AWEwSoevFoKvVSmx 5MoFV8fLKoPv/vwIiXr8yiC9pv1u84aVYluYw74+DowOh5Si1IICSQn6RDkBFJoALbk4 J4Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wvSW0yNHAxQVpap9+gIBQOievXbQcesYepvpw1E/5Ok=; fh=gTloOz3hcaaNOIl6Yk1/UbfPcJyg7bUZlwmawbBQn5U=; b=iy+na4+Mr2o9xlrVo+cy2qpryrsZpxDyiFt2mKpC7odd9n549e3IS/AHcJubgEaF3n CSg7HciBPW0wdOk5K/JrpJ+7zZFnGf1VyMGqlj/dMNtTg3IgUROmH3b8fdQEpFpD3kG9 1/B2keQuztK8gSFYNIsyxD4GkXm5FC48W0f7XNWzHgvpDimIGoWEP/GGOMb58DpWD2Wu U7UqSlR1yI0amK0Foj0D8/fOI0SHqW0+AMG2QOiyEyEY0bLzrnezeLH2isNRrSYf0j9b ihRcOOHXVwkzRH/tifINXhTc9xY9enYScPXI0irXiQlmB3JRM19g3fEtpuCOnrthpHh9 QvEg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zitY9Z4v; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c061a51f2bsi192742185a.537.2025.02.10.14.20.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Feb 2025 14:20:04 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zitY9Z4v; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1thc7M-0001wA-Jw; Mon, 10 Feb 2025 17:19:04 -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 1thc76-0001fj-M6 for qemu-devel@nongnu.org; Mon, 10 Feb 2025 17:18:49 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1thc72-0002o1-Pr for qemu-devel@nongnu.org; Mon, 10 Feb 2025 17:18:46 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-438a3216fc2so48853375e9.1 for ; Mon, 10 Feb 2025 14:18:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739225923; x=1739830723; 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=wvSW0yNHAxQVpap9+gIBQOievXbQcesYepvpw1E/5Ok=; b=zitY9Z4vgqakOenHzwsYRi0PSf9oOxu+gJ0Yux1qI8uqcf1QBEKB2T7FNLDybz/cBs NCxG4MLlfQZA1udRgYil2xrDXWv6iaAH5hdRk2+1zVDb/dGE8zVXsmaje5dA8p6C8GEB Alt/99YfGNVYXbvCXQBwsd2BKteZfR8yP0LytRRxwAwBMg8F1KPS5SxkmKGXYiLA5DXI ULTU96fI2sRi7LpfZ0ihBC47PRGyNapDbyp0aWGlKC7bgTdG8Ah4Zgv39kx8jpUJ/xHZ 9W5C4FMVICvwS5PL9VX4mH1WM7N+yIsb6KuvWDHcjOxYMGIpBGlZdRB22+qIezwm3xxN e0Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739225923; x=1739830723; 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=wvSW0yNHAxQVpap9+gIBQOievXbQcesYepvpw1E/5Ok=; b=l5qX0HlhcfxEJW2N0ifwg7VtLbOs3b/wTrSKMDx/Ze+4jQgw7LmVGAzKZTYJ8bGDo3 z+KoGX279JLFNAjmfk8VKUhLWUJYW7HGBaL0xeOfrIXICT9qRk2zrAYvvzIZbqoUBLVc VlJ/cC+NdeV4eCcf98AK4XmtbGAoqF/PqBZm22JsWVVpmkE/QkeM6c1i5dEURoSGxmgP f6OEIoEwT/THCloBM2n+r9vQAUkHQyN7gaGorLOY5F45x9XPW+NZ5q5cV7JfXA8GQGhs CxKkVQtEv0f/tsgx6ThnBvMnVAz7n4qxOp9eVn4sWXi5lCz7FYhSCc/U11YWyEfie1uR pauw== X-Gm-Message-State: AOJu0YwGaZO1g54JcwRiSX2cL2R9w4HKpECdvUJ4bTD/BUqmjbgLfrMY pwa42I2piyEkKJ0sSVmN3+JUL7RP/UFmNNwdt7x//LoyIIPg8lPAfnjAj6Y53LEjz6/MmzkeWSZ zj9k= X-Gm-Gg: ASbGncsuJOarBASDhzAMyl9BSNruiyLuiD6fTSTYCeOxMf+3CHF8TD1KobiqzM/sgMF NKnESWD52rsvUi0/b/70rRdBcxLHgy0M1FulcecOZzpF0+W7vZEx27mTPau62Ue6xJ23CDdefEs bbBbCZYXtm6YHTmeGRwyh918U41nanCOp65zBvTgWmcj/791Gr3NsgsGshg7VvBDH4p2dfFmsI4 Diu/vFIDYijT3WdJU1Zt5n32jGXGZPTccVaESexdWCxFxQQpfO1sArN85RBa5DLTpZ6qet+DQ/V VxsohVdgNS7a2OHYuwQBWwf6GM+mXfXQ8DGB4hGLAun0oJUBF0Y72cpeeXiw7+nxgg== X-Received: by 2002:a05:6000:1888:b0:38d:e48b:1783 with SMTP id ffacd0b85a97d-38de48b18b7mr435718f8f.42.1739225922713; Mon, 10 Feb 2025 14:18:42 -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-439463d17a1sm35990265e9.21.2025.02.10.14.18.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 10 Feb 2025 14:18:42 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, Thomas Huth , qemu-arm@nongnu.org, qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 02/10] target: Set disassemble_info::endian value for big-endian targets Date: Mon, 10 Feb 2025 23:18:22 +0100 Message-ID: <20250210221830.69129-3-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250210221830.69129-1-philmd@linaro.org> References: <20250210221830.69129-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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-devel@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-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Have the CPUClass::disas_set_info() callback set the disassemble_info::endian field for big-endian targets. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson --- target/hppa/cpu.c | 1 + target/m68k/cpu.c | 1 + target/openrisc/cpu.c | 1 + target/s390x/cpu.c | 1 + target/sparc/cpu.c | 1 + 5 files changed, 5 insertions(+) diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 4bb5cff624e..d15f8c9c217 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -150,6 +150,7 @@ static int hppa_cpu_mmu_index(CPUState *cs, bool ifetch) static void hppa_cpu_disas_set_info(CPUState *cs, disassemble_info *info) { info->mach = bfd_mach_hppa20; + info->endian = BFD_ENDIAN_BIG; info->print_insn = print_insn_hppa; } diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index 5eac4a38c62..ff167aaea71 100644 --- a/target/m68k/cpu.c +++ b/target/m68k/cpu.c @@ -122,6 +122,7 @@ static void m68k_cpu_reset_hold(Object *obj, ResetType type) static void m68k_cpu_disas_set_info(CPUState *s, disassemble_info *info) { info->print_insn = print_insn_m68k; + info->endian = BFD_ENDIAN_BIG; info->mach = 0; } diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c index a74fab43a91..33c81928370 100644 --- a/target/openrisc/cpu.c +++ b/target/openrisc/cpu.c @@ -83,6 +83,7 @@ static int openrisc_cpu_mmu_index(CPUState *cs, bool ifetch) static void openrisc_disas_set_info(CPUState *cpu, disassemble_info *info) { + info->endian = BFD_ENDIAN_BIG; info->print_insn = print_insn_or1k; } diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 3bea014f9ee..972d265478d 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -243,6 +243,7 @@ static void s390_cpu_disas_set_info(CPUState *cpu, disassemble_info *info) { info->mach = bfd_mach_s390_64; info->cap_arch = CS_ARCH_SYSZ; + info->endian = BFD_ENDIAN_BIG; info->cap_insn_unit = 2; info->cap_insn_split = 6; } diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index e3b46137178..9fd222e4c82 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -106,6 +106,7 @@ static bool sparc_cpu_exec_interrupt(CPUState *cs, int interrupt_request) static void cpu_sparc_disas_set_info(CPUState *cpu, disassemble_info *info) { info->print_insn = print_insn_sparc; + info->endian = BFD_ENDIAN_BIG; #ifdef TARGET_SPARC64 info->mach = bfd_mach_sparc_v9b; #endif