From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 150D4C6FD1B for ; Mon, 6 Mar 2023 16:36:42 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZCrS-000454-Og; Mon, 06 Mar 2023 10:34:50 -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 1pZCrP-00042Y-0o for qemu-devel@nongnu.org; Mon, 06 Mar 2023 10:34:47 -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 1pZCrN-00029T-8x for qemu-devel@nongnu.org; Mon, 06 Mar 2023 10:34:46 -0500 Received: by mail-wm1-x32c.google.com with SMTP id j19-20020a05600c1c1300b003e9b564fae9so8488476wms.2 for ; Mon, 06 Mar 2023 07:34:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678116883; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=uh6QfKjLKU2APYmm6FnQ7PvwealPEo6i3D3sw7iDPnk=; b=mLhF93HLBI6t5MQPAWOvt7LOIM6ie9Z8gi4lPMuzAPh9ogihOdIZtJ8XiQO7rWo5A6 m8kVfcZASW411GPXOgnnl2eaU26wgPHJnWqrw5Q1fdVcso9jOq5pv0uCsm+WsibsSS/J EtyUDwAF2W7mecegzSZXDTC9/phfg2ra2Mi8aYwD/V/r0by0+uriC6QSV9CVOg2Gfdnf h4frv/gJISHgU3JGCNDuSJmRYsetAdIqtOwGwO7teAo3RfaUC1zOKRxsVxusXI13sWnP /2gjN4kk2TmHDZioIthKKCtW1/UBxSUwiz+4tkHrfgirDJ9iPKIjm7wyKq2sIniII0kb WHsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678116883; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uh6QfKjLKU2APYmm6FnQ7PvwealPEo6i3D3sw7iDPnk=; b=D+qXzvmXwRd27DOv4hVVEx6TmzZhI7lhmGTPA9vHdG6vm3xTzBV6/n7huuI12gnb/P Tl1hJ/q9qWHegUM2AgPnr3gbjOXdlayz0XlNcZ6KVz0H9CThy4tNj12Ble/9Ijn8ornk kHfZD5eDfA4bIVI5BQ+kb2gQzfbBPKnAPeCc/Txr4otNyLV/bIARi0z35HWC3hnAK5Ng vyutx69Wei6mqRQiaMVSjfhiAyMGeTyVeKkl5sOO/+tgWCrAMRBtsD+x1ihskDOR07yV rGfZFfsHvuFfPAgiWBlZKxxrTcrRvaTQ29FUooc9EoDQReA/27KrW9rE3SrGtGbb2hTG /rbA== X-Gm-Message-State: AO0yUKW02BMHsU2bVU1/yDK7Jibsa18JCcgPc9G9NSuBPxf7HhK3/KlG SgZeJxO/UidDUwe31oU7Xpyp34uxk9g1goa8/kw= X-Google-Smtp-Source: AK7set8xZNN9A9T2Ro0m2jRq6tlgLTpYzsCrHZt2cvF229yotgiayTKvkNSEG/at73GPOPoQ2zXkHA== X-Received: by 2002:a05:600c:4e90:b0:3ea:bc08:42ad with SMTP id f16-20020a05600c4e9000b003eabc0842admr9425544wmq.2.1678116883754; Mon, 06 Mar 2023 07:34:43 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id v7-20020a05600c444700b003eb0d6f48f3sm15287432wmn.27.2023.03.06.07.34.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Mar 2023 07:34:43 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 08/21] target/arm: Add name argument to output_vector_union_type Date: Mon, 6 Mar 2023 15:34:22 +0000 Message-Id: <20230306153435.490894-9-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230306153435.490894-1-peter.maydell@linaro.org> References: <20230306153435.490894-1-peter.maydell@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::32c; envelope-from=peter.maydell@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=ham 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Richard Henderson This will make the function usable between SVE and SME. Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Message-id: 20230227213329.793795-9-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/gdbstub64.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c index d0e1305f6fc..36166bf81eb 100644 --- a/target/arm/gdbstub64.c +++ b/target/arm/gdbstub64.c @@ -210,7 +210,8 @@ int aarch64_gdb_set_sve_reg(CPUARMState *env, uint8_t *buf, int reg) return 0; } -static void output_vector_union_type(GString *s, int reg_width) +static void output_vector_union_type(GString *s, int reg_width, + const char *name) { struct TypeSize { const char *gdb_type; @@ -240,39 +241,38 @@ static void output_vector_union_type(GString *s, int reg_width) }; static const char suf[] = { 'q', 'd', 's', 'h', 'b' }; - - g_autoptr(GString) ts = g_string_new(""); int i, j, bits; /* First define types and totals in a whole VL */ for (i = 0; i < ARRAY_SIZE(vec_lanes); i++) { - int count = reg_width / vec_lanes[i].size; - g_string_printf(ts, "svev%c%c", vec_lanes[i].sz, vec_lanes[i].suffix); g_string_append_printf(s, - "", - ts->str, vec_lanes[i].gdb_type, count); + "", + name, vec_lanes[i].sz, vec_lanes[i].suffix, + vec_lanes[i].gdb_type, reg_width / vec_lanes[i].size); } + /* * Now define a union for each size group containing unsigned and * signed and potentially float versions of each size from 128 to * 8 bits. */ for (bits = 128, i = 0; bits >= 8; bits /= 2, i++) { - g_string_append_printf(s, "", suf[i]); + g_string_append_printf(s, "", name, suf[i]); for (j = 0; j < ARRAY_SIZE(vec_lanes); j++) { if (vec_lanes[j].size == bits) { - g_string_append_printf(s, "", - vec_lanes[j].suffix, + g_string_append_printf(s, "", + vec_lanes[j].suffix, name, vec_lanes[j].sz, vec_lanes[j].suffix); } } g_string_append(s, ""); } + /* And now the final union of unions */ - g_string_append(s, ""); + g_string_append_printf(s, "", name); for (bits = 128, i = 0; bits >= 8; bits /= 2, i++) { - g_string_append_printf(s, "", - suf[i], suf[i]); + g_string_append_printf(s, "", + suf[i], name, suf[i]); } g_string_append(s, ""); } @@ -292,7 +292,7 @@ int arm_gen_dynamic_svereg_xml(CPUState *cs, int orig_base_reg) g_string_append_printf(s, ""); /* Create the vector union type. */ - output_vector_union_type(s, reg_width); + output_vector_union_type(s, reg_width, "svev"); /* Create the predicate vector type. */ g_string_append_printf(s, -- 2.34.1