From patchwork Tue Dec 10 16:16:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 848836 Delivered-To: patch@linaro.org Received: by 2002:adf:ec08:0:b0:385:e875:8a9e with SMTP id x8csp418168wrn; Tue, 10 Dec 2024 08:23:25 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWDkrvwYXw8/Va6GJeAnCY2GlcaedMo76YJ8FV4kJR1TXyTyU7gBg9q/kbU8FQa2iQPLtE0+Q==@linaro.org X-Google-Smtp-Source: AGHT+IET6fATSmOCT2632A3rO4uFS0b7ozoFqpPlBZh/9g/RbYlFP2U3EZ2sY/LUlIszlxxwGorM X-Received: by 2002:a05:622a:30c:b0:461:169e:d2dc with SMTP id d75a77b69052e-46772029ffbmr69002971cf.49.1733847805653; Tue, 10 Dec 2024 08:23:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733847805; cv=none; d=google.com; s=arc-20240605; b=YVVa+6MXzs80XisZ7zOJo1Q6dqf14Bzx8hY1uVyWcELUzhOcW1hAdBA0Nnlqvdf4yI +LG8MsK4QGbkf/8BqvXweN3zuL51/aiQs1osjeRUQZAbCU0dDOBN7Yl4RHDai8uJSODe 8J9euZ6QzfS2Lfle8ITqY7zInPiJoBzgcnXxhBHHNRPhP6vkHpCsVA3+pzw/WWTF4HSD e4t785LjaqZZ+7t/NYE5Rl5PTwp7TEk6GhEp8A2EKq0YFqYVy/ANYrfRV6bGZ/qQbCtF XWVa1EIZ0haDwXrQboFvPqagYVQpGD3KStqBH87csbm3Th2L8AMDb4r6AUEy4ftB3FYx HV+g== 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=1UXwx0kDopuEVwiBnbW88lWarbgL+jsSQVFPQ+k0F70=; fh=OZQBfL75rC14cCDy3q+1fYHCs9KjWAQ7ZJ3hTfS+5lQ=; b=bF+wztP1iCjz2REgrL+fkfxCoSxxtuNsHLvBNZwqz9G0MtVvhJ7ahwMTrPqndZg9cK jvSKWmL0IjGVjTvXbeXT6C1uzxiVWOe/RFC0b7gd1927jVIsU6yOxtydAnFBgA4ah3XR 33sPdFyNRLgh0tiK674MA06RIGUIWpk+WpZGFFBRKbP255Eko1BU4Fxy7lrTyGaw5wLb XSnW9zIQdSky8gqKyMFLL20BSqvvKeUYP/VC8+ms1vxOM7b+hxwd/SFVlEq3ttTSGgRo F9dtRxR5aMZ6AWN9yz5f7A0Qd49JksnDGUFvsIbT8Kx08b3mfgPb0122LWcnzq5XfVda 4Evg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="I2evV/m3"; 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-46745a87543si95027351cf.137.2024.12.10.08.23.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Dec 2024 08:23:25 -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="I2evV/m3"; 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 1tL2xa-0004V5-7r; Tue, 10 Dec 2024 11:19:42 -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 1tL2xO-0003fU-6Q for qemu-devel@nongnu.org; Tue, 10 Dec 2024 11:19:30 -0500 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tL2xM-0006Vy-5p for qemu-devel@nongnu.org; Tue, 10 Dec 2024 11:19:29 -0500 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-30219437e63so25663751fa.1 for ; Tue, 10 Dec 2024 08:19:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733847566; x=1734452366; 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=1UXwx0kDopuEVwiBnbW88lWarbgL+jsSQVFPQ+k0F70=; b=I2evV/m3VJZxMfOCGB2GL2GfF0ibnDBMXbUpAYJpAfzZLhvlj2L3gGT1fWtPZtu58j BZ0lN1EWIKxpoS3prLEY+4qaT5bZMq/jc3WjSOJZFJd01OLzrdVJj5B3vi6q+kXfXthe 86b+ElBHelwa/7YvdhPnTjr5bj59KiiAXUjEYgpckZ7s+C7AAYtOuGOpQCdLatYqqq1A 5K+UF6cBpCGVfE6E4bdj8HP7cNKD7sT/hi0sPKYo51QuqKJCBi0/cyFb8dJwM1tU3MkG Q0F4GmCynbNrEqduBBWQSz2pkwTcnGd3wmOAeRfVSwGy5FL0PTLlnFadRTKRc54HrU80 CEyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733847566; x=1734452366; 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=1UXwx0kDopuEVwiBnbW88lWarbgL+jsSQVFPQ+k0F70=; b=UbSpZywDIxxonuawomAKwebALKLk+50IkJjWFQa4vn1bYIuuMlxF9FGNlNPOIR08yo SBFDp3eZBdVikuiGaXM3I3kvmEKfwIqsi5kCUsceNxQ8j46r1izpZcbnH2g07DzruHEY dYAiexa0vNJ0FDjmr20N/jwZkzqCG9BIYBj13CGMBhU0REGS9m9TCxl0ZMEcAioWDgsi 40JPqH4NYILJLCjkNyzIVQRQNVGwgqFXrzQC2LEHGli61o6Sd5wGEz2PKSf88vtw/rN+ YbSD/6NuDW7Oyy3ZQ8D0cFy9rjIedfcCpI5PN0fY7r2x9TYGqaT5QsY05ox2LgansqGB FOPw== X-Gm-Message-State: AOJu0Yxv7VbzIuiVrdVezS8UceSFHGbNn6jcbgffnz6Zf68A64JND5Ra xxhpi64HLNmDmwUfOkKd2QTPYpC+1uoxMkMIc+P+i2BCafHcxZdKJfnylwN6gcbAjCEU/iNuwWd d1a6+Z3BK X-Gm-Gg: ASbGncsfMvPQh7abWIFHeaE1LarZWevLWakIsOAQW0NW2fHGq/nrSXz0EjA5J+k0Gaj 5OxFjRh9k23RMc+Sq5prBZzm2s31vCyAFvVWvC6iXcDit86WFrs9UPRP5G784jNeoDJcSiV+Amc LXbQmdoSmeLoec9aMXsz6saLAEre1Ysrgllq6R6v/K2JQ5j2ZsVpw9LZO7SfVcbvY57rQXkVFIR CcKfWq9ae1hPf2/Qa0p4V4rQM6BMJs6hF73iab1U9NP4ELQgTwFP02nnoo= X-Received: by 2002:a05:6512:1250:b0:540:2223:9b1c with SMTP id 2adb3069b0e04-540251fd730mr1441112e87.25.1733847566392; Tue, 10 Dec 2024 08:19:26 -0800 (PST) Received: from stoup.. ([91.209.212.80]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53f93377eefsm1026343e87.67.2024.12.10.08.19.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 08:19:25 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 26/69] target/arm: Remove helper_sqrt_f16 Date: Tue, 10 Dec 2024 10:16:50 -0600 Message-ID: <20241210161733.1830573-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241210161733.1830573-1-richard.henderson@linaro.org> References: <20241210161733.1830573-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::235; envelope-from=richard.henderson@linaro.org; helo=mail-lj1-x235.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This function is identical with helper_vfp_sqrth. Replace all uses. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/tcg/helper-a64.h | 1 - target/arm/tcg/helper-a64.c | 11 ----------- target/arm/tcg/translate-a64.c | 4 ++-- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/target/arm/tcg/helper-a64.h b/target/arm/tcg/helper-a64.h index 481007bf39..203b7b7ac8 100644 --- a/target/arm/tcg/helper-a64.h +++ b/target/arm/tcg/helper-a64.h @@ -80,7 +80,6 @@ DEF_HELPER_2(advsimd_rinth_exact, f16, f16, ptr) DEF_HELPER_2(advsimd_rinth, f16, f16, ptr) DEF_HELPER_2(advsimd_f16tosinth, i32, f16, ptr) DEF_HELPER_2(advsimd_f16touinth, i32, f16, ptr) -DEF_HELPER_2(sqrt_f16, f16, f16, ptr) DEF_HELPER_2(exception_return, void, env, i64) DEF_HELPER_FLAGS_2(dc_zva, TCG_CALL_NO_WG, void, env, i64) diff --git a/target/arm/tcg/helper-a64.c b/target/arm/tcg/helper-a64.c index 8f42a28d07..3f4d7b9aba 100644 --- a/target/arm/tcg/helper-a64.c +++ b/target/arm/tcg/helper-a64.c @@ -915,17 +915,6 @@ illegal_return: "resuming execution at 0x%" PRIx64 "\n", cur_el, env->pc); } -/* - * Square Root and Reciprocal square root - */ - -uint32_t HELPER(sqrt_f16)(uint32_t a, void *fpstp) -{ - float_status *s = fpstp; - - return float16_sqrt(a, s); -} - void HELPER(dc_zva)(CPUARMState *env, uint64_t vaddr_in) { uintptr_t ra = GETPC(); diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index e278c0d87b..e6878abd35 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -8354,7 +8354,7 @@ static void handle_fp_1src_half(DisasContext *s, int opcode, int rd, int rn) switch (opcode) { case 0x3: /* FSQRT */ fpst = fpstatus_ptr(FPST_FPCR_F16); - gen_helper_sqrt_f16(tcg_res, tcg_op, fpst); + gen_helper_vfp_sqrth(tcg_res, tcg_op, fpst); break; case 0x8: /* FRINTN */ case 0x9: /* FRINTP */ @@ -10976,7 +10976,7 @@ static void disas_simd_two_reg_misc_fp16(DisasContext *s, uint32_t insn) gen_helper_rsqrte_f16(tcg_res, tcg_op, tcg_fpstatus); break; case 0x7f: /* FSQRT */ - gen_helper_sqrt_f16(tcg_res, tcg_op, tcg_fpstatus); + gen_helper_vfp_sqrth(tcg_res, tcg_op, tcg_fpstatus); break; default: g_assert_not_reached();