From patchwork Wed Jan 29 01:38:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 860633 Delivered-To: patch@linaro.org Received: by 2002:a5d:6b8c:0:b0:385:e875:8a9e with SMTP id n12csp647535wrx; Tue, 28 Jan 2025 17:40:22 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVHl3HRd9Q0YUDyjsUbhHi2sk8wC4j48jyN5xLvhTf6Z4CsPLudRP0cm8fV94MyuP9ngmzV4A==@linaro.org X-Google-Smtp-Source: AGHT+IEeQfq3CNneWWCnV0eD1wSv9sza++H9mKgjvI4Z1tK1nz9kyR4+EsXkrP89VUa8N+k0LSHB X-Received: by 2002:a05:620a:284c:b0:7b6:d28b:42b4 with SMTP id af79cd13be357-7bffcce1d50mr211177685a.19.1738114822022; Tue, 28 Jan 2025 17:40:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1738114822; cv=none; d=google.com; s=arc-20240605; b=MOeLr0nlwMHE8aOaMw3KsQmOoHcNG0ZC5jgLODAP0g5Ll/7BSvFerL5pD0dI46TroC MWnpQbVFI3z1lEpMaMQdD+vy9S+4Z5fr9+gImpUdses2ZVdmAhdwJz4TUcl63J2m9vzv DOLH/8VBEcjmcbYJAKfu4eNqmZGx3c4ByKp7sSHgFY/EcKEhKkIq7VgJgblU8D8RmD/Q k0n+0Qg5xui3d9Xxrb2heP8UFGB5CVZwV/ELtd1sIWxCYbGEpPJ4Skr7MB2PFkwcCWyd s7V2pBv22QkMQucmQ3lbc4JQYNrR5ujUAesLImvt44rJBqkdeq8W41Zbt6i3caJ89+e8 ei9Q== 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=TizWhFZw5JvY75vssZ/TpOwGEzqE+NmThakWyt0pk6I=; fh=UQCixiNfr28ZOrfhmxiGPA65dFhly8CmRsnoYC6xI9k=; b=Vz0AjvF9G+QJ2dYPJMD8WhT2pEtHh5dzkWYmRgBdUn4a06LvXcrlb47z2+fB6R37mp utbXXw8ZxJa4U2+1iis6Rli8SLsgiHvnjByKtEaeuXutcgGS+Ah+TO2krvWjb87p9CIu 8VXblqUJXoUbr/2YHFJrHmHWWl8xAMF+qYssMmG44Xr4DLQzcNSgZMd9WdygkkNI43A1 ZyYzN408Tlo/C8adSiiwhPcoSJchRXXl8HoIG4wdwFmC4T9Dtfz2wcvRruR2AtCPD0g4 8cl+aLBdcbsV3pemJjOuM4dtltWV8xBMr2hDCvs8kRqHMNghJHeZAjeV7vJIT5/SM4Pm mJmw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pba2D1f4; 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-7be9ae81b4esi1375604585a.66.2025.01.28.17.40.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Jan 2025 17:40:22 -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=pba2D1f4; 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 1tcx2z-0000tu-V8; Tue, 28 Jan 2025 20:39:18 -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 1tcx2v-0000qq-UI for qemu-devel@nongnu.org; Tue, 28 Jan 2025 20:39:13 -0500 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tcx2u-0003Xi-HT for qemu-devel@nongnu.org; Tue, 28 Jan 2025 20:39:13 -0500 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-21628b3fe7dso112725165ad.3 for ; Tue, 28 Jan 2025 17:39:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1738114751; x=1738719551; 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=TizWhFZw5JvY75vssZ/TpOwGEzqE+NmThakWyt0pk6I=; b=pba2D1f4uKLFEE2sfkvjul4Ph4WV5zRkNitz5r9VxXMBykpLvVcQ9+R6Sbg6d/Yw9C H66tVrcSWXzLhZd74aExz4VZWRaxIpDqgjNjLums0sjpQoNQhQB+6H+7rTicxkcOaaUm d2n3lfsuFFm+2WcNQrkrOXiEodM1I0fQjazyr0myNLlRkPR40yzFaQc9SZgPi81ofdwu Uypjy7g1XQ92Jo++miLmOiY6A4ym1obRkXDj4dDnhMrbYZ5AkB4mCO1Z7O5YGUP3Nmvv A3p+pCe+URKTGDpAor56O2aevycu2rym0kh+tggXVodaK8O8EI6RDpVcscawhN6LQIzC KvUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738114751; x=1738719551; 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=TizWhFZw5JvY75vssZ/TpOwGEzqE+NmThakWyt0pk6I=; b=F0/tOXLrizKd6yBC5d8A0xEexDIqOCN2i4bHke3Exm+XNCbWAzDbJ7znO2x8+VhnbK XVCSUP90ghJYIodwLS6KcG0N7i/TBjeo143dDtQVLghT8c4zJnB5Uf1NHw1+7tXE3Ix2 RPzo6KJ1WjUgJafBAHtne99QyLVftOq4IIHjrtUukerx9HUDdrIMOHWKfptnpmy70uIZ vVxq0C3QnGvAAn/Nlp8lYsivFwnLTWQ47YQ28o8usmkAuLjierGmLIDsTkNPTZYz9UWI YiV/5+BoZUVuChyW5BNuBRKcz4VcRpC+I8y1Mu+uKsKUoEXSRNiuFJ3HrSw1qgsp5mBu yG+g== X-Gm-Message-State: AOJu0Yxc5ov26b0W6ORtq5Fb3+yXAUo1lAWWX3qJy/i+qUtIgZWkan/m GIqBFp9UP4X3Cipkup8RyECZcCfejMd5RDcgl5MdmP8a90QsuhxVhzXfyWLUJVQYXv9GL2baF9T S X-Gm-Gg: ASbGnct6DbZC+WMyCOYuAGu0/WRI/tdaZcxzPalJcyO5aTH/id3qXy+WkHH4hdlKLji oXw+xTDBaXrNGoR6UJrYceUOusbQVt4M1kZ/N9umbTcb5R5MRHIvceahJSoBuvE/gI7xISQrUcb 5ZJyHMxjuqBVM0ktDZ0tC3qiuCDCl0bf4wx6nIzeMj/oBEMGlj815AI9kvfC+xgzBfNZwJpByA8 dsAJIrDJ5vwp8YzUvuWFV6PNK/fAJCyMdJIOTY2EmeNEH+pf3wwcPprDSi7V/hNiYpJPRaYk69c 0/zhm1/bkP/kUddeEFzRBekfX0pTYbhOEXxPsKlzLN6CiSHFgg== X-Received: by 2002:a17:903:1205:b0:21b:d105:26a5 with SMTP id d9443c01a7336-21dd7ddde73mr22100215ad.38.1738114751246; Tue, 28 Jan 2025 17:39:11 -0800 (PST) Received: from stoup.. (71-212-32-190.tukw.qwest.net. [71.212.32.190]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21da3ea4200sm89341745ad.88.2025.01.28.17.39.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jan 2025 17:39:10 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org Subject: [PATCH v2 18/34] target/arm: Introduce float*_maybe_ah_chs Date: Tue, 28 Jan 2025 17:38:41 -0800 Message-ID: <20250129013857.135256-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250129013857.135256-1-richard.henderson@linaro.org> References: <20250129013857.135256-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x632.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, T_SCC_BODY_TEXT_LINE=-0.01 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 Add versions of float*_ah_chs which takes fpcr_ah. These will help simplify some usages. Signed-off-by: Richard Henderson --- target/arm/tcg/vec_internal.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/target/arm/tcg/vec_internal.h b/target/arm/tcg/vec_internal.h index a673935f48..6b93b5aeb9 100644 --- a/target/arm/tcg/vec_internal.h +++ b/target/arm/tcg/vec_internal.h @@ -285,4 +285,19 @@ static inline float64 float64_ah_chs(float64 a) return float64_is_any_nan(a) ? a : float64_chs(a); } +static inline float16 float16_maybe_ah_chs(float16 a, bool fpcr_ah) +{ + return fpcr_ah && float16_is_any_nan(a) ? a : float16_chs(a); +} + +static inline float32 float32_maybe_ah_chs(float32 a, bool fpcr_ah) +{ + return fpcr_ah && float32_is_any_nan(a) ? a : float32_chs(a); +} + +static inline float64 float64_maybe_ah_chs(float64 a, bool fpcr_ah) +{ + return fpcr_ah && float64_is_any_nan(a) ? a : float64_chs(a); +} + #endif /* TARGET_ARM_VEC_INTERNAL_H */