From patchwork Sun Dec 8 22:48:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 848282 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c2:0:b0:385:e875:8a9e with SMTP id f2csp1840084wrt; Sun, 8 Dec 2024 14:50:30 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXHHXnlTPwYV9qemxqzJW0k2ajCZO7y8Aikp6Dz4qQ2nlOj0j3G031BD7yZUJcxUAtFcwkayg==@linaro.org X-Google-Smtp-Source: AGHT+IG9M7v37tj9BanFRKA9R4EYTVIh0HkUKynP23dDirsU5ANLah+WmBZoFIZPulG9kClVkvtX X-Received: by 2002:ad4:5745:0:b0:6d8:8874:212a with SMTP id 6a1803df08f44-6d8e7129396mr174266096d6.17.1733698230634; Sun, 08 Dec 2024 14:50:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733698230; cv=none; d=google.com; s=arc-20240605; b=RWvzdzTA4KTh6C//XrjgavT2GXRG4B9OV+VuyB8gLfjnx0kPaq03zrf08LVlMXhl40 pPLyYTu2/DvkxBdflR90FQF0wEroLiU1DmCX5UKAVm3npMWpHiad0qAy8WT5GpQPbgTu xUzMwwBQ0TkHT/JBT4uifV6SVYiBueKUpShE8vLEEABbWqkJRUe9V+rhM4d9TYD+d/k8 42O1iJNG+6FtZD5z0R/nWPj9HwTDgHHwjkYIfvDRXtyoQSxgouWva3PYXqNiXTpkB1a0 SS0B8DH8ifw7nMJJ1oCOUlccRTnmwo7He33pOUtNCzF0kgWsPA5JevMfCSSpqVI26lmN D42Q== 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=9z7LwVl4Onw4FA8ZAnPozMScnx/mfNwPcZbWnSZkFg8=; fh=ZTutxOFfSTK00/NSefao3I8YzT34sqQTgDXNvfsMID8=; b=EWGCWrqRzOB1tsMV6cCp5gVy9ceiQGW6ROu1NzH7xyt3KuveVyJzmqdwzQu67Tb3PL tfi0QEbE1KkaXM9a72DKcdWYy2Z93KkbWA4Ve8pzkNCiuaeLIh4eBkB7xDB+E3oaNJK7 vAv/TN14SuOE1cHJvqc20UErI9/02jc+gyKyC0PQnEKbJYxEURcTPUjNWIX2U87J8M8V FK89zdrglmNP/ae5IyUQ5cy2jGNQnaQwPl6GXTlfvqEkEEsJXVopvFJ7iPX53jcnty3D E/HCVKx/xNgmXOnsetNzvYgWvPZt8qb3OoKSZziGgznoLvbeSr9b1wX9cnEOlwAg4nJc Abcg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SBrPCG5H; 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 af79cd13be357-7b6b5a46479si1026801685a.116.2024.12.08.14.50.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 08 Dec 2024 14:50:30 -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=SBrPCG5H; 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 1tKQ5G-0007Ao-GH; Sun, 08 Dec 2024 17:49: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 1tKQ5E-00079k-9H for qemu-devel@nongnu.org; Sun, 08 Dec 2024 17:49:00 -0500 Received: from mail-oi1-x233.google.com ([2607:f8b0:4864:20::233]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tKQ5C-0006EW-Md for qemu-devel@nongnu.org; Sun, 08 Dec 2024 17:48:59 -0500 Received: by mail-oi1-x233.google.com with SMTP id 5614622812f47-3ea49150430so2052430b6e.1 for ; Sun, 08 Dec 2024 14:48:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733698137; x=1734302937; 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=9z7LwVl4Onw4FA8ZAnPozMScnx/mfNwPcZbWnSZkFg8=; b=SBrPCG5HeCesc+hNKFz74NLZm2XuvZe067b+EyXcIHs1JJJVsKxrIdJs/tdlzc+t0E tWGx84VcZsbgBpuMewDTB9zwiS1dvZ3fDIZxlnFWrsSbNXxCdtQhx5ePSlT3K6EETjey oGB1DWuHmdIcQR+Ljm/EPA/0VUdmbdgxQo+0HGNGofiGg//6h4rIBwbQ+so+7eFfH7KX RE8nmxglpdU/W31rEuRUvNpjcYTU+2j8j0gt7B1Nqtt19XNTQwL0yJFTqwMzo0oj54/i yd0HMIvLR7b+fwZlLFli3ez8rlFlNTIUiCp2g5Edzm1558s3GlFSGEmnHtMMUZVSnG72 GSHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733698137; x=1734302937; 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=9z7LwVl4Onw4FA8ZAnPozMScnx/mfNwPcZbWnSZkFg8=; b=i3u+fOqIyvhRHw+M27b4JAPT//9KMNToGbNDzESMhcD6E81BcS5A7UWo0ehngeD54Z ocMMxgMTk3A2GY33KTIeXuG85g+/zflDOOUE5VXMZ6SCGQmRlBH+aNSY7hZfN6Kv4HCa TfmfsRoOUE2ZuSFayA6lKeADtRK6LnpWF3xx6WvPxBpXqW0GpsHAuNVgV6OTQFPCi3Pa UJT0SoXQv3IEMDAh+Ar8UbqKcOV1VxSBBsZ5VEx+BA5sbmXunsaICkSUCq7LutJT+ljU UHWC5XSiW6k/pVwF7QGq5G1Bvyf6IWSeiDC6HkcPccGvQnnF/vXoemBflzLYw9kqpafb 4gSQ== X-Gm-Message-State: AOJu0YyVhQDIQP4Uqha8Yh3KZPvolrSg0XSwrAjXhUdQ3qCFgrnETpvR o5lyA3RCP5h1Vf3h9F+u4GKSexSs4eE1ZIYKEiup63RfikPXq70RSM42syRmKUFlFdBNfQBaC3S czyOCNA== X-Gm-Gg: ASbGncsAvUu7vcQHr9i2jQqPWVWttRL3O72Cji1Zv1L37aZ+XxT2NdFQS6cvkK8CVCH AqoYTZ2cplz8DaVxyZ5Fc3A6ClKjWfnOzlDEGJTQjcVAMw3ZMi2q5Z6Cfg4wBV56Jn2tKTr1FqQ VhdkHery6hDDIQkk+Fjx3FnAuIG1ZQhuq+KHh8VrH0Em/jv0uw1WBOtwU30F6FymMOHPXHDWOC9 QHJwu4sYQdQMqaYzeZSmgvs54lIWLKTNrI6tvAJ2y9Soe2CCxuBdSnwPk9zcu/WY2U6+CH/Wdze nJ8Kq4DboZr+bfCxvZElP0DvRDViGRA5SpeV X-Received: by 2002:a05:6808:251a:b0:3ea:4aad:a889 with SMTP id 5614622812f47-3eb19dd0645mr9668297b6e.26.1733698137650; Sun, 08 Dec 2024 14:48:57 -0800 (PST) Received: from localhost.localdomain (fixed-187-189-51-143.totalplay.net. [187.189.51.143]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-71dc497ee8fsm1925198a34.39.2024.12.08.14.48.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Dec 2024 14:48:57 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: bcain@oss.qualcomm.com, peter.maydell@linaro.org, mark.cave-ayland@ilande.co.uk Subject: [PATCH 09/17] target/hexagon: Use float32_muladd for helper_sffms Date: Sun, 8 Dec 2024 16:48:36 -0600 Message-ID: <20241208224844.570491-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241208224844.570491-1-richard.henderson@linaro.org> References: <20241208224844.570491-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::233; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x233.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 There are no special cases for this instruction. Since hexagon always uses default-nan mode, explicitly negating the first input is unnecessary. Use float_muladd_negate_product instead. Signed-off-by: Richard Henderson Reviewed-by: Brian Cain --- target/hexagon/op_helper.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/hexagon/op_helper.c b/target/hexagon/op_helper.c index 7d459cc6f3..aa5ab4a31f 100644 --- a/target/hexagon/op_helper.c +++ b/target/hexagon/op_helper.c @@ -1208,10 +1208,9 @@ float32 HELPER(sffma_sc)(CPUHexagonState *env, float32 RxV, float32 HELPER(sffms)(CPUHexagonState *env, float32 RxV, float32 RsV, float32 RtV) { - float32 neg_RsV; arch_fpop_start(env); - neg_RsV = float32_set_sign(RsV, float32_is_neg(RsV) ? 0 : 1); - RxV = internal_fmafx(neg_RsV, RtV, RxV, 0, &env->fp_status); + RxV = float32_muladd(RsV, RtV, RxV, float_muladd_negate_product, + &env->fp_status); arch_fpop_end(env); return RxV; }