From patchwork Mon Feb 10 22:18:25 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: 863874 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d4c:0:b0:385:e875:8a9e with SMTP id a12csp14590wru; Mon, 10 Feb 2025 14:20:26 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWMg84LNVDRyYsto4RGzodCB7MI7a/Ov6+mvVHj83MPKjE0qJzKX4xnz+Q+ibWsLkijoCNODg==@linaro.org X-Google-Smtp-Source: AGHT+IHAWb1Qk9jp97Hg3lzeNtGKZ7of5T+OsMuY59JehjJ0B0KZ70kYBFueOHS128iCRQEyjhwL X-Received: by 2002:a05:622a:6a90:b0:471:826e:3efa with SMTP id d75a77b69052e-471826e6777mr116965791cf.49.1739226026033; Mon, 10 Feb 2025 14:20:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1739226026; cv=none; d=google.com; s=arc-20240605; b=EkglYclxA3UzbtTXTL82yREXVPlweh8UNdg5g/STKE/XBFsGkxoXdzMYheGI8fEJXO snvXPojJh+wu+OmXPxvVo12wE+HyONAk9/7PdoSMwKb1xSKUOQyFG/YDWEW5Z0chFouv t5rObwCp5/kGoygoWJY44Z508iuCxcUeNkUsmvSU3PrhaZOEJr7XVahgrv3dz7Iw5MhS lBSznKfAkGji6rO8LdMAyOVf8cjbd6A1vErb1Hk0pZqgf36JrwFM/kDpDak9HfqduvxX zVgL1mtg1lreNti06I6e0PVbSPZHf/xXx/nPnRgsBhDrQQMMl4RDotvc0v4IY8PlmICh 6qDQ== 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=PUkz5f9MQ2pvcvCLkym9eiE0tZLYKK08nDn81l1HJFM=; fh=gTloOz3hcaaNOIl6Yk1/UbfPcJyg7bUZlwmawbBQn5U=; b=bwItIthOgig5rMbCWtO+PemJWuvuUsRxMBGmPYyXLIuMDxsYrbSmhNFHms9waaj9HY c2nV74RAaTAn4oyseoxfLWn6jX5uHlxP84JokwObfqqM442cLGbmgknzeVa1iXOlT1PO vWm6VCZlrjCByy7OfXi9aGhJ2dBqeMrNftxDzoHDUIq7Nr+UwSgv9WzjGszZpIseNOnf //mw9g/bPG4pDfoqyYH4KS92ozvSkKlFhBqH2pJsKBYDQPlm9POdQuNmnm8iwQYwWnP6 V6dDpKmhOY9FshCyUqSsFLXMtYiUIlUnnJDP3eLWwlC5hvGnTfhy5/IFJHGXDb+gCfqT 5ktA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=btk1CvvP; 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 d75a77b69052e-4718a4b6555si41480921cf.86.2025.02.10.14.20.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Feb 2025 14:20:26 -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=btk1CvvP; 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 1thc7T-0002Md-QE; Mon, 10 Feb 2025 17:19:11 -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 1thc7K-0001qD-N7 for qemu-devel@nongnu.org; Mon, 10 Feb 2025 17:19:02 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1thc7I-0002ta-1Y for qemu-devel@nongnu.org; Mon, 10 Feb 2025 17:19:02 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-38dcb7122c1so2993028f8f.2 for ; Mon, 10 Feb 2025 14:18:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739225938; x=1739830738; 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=PUkz5f9MQ2pvcvCLkym9eiE0tZLYKK08nDn81l1HJFM=; b=btk1CvvPA3YTyZkjjFkkQz71BxpkDtSyMlarm2zkWBwUP+lD2cBij426TTSlkHaBCD /9cfUN4o4zmgrGA+iViW3GE484L8KpVNBoKSSp4OCtd2xtyRaB0gfVhXOv6SCRWQGnKm 1isH304D77gVIHSH1MOCVd/BicQqrb9l8pKQMyIpRFe8Z7mFraMdPwj7Zu5FIHePLl9v vswp6F2vLBvb5xpU4Yfrk1TH7l0P4XFDkALv9veT8C2p3xVggEfg3J05pYjWShP2IfWx 0Z4HEox1ecxdX5/a3SnhizCwENC18tmwEY8fjKMUQcasbh04M/cRXrwC8fKrNnQjZ74f DAFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739225938; x=1739830738; 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=PUkz5f9MQ2pvcvCLkym9eiE0tZLYKK08nDn81l1HJFM=; b=qVUOrtVb6vgnc1XFhIqAFul94au5MBal0R/35sGkXBK06JdnddjW+sTF7LknN/uSLn m3nRKwx2SuzOc1gjm3SG4XqPd9cCzY7vNRfmof0yTWJq8tMdJqMJK1mYoL9ICbBdpzCh PG5+3SlSs8hoyTWwoE+40ZP8XBtWCvkl8enZpABMI95aBe1bpqsLT4tfv5ooljcig2Uw +XY1MhXGsNEFnVYBkml9DMDOa9axMimzhwFuFOBas+c0SK5ByrAJ6VY3cRDUlIccVNaV 7Ohw+pONhDZ9fAv9/XnKMBFMBbdtPzD3jBIzguO8VNfClzApHgSBX4xMDxGHOA7Ypi2V NpCw== X-Gm-Message-State: AOJu0YyOFECOoyKk1EsTzb+ebfc1/wSiCITGexviFM3eVFRc19ugQqbb hKDULv7nqyny1UD21DrFnsWvD1llZMtWX2fWBvG5I9pbvYZy6dg2K8OSQNNOoLCZhVwIX/aUqHs ZmX4= X-Gm-Gg: ASbGncsoskCpUYzQR1kFPLeXB1r4wkHYX5jh4b04Cc3s7QsKv6azOxPPUHAfHvfKdiz AC3Xy+xS/1E5auEaXo3uv949PrYjKP8XNoSVJ1RsSNaD/M4tuZJdm05W/2b5AEylAhI9wQrMRT+ /Cm8Ok7cJ/axCtNA1G8BwYkHln+k7rhwyxUO/9amcld9TG8sYYwM7wjpufkfxU7lk5abIze9WU6 7G+hE5lIxnQCDBgUr44WVd/EXnwXfrVOM7w/5IpAnAmXI9WFmgjG4lyCzbYkacQQr4INKPOodAk /Le+lHshtIJdXid9dIsPz2nN8wiZO0K2vQEmvl4HgKQnfHkysizOaOpbYMQ+cN067Q== X-Received: by 2002:a05:6000:2c3:b0:38d:dbbc:3b07 with SMTP id ffacd0b85a97d-38ddbbc3d28mr6156987f8f.2.1739225938021; Mon, 10 Feb 2025 14:18:58 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38dc9ef8ac6sm10675362f8f.27.2025.02.10.14.18.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 10 Feb 2025 14:18:57 -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 05/10] target/mips: Set disassemble_info::endian value in disas_set_info() Date: Mon, 10 Feb 2025 23:18:25 +0100 Message-ID: <20250210221830.69129-6-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::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson --- target/mips/cpu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index 0b267d2e507..e76298699ab 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -428,13 +428,13 @@ static void mips_cpu_reset_hold(Object *obj, ResetType type) static void mips_cpu_disas_set_info(CPUState *s, disassemble_info *info) { if (!(cpu_env(s)->insn_flags & ISA_NANOMIPS32)) { -#if TARGET_BIG_ENDIAN - info->print_insn = print_insn_big_mips; -#else - info->print_insn = print_insn_little_mips; -#endif + info->endian = TARGET_BIG_ENDIAN ? BFD_ENDIAN_BIG + : BFD_ENDIAN_LITTLE; + info->print_insn = TARGET_BIG_ENDIAN ? print_insn_big_mips + : print_insn_little_mips; } else { info->print_insn = print_insn_nanomips; + info->endian = BFD_ENDIAN_LITTLE; } }