Message ID | 20240305121005.3528075-29-alex.bennee@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org> 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=LCHDsld4; 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 4TpvkP6rF6z23cm for <incoming@patchwork.ozlabs.org>; Tue, 5 Mar 2024 23:19:09 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-ppc-bounces@nongnu.org>) id 1rhTl8-0000Gu-BS; Tue, 05 Mar 2024 07:19:03 -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 <alex.bennee@linaro.org>) id 1rhTl3-0008PT-4O for qemu-ppc@nongnu.org; Tue, 05 Mar 2024 07:18:58 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>) id 1rhTkv-0003Em-1c for qemu-ppc@nongnu.org; Tue, 05 Mar 2024 07:18:56 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-412eeb018ffso2943055e9.1 for <qemu-ppc@nongnu.org>; Tue, 05 Mar 2024 04:18:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709641127; x=1710245927; 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=tcGhMUUI29octnVG5H2YHZPrevHON91YqWS8nudtIe0=; b=LCHDsld4djC4wq+RTNvwesUkZSXs1h7mLOWZx3jawgZAq0kxl60KOvysQgcAWGQKEc 3jpBJ2tw5BXjxmdWA9wCE/daTLW23Mvb+v8Gy5dPzGgXd6szo9RgMbGRQy2DODMsOd48 UJLVS0OQeMssYaHSxsGlrMrxUujpm7F9Grp+oFG0bDeb07SCoxbz+0V6hinnYpkr+Sby 0gE8CWkorM+bzxz8v65o+jbB1iIzQTNHPoOZ4kwbVyJu/RLba86hueS3ddzHIGoRo/F1 bLk8r4ctN4UjGzyWwK6t8ftjuVaSWjMutlJpBXHln5CU3sM4bs0zHDKrvtMvkZ5B7FY+ 4+4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709641127; x=1710245927; 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=tcGhMUUI29octnVG5H2YHZPrevHON91YqWS8nudtIe0=; b=vIiOZBPK3wuo8QSVHrxQjcy1LA4D/QIHrlY2yWE66hu8paihM41p8bfZajbUJiBbZZ d5BQ8EMV+i6KeMhoit+jPoh3UoL/XDiaNfBRAc9exFD/C0lzW0SSZ/8U0XM8xxI1A1Ur yHYFhyPCqkJIexJUawnvr6Zn+yhhl0wnixN6sHe7Z/INp6J0kNx7mZr73RI+Qb9BE/tZ U9CfXY5ymoUVdzdqgiuBqTj/0UpJahrRzYo4qzEgqtycBgIi+Dz3LKvNr3Q2RGXoep6M MaM0ZdDbYcOVftnnOar63hjrdHIMziMfRLUWaYuucpafOR1hOymcZmhSjoqEb0cBvgtq 7/ug== X-Forwarded-Encrypted: i=1; AJvYcCVWFK+NUIJMH5Pv3V6xDg+v6Pq47hr81VeH2IwgmXdESlmomQMiXTYq2XbeLxNW46nxnPSRV9PBXkg+Uofspxgd2VdX X-Gm-Message-State: AOJu0YzsrIMmunoU7ctRqkUQQXttvBytEgcgoN+Dp+iUDyIA2OZJSFnG lLNO2JrT3E94jPvt69pi1MYSonYK7tt+NSUpwepYgTjEK0ZcC/GPlgL4wNuRoTU= X-Google-Smtp-Source: AGHT+IHCs/ghXyQJVPqZj0z2XFAwPBjrv76lPlvMp4lOf5ox0BmEwTP7SW0AzruVtBk1uNWhaGDeRw== X-Received: by 2002:adf:a153:0:b0:33d:9d46:c16c with SMTP id r19-20020adfa153000000b0033d9d46c16cmr8850175wrr.44.1709641127111; Tue, 05 Mar 2024 04:18:47 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id r12-20020adfe68c000000b0033df5710fabsm14790096wrm.44.2024.03.05.04.18.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 04:18:44 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 1054F5FA01; Tue, 5 Mar 2024 12:10:08 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org> To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta <wainersm@redhat.com>, Alistair Francis <Alistair.Francis@wdc.com>, Nicholas Piggin <npiggin@gmail.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Richard Henderson <richard.henderson@linaro.org>, Yanan Wang <wangyanan55@huawei.com>, qemu-s390x@nongnu.org, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Eduardo Habkost <eduardo@habkost.net>, Daniel Henrique Barboza <dbarboza@ventanamicro.com>, Michael Rolnik <mrolnik@gmail.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, Laurent Vivier <lvivier@redhat.com>, Yoshinori Sato <ysato@users.sourceforge.jp>, Laurent Vivier <laurent@vivier.eu>, Thomas Huth <thuth@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, Mahmoud Mandour <ma.mandourr@gmail.com>, Brad Smith <brad@comstyle.com>, Alistair Francis <alistair.francis@wdc.com>, Brian Cain <bcain@quicinc.com>, Cleber Rosa <crosa@redhat.com>, John Snow <jsnow@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Pierrick Bouvier <pierrick.bouvier@linaro.org>, Palmer Dabbelt <palmer@dabbelt.com>, Riku Voipio <riku.voipio@iki.fi>, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Weiwei Li <liwei1518@gmail.com>, Bin Meng <bin.meng@windriver.com>, =?utf-8?q?C=C3=A9dric_Le_Goater?= <clg@kaod.org>, Beraldo Leal <bleal@redhat.com>, Kyle Evans <kevans@freebsd.org>, David Hildenbrand <david@redhat.com>, Song Gao <gaosong@loongson.cn>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Alexandre Iooss <erdnaxe@crans.org>, Warner Losh <imp@bsdimp.com>, qemu-riscv@nongnu.org, Ilya Leoshkevich <iii@linux.ibm.com> Subject: [PATCH 28/29] target/loongarch: honour show_opcodes when disassembling Date: Tue, 5 Mar 2024 12:10:04 +0000 Message-Id: <20240305121005.3528075-29-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240305121005.3528075-1-alex.bennee@linaro.org> References: <20240305121005.3528075-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x336.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, T_SCC_BODY_TEXT_LINE=-0.01 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: <qemu-ppc.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-ppc>, <mailto:qemu-ppc-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-ppc> List-Post: <mailto:qemu-ppc@nongnu.org> List-Help: <mailto:qemu-ppc-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-ppc>, <mailto:qemu-ppc-request@nongnu.org?subject=subscribe> Errors-To: qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org |
Series |
maintainer/next for 9.0 (testing, gdbstub, plugins, disas)
|
expand
|
diff --git a/target/loongarch/disas.c b/target/loongarch/disas.c index 2040f3e44db..63989a6282d 100644 --- a/target/loongarch/disas.c +++ b/target/loongarch/disas.c @@ -120,10 +120,15 @@ static const char *get_csr_name(unsigned num) csr_names[num] : "Undefined CSR"; } -#define output(C, INSN, FMT, ...) \ -{ \ - (C)->info->fprintf_func((C)->info->stream, "%08x %-9s\t" FMT, \ - (C)->insn, INSN, ##__VA_ARGS__); \ +#define output(C, INSN, FMT, ...) \ + { \ + if ((C)->info->show_opcodes) { \ + (C)->info->fprintf_func((C)->info->stream, "%08x %-9s\t" FMT,\ + (C)->insn, INSN, ##__VA_ARGS__); \ + } else { \ + (C)->info->fprintf_func((C)->info->stream, "%-9s\t" FMT, \ + INSN, ##__VA_ARGS__); \ + } \ } #include "decode-insns.c.inc"
This makes the output suitable when used for plugins. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> --- target/loongarch/disas.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)