From patchwork Sun Dec 8 22:48:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 848283 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c2:0:b0:385:e875:8a9e with SMTP id f2csp1840107wrt; Sun, 8 Dec 2024 14:50:34 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV6SpKyXbPrgHRrjIwqf5C2l/hQvq1z5cxzruO4PGLwIeT8Cv0mjtypznq6+z6l/4RnaoMm/A==@linaro.org X-Google-Smtp-Source: AGHT+IE0SXIbPoV48Ral9nXe99ytISK9IDYQa1DGPxF/K40aP2du0/b3Xfn4hDnuT+mcTKCEBnm0 X-Received: by 2002:a05:620a:394a:b0:7b6:6c2e:1fae with SMTP id af79cd13be357-7b6bcb4cb12mr1718397685a.48.1733698233845; Sun, 08 Dec 2024 14:50:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733698233; cv=none; d=google.com; s=arc-20240605; b=bb/NfLcu7RfV5K+AST3kqhxQDI6jHQYnef08IhXFiF3cNVKq1aJf0zOJNMDfgvvoHC rhdJ5C0wpkcVkTOqcSYaS9+TSGFbiZD+epUqBI4ANMtyNGG3frqB6aNZPIKG08zXPtSy 36jKWHuH1asq+THaIuIxu2toKDPl5h0EiQxBeD1Y3f9XUhQO7UjdtOrd/5Mn40gT6nry fhIo/jzjezFrefURXX9N9+jCEcpyDX2AaFNLbhFlzFJ/g8wO3/7zXUF/QY/PK+uCERC3 dAEuQ6u1+9q0vtE39pSoOmB4w8XFhx+Prs7TPqOdk1/oj7644isSiJlwx85MEwPmffMj KBkg== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=dry87Jh5nw9awikYWLGeiW+IAYg+Rmtsj19DEsR1oJ0=; fh=ZTutxOFfSTK00/NSefao3I8YzT34sqQTgDXNvfsMID8=; b=SOb+D/BGrHNTH5vj/gT84m+7qQBSEW8V6PAdHoQTnM1CW4obuDrHE5vPJKMcY911j8 NNq5uVUZm83dv6DmkmyBC19X6xEPFdalZGNaFCmmjAKzFc7+3bCtITwulwGSsaf/I05j GMyXBAtO1PtmIzlBYOxBqkYwMI+zn6DCLY+2PQDLqXnh2N8oBTkvQTETHYN/txnTODMs hltE7I1r+2VIhs+j6e8mQbhw42dnxVtlaMxnChpV3h6T3009wR3Y67voG7piMfGjVDN6 pT/CwN3p+i1NooIblddYDB/8yvNQZE0OR5TWWqNe1Q2q7ttA6JghceR3N5zemGyW1QFi g24w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Jx//+Y5S"; 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-7b6b5aaac3csi1015042685a.480.2024.12.08.14.50.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 08 Dec 2024 14:50:33 -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="Jx//+Y5S"; 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 1tKQ56-000773-7P; Sun, 08 Dec 2024 17:48:52 -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 1tKQ54-00076k-Rz for qemu-devel@nongnu.org; Sun, 08 Dec 2024 17:48:50 -0500 Received: from mail-oo1-xc34.google.com ([2607:f8b0:4864:20::c34]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tKQ52-0006C6-LT for qemu-devel@nongnu.org; Sun, 08 Dec 2024 17:48:50 -0500 Received: by mail-oo1-xc34.google.com with SMTP id 006d021491bc7-5f1ed6ee4d6so1860412eaf.2 for ; Sun, 08 Dec 2024 14:48:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733698127; x=1734302927; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=dry87Jh5nw9awikYWLGeiW+IAYg+Rmtsj19DEsR1oJ0=; b=Jx//+Y5S/cLpGUM2TaXuqnjt+pO9MGBfu4W7OXS2XxsTK8SadKVyTgKog3MjsLU2XS Y7c4WpvkVUBaqHetsN6W8WjoYNu0NKPhEp6AJ9g3Yd5MZtdWMhBvJHs+wH4t8UYJCJl5 /QoZRwxit1eEfQhY6QcFL9DaoOn0cVm+doQioNlRHCfHoSdj+2Rc6qsrRXRshBCW1fuN xO5uyeFD0m85R7h4JhCFgayKoDLKVJkpbyYQpIceaclQV/tST2umrHBI4zUuVWWKF7I0 dEh/RlLWm0svfBsfWr+5MTIFrlhDJbGD52LOI5Z/W3n2nuofNt9Mv+Jk4UrjQ/J73xVU /vOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733698127; x=1734302927; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dry87Jh5nw9awikYWLGeiW+IAYg+Rmtsj19DEsR1oJ0=; b=T2f2dhFkwa3490S3GsnhwrvhDmgIooK/or+rz1Zek0OSuONUb7GU+kSw4bt0TeH4v5 7Uw7r+xdQsoRt+b0ibkynEDtzeAbEd6DXVchT/l3mRlIaOwcJ30AMgM4oWQI/aIOt3lJ KlFBy+liVEE2WwKPNWY7XY8+CzFzDrIgJqf84AIoRdqdoIPXOKZX/YmqKFWY5vSxGTT4 13A6FZrf3C7akNv+JUUwn50bP/GZ5V9QnmImq7fq1mJrE8zF+NbjavAg+ucL9pGtbetB TGDK6GCqs9Q3yn87ESwWq5Iq+79YWubVEdsRspfusgC7Up3tDztOYNCSKjkniDRo3bMh Js6w== X-Gm-Message-State: AOJu0YzZv5g/AmoAn1+PCgikoA2xRW/kp3Qho6x4ltNJZW+CXL7Ee2mC zkLsdhA3EsMRpZPI/hVKBU3ylP/Zsh5uabL5USDFxL8PNHqOkHa3hKhiP4wu4c4warlBo4PjXFK 1zoiEfw== X-Gm-Gg: ASbGncuO1QZ/JTs/l0UCR51zs9xwbx3HIZdzrOtQ5/NHROOPLJiEgk975fwCvYcOuD2 1Sgqi54IrnlOGuhMIkB4gOd2gU3HqFX9owkY+rFkIrevvtcDnD8Gd7PADxrB24sRzzsYWOFbtoe iQ97c9BjptsIdUYQ2kyT1cYoyz2lL6zXExCIENGq9guqSB0hI63Iohvbxl9iL9NcP6BHSREhMe6 fbNth4OZLhFN3647GMy73HDYAmSMN4b531BZy5ZoOhyjcMZhrc+lcyrZs5REHY4Bbd0tiYUkbA+ IFzdhQLiGZ7FJFJPr1OPY3Gh3U+EQMpc0sO/ X-Received: by 2002:a05:6820:16a9:b0:5f2:5dfd:ecba with SMTP id 006d021491bc7-5f286e777dbmr7123170eaf.1.1733698126869; Sun, 08 Dec 2024 14:48:46 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Dec 2024 14:48:46 -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: [RFC PATCH 00/17] softfloat, hexagon: Cleanup fmaf Date: Sun, 8 Dec 2024 16:48:27 -0600 Message-ID: <20241208224844.570491-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::c34; envelope-from=richard.henderson@linaro.org; helo=mail-oo1-xc34.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 While looking at some float_status usage, I got distracted by some odd looking hexagon code. With some minor additions to softfloat, we can handle all of the special cases. I have a feeling that dfmpyhh can also be simplified, but I don't quite grok the accumulator in this case. It appears to be integral value, added into the middle of the floating-point partial product? r~ Richard Henderson (17): softfloat: Add float{16,32,64}_muladd_scalbn target/arm: Use float*_muladd_scalbn target/sparc: Use float*_muladd_scalbn softfloat: Remove float_muladd_halve_result softfloat: Add float_round_nearest_even_max softfloat: Add float_muladd_suppress_add_product_zero target/hexagon: Use float32_mul in helper_sfmpy target/hexagon: Use float32_muladd for helper_sffma target/hexagon: Use float32_muladd for helper_sffms target/hexagon: Use float32_muladd_scalbn for helper_sffma_sc target/hexagon: Use float32_muladd for helper_sffm[as]_lib target/hexagon: Remove internal_fmafx target/hexagon: Expand GEN_XF_ROUND target/hexagon: Remove Float target/hexagon: Remove Double target/hexagon: Use mulu64 for int128_mul_6464 target/hexagon: Simplify internal_mpyhh setup include/fpu/softfloat-types.h | 2 + include/fpu/softfloat.h | 14 +- target/hexagon/fma_emu.h | 3 - target/sparc/helper.h | 4 +- fpu/softfloat.c | 64 ++--- target/arm/tcg/helper-a64.c | 6 +- target/hexagon/fma_emu.c | 494 +++++++++------------------------- target/hexagon/op_helper.c | 125 +++------ target/sparc/fop_helper.c | 8 +- target/sparc/translate.c | 80 +++--- fpu/softfloat-parts.c.inc | 16 +- 11 files changed, 277 insertions(+), 539 deletions(-)