From patchwork Tue Feb 21 02:19:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 655350 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1725314wrc; Mon, 20 Feb 2023 18:22:43 -0800 (PST) X-Google-Smtp-Source: AK7set8RVI1Pr3n8ym+MCsxqRVPBUtW79B7ewTCLw0uKD4tt81bMDjd8typoX7pJAGx85sVNk93Q X-Received: by 2002:ac8:5804:0:b0:3ad:202f:8797 with SMTP id g4-20020ac85804000000b003ad202f8797mr20591346qtg.9.1676946162932; Mon, 20 Feb 2023 18:22:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676946162; cv=none; d=google.com; s=arc-20160816; b=kH7KjFig2slZM/MqlyYYc53QvHeS87wJzcL9Blm3uyG6FeSC3es9oKE6cq/H7E0Vi9 OAuH0M+BJ7tJTNIvogntEVurAuj2q8jrs/6pbtij6Zp4cvRJN7Tb57PJS1Htl4wQxAcY 0NcgucOuo4CLQAnb/3Uv/9qpbHdt+1/fdILF5D1BCgMdcmS35utlxJLUzlLgbyu/Fm49 yqKTdj4ghjnu+aoEbkhCnHWZo2Yh7XSSoCK+NV9J5m8PFklxgN/L5k08cMNplhQSrA2w LBq3mqGn/PtnMb5YGWRHB4UAyfwbxpMF6sPPLPeD7Bczy2t8lzsUA8E5+t834etabRCr IQnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=FenKak9v2X2vdqlU4pPM5lEm81DvM/co942SULkbTsQ=; b=S1aJvBgJQYML1LCH2B2iUSt6fi2M4KlubZvb0CW6GrWM2Azhiy0gyVXxqU/mITqpz9 v/LCw99uFzq1xVQa9q1x/tX9rHiZY8kF4FfzPZ+oYQwdsZC9J89lrvy4NY3kaA3x6B2N yHIDswix/ayhuwQKYJJgqMnCHmn2oq5NTg1J+B5RT07oYtwYB34I1K5clvOoaDw81xXD zNbD3T66745ykSf3zH9C81gD28hu5cqsiT4PUrdzjFFba/eFp0YANtHe6bHCwyvkDPQh JcQoKfkxqKWsuQ7NHsvwv2vaZXKIM2WynSkn/qd9cO/Ia7OiCCC5Zp4KhyLYs+xv64Zj oy/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h2cmN2MA; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w12-20020a05622a134c00b003b9deb6633dsi11296184qtk.75.2023.02.20.18.22.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 18:22:42 -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=h2cmN2MA; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUIGA-0001ZZ-68; Mon, 20 Feb 2023 21:20:02 -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 1pUIG8-0001YO-QC for qemu-devel@nongnu.org; Mon, 20 Feb 2023 21:20:00 -0500 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pUIG6-00080p-Df for qemu-devel@nongnu.org; Mon, 20 Feb 2023 21:20:00 -0500 Received: by mail-pj1-x1029.google.com with SMTP id nw10-20020a17090b254a00b00233d7314c1cso3357528pjb.5 for ; Mon, 20 Feb 2023 18:19:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=FenKak9v2X2vdqlU4pPM5lEm81DvM/co942SULkbTsQ=; b=h2cmN2MAT2x9FSWOCa73jPOVTEfLnRERZv1Zri+6vw3ThDvwZaVVxli+6O5Pm2y3DQ XoHTnB0Qt0xH+u8kmc14mwL10lWGH3nx9MxNL7tZrB8nS9cTZ1i+SFT34bSy6J0OpGN9 gUCca22uCYe4NIB00Xh6dbgbEHU4PtWqb1x2FJqSlbHrDCibxzryTn/kJaz0Fp1Hk6yF uZsPF3tBJQdJwzcZtu0JPw0Gv5jvuy/wxsRwBYfx0wJAHvXR6XQxB71j0wC4EFHKW33m ThaL5K6xsy/n0x6V61di5PjRU4O+dvDocSkeSHzi0PzRDUSkawyVL/e1HLBwa3WXSKTe NdIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=FenKak9v2X2vdqlU4pPM5lEm81DvM/co942SULkbTsQ=; b=vXDRyeImmsixv0BOoOgE0zd4icf3T0y6n7jefRyp/UVnTlHlyxv0ba+voc6BSuU3JF 6mImyfteJzqjJs8QkHElVSNbm/omv7Ev67SjDyaLjnmaLLXybAH8GF7n/b8PwowRdjdX jRS5T1wALYT2FfQjfZMjOR7tEGjeso0Jl7iLpLwxVzY+Azr5gwzysm/Nekd/2Z43PLV1 iYwD0LWcPSbszcPd+XwcBDHTsamdCBMtjqJwSWjWzaAwAJU8nP0GXn9dwF2qdQgeasNF ltSz8VWn6dL5nsTtl6G+wHPy+Wodk11aAOllZHD6glgi1GNbCpy/9nAIZHHWLYgCOKq4 j1sA== X-Gm-Message-State: AO0yUKVmZ8FrKyFmamUR7A+2DmeXV7Fyh5OzIKEgV4EZ7qFehco/u+4d HgCPmU9MhpZ2YX8kAba+QTerq6rtvgMNRqJAOSk= X-Received: by 2002:a17:903:1106:b0:19a:8284:83a6 with SMTP id n6-20020a170903110600b0019a828483a6mr2930608plh.56.1676945996863; Mon, 20 Feb 2023 18:19:56 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id f3-20020a170902e98300b0019141c79b1dsm8559328plb.254.2023.02.20.18.19.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Feb 2023 18:19:56 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Fabiano Rosas Subject: [PATCH v2 01/14] target/arm: Normalize aarch64 gdbstub get/set function names Date: Mon, 20 Feb 2023 16:19:38 -1000 Message-Id: <20230221021951.453601-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230221021951.453601-1-richard.henderson@linaro.org> References: <20230221021951.453601-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1029.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 Make the form of the function names between fp and sve the same: - arm_gdb_*_svereg -> aarch64_gdb_*_sve_reg. - aarch64_fpu_gdb_*_reg -> aarch64_gdb_*_fpu_reg. Reviewed-by: Fabiano Rosas Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/arm/internals.h | 8 ++++---- target/arm/gdbstub.c | 9 +++++---- target/arm/gdbstub64.c | 8 ++++---- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/target/arm/internals.h b/target/arm/internals.h index 759b70c646..121ecd420b 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -1326,10 +1326,10 @@ static inline uint64_t pmu_counter_mask(CPUARMState *env) } #ifdef TARGET_AARCH64 -int arm_gdb_get_svereg(CPUARMState *env, GByteArray *buf, int reg); -int arm_gdb_set_svereg(CPUARMState *env, uint8_t *buf, int reg); -int aarch64_fpu_gdb_get_reg(CPUARMState *env, GByteArray *buf, int reg); -int aarch64_fpu_gdb_set_reg(CPUARMState *env, uint8_t *buf, int reg); +int aarch64_gdb_get_sve_reg(CPUARMState *env, GByteArray *buf, int reg); +int aarch64_gdb_set_sve_reg(CPUARMState *env, uint8_t *buf, int reg); +int aarch64_gdb_get_fpu_reg(CPUARMState *env, GByteArray *buf, int reg); +int aarch64_gdb_set_fpu_reg(CPUARMState *env, uint8_t *buf, int reg); void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp); void arm_cpu_sme_finalize(ARMCPU *cpu, Error **errp); void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp); diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c index 2f806512d0..cf1c01e3cf 100644 --- a/target/arm/gdbstub.c +++ b/target/arm/gdbstub.c @@ -466,12 +466,13 @@ void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu) */ #ifdef TARGET_AARCH64 if (isar_feature_aa64_sve(&cpu->isar)) { - gdb_register_coprocessor(cs, arm_gdb_get_svereg, arm_gdb_set_svereg, - arm_gen_dynamic_svereg_xml(cs, cs->gdb_num_regs), + int nreg = arm_gen_dynamic_svereg_xml(cs, cs->gdb_num_regs); + gdb_register_coprocessor(cs, aarch64_gdb_get_sve_reg, + aarch64_gdb_set_sve_reg, nreg, "sve-registers.xml", 0); } else { - gdb_register_coprocessor(cs, aarch64_fpu_gdb_get_reg, - aarch64_fpu_gdb_set_reg, + gdb_register_coprocessor(cs, aarch64_gdb_get_fpu_reg, + aarch64_gdb_set_fpu_reg, 34, "aarch64-fpu.xml", 0); } #endif diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c index 07a6746944..c598cb0375 100644 --- a/target/arm/gdbstub64.c +++ b/target/arm/gdbstub64.c @@ -72,7 +72,7 @@ int aarch64_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) return 0; } -int aarch64_fpu_gdb_get_reg(CPUARMState *env, GByteArray *buf, int reg) +int aarch64_gdb_get_fpu_reg(CPUARMState *env, GByteArray *buf, int reg) { switch (reg) { case 0 ... 31: @@ -92,7 +92,7 @@ int aarch64_fpu_gdb_get_reg(CPUARMState *env, GByteArray *buf, int reg) } } -int aarch64_fpu_gdb_set_reg(CPUARMState *env, uint8_t *buf, int reg) +int aarch64_gdb_set_fpu_reg(CPUARMState *env, uint8_t *buf, int reg) { switch (reg) { case 0 ... 31: @@ -116,7 +116,7 @@ int aarch64_fpu_gdb_set_reg(CPUARMState *env, uint8_t *buf, int reg) } } -int arm_gdb_get_svereg(CPUARMState *env, GByteArray *buf, int reg) +int aarch64_gdb_get_sve_reg(CPUARMState *env, GByteArray *buf, int reg) { ARMCPU *cpu = env_archcpu(env); @@ -164,7 +164,7 @@ int arm_gdb_get_svereg(CPUARMState *env, GByteArray *buf, int reg) return 0; } -int arm_gdb_set_svereg(CPUARMState *env, uint8_t *buf, int reg) +int aarch64_gdb_set_sve_reg(CPUARMState *env, uint8_t *buf, int reg) { ARMCPU *cpu = env_archcpu(env);