Message ID | 20250201164012.1660228-10-peter.maydell@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:fb05:0:b0:385:e875:8a9e with SMTP id c5csp1262596wrr; Sat, 1 Feb 2025 08:42:12 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWcdGF5TAJg7GbNOixJ+fk3gsTX9sEKXP30ZMEcRM+Oh56NMN3f39m0zjXdzQBFbOXZ00qoYg==@linaro.org X-Google-Smtp-Source: AGHT+IG2hc4quejyBQO5U+V6HCdAx8xxc7opvrPssTMz/qVkEaDmtX2V7xC5sX/OXEj520Ynmbn4 X-Received: by 2002:a05:620a:2807:b0:7b1:7508:9f38 with SMTP id af79cd13be357-7c011db0bc8mr976723985a.16.1738428132428; Sat, 01 Feb 2025 08:42:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1738428132; cv=none; d=google.com; s=arc-20240605; b=iK3hWmQutl70n7wjRxMottwDmErvCE0Sf69RM+Yb2TlQq8KJ/ACoa5j2C9c4lQzr8r FFCHFzoYqq4rHiseHJAwm38TpAZQMFcUba/BNAt2v9AdRIapjjdfVJnXOU6xWbdDVGUs fEC1XgH1GFj7osrREM/bL+8fQv4FC1PZNs77QedPUVxh7pVS6Aut1ORoMZloUgWceEZx 1GWpfr1ui+abNV+TzZ1SM3QE95edTwPc0k2YXiiI0Z3WLJhcKxIsI3CYhqKtTKx4pnyX 43ny1qmUPu0SHPKwfpFsuDdubrL435KdfigRhyiOfV4wYIX4Qmn+EmFfNE8s52iLeCqO cE1A== 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:to:from :dkim-signature; bh=4NQtpB/FauH0rtbCX6r0pw974wudG+5NfUJow/nkqw0=; fh=25iMDqAcmfpU9laEfFNBOfWwUe+CnBDFGpM9DzQ7ytA=; b=iFXtWCYWRAfeYYncII8rNS1pRPBhHPO+z+8sVzY4xK80Z2l+6q/JE+OFcTUDG345lT OG8co1ImSnGVaVzFsxnNwVPJuE7168ExSpnTaXEU1YwDYX+gKS4PICGdqXbxSd45J9mh U0iEg2wu1p1Nvq3Xn6Y60Eb4xdeLcjy5fedX4HEHGGepfXXBS8usSL64je0QxLBXI5WV YvA83GeNATV1XiUQUlg9Ak01wsOlkbHqFA6gSmGKxL6AEDtZhHN/FnvgtLJQ+nAvBhHu uL/NUa6C06h1NZqp/8cjcXJQbWd4kaLMZGV2fog6r/jcoLvd9c5A3Mi5BlELJqLvZ8RR BGxQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p7EAfEVy; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c00a90ba99si628071785a.335.2025.02.01.08.42.12 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 01 Feb 2025 08:42:12 -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=p7EAfEVy; 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 <qemu-devel-bounces@nongnu.org>) id 1teGXz-000666-C0; Sat, 01 Feb 2025 11:40:43 -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 <peter.maydell@linaro.org>) id 1teGXn-00061W-TN for qemu-devel@nongnu.org; Sat, 01 Feb 2025 11:40:32 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <peter.maydell@linaro.org>) id 1teGXl-00014h-Fn for qemu-devel@nongnu.org; Sat, 01 Feb 2025 11:40:31 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4361b6f9faeso18601585e9.1 for <qemu-devel@nongnu.org>; Sat, 01 Feb 2025 08:40:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1738428028; x=1739032828; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=4NQtpB/FauH0rtbCX6r0pw974wudG+5NfUJow/nkqw0=; b=p7EAfEVyymPhv9f5gIsSuL/c3uJ2d0jO4h/CRlrV9tG1dG2/UgREw7SDuQnRIMX1hv L+xXq7ebcMN4nzxUxSrvD6Az+T9RSlEpNFv1BayrdI6IzvfCEE029W6iu8C6PEL7VGAL 7QcJLD229gl5rNx3BfkufMGQTsQBSPfUbqOg8LgMain4qEJaYOaiXP3Cauxdu+An1fxn MBZUhhm9Cw3c+oPGER+k4cNcdpHHv1a2B1YB9tDmMQW3MKO80Y0Ovzm4WkShyHW0TYbG K6tUXaBWyqa1TYnlEFY01aGtMyoCsyoTMzh5SXtmZUV4oNMN1TJ0heY7+vLCWVoCJxe6 /q3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738428028; x=1739032828; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4NQtpB/FauH0rtbCX6r0pw974wudG+5NfUJow/nkqw0=; b=YDb2XgGa55rTRxd9TzuXTrSz4h5IF4rYEI8uV1M8/ZU44FcLx3XlDz1ZpsFI94Ya4D qFJAr8x4xnRHuvsUgCMHk/Lp2+bs2wH5+JbS43pb+amzU6bkWsYjm1tIwptPuCYS1OdS 8wLvz7njJcQ0p5dDScdicIXV1KxrZKZPkA/MJfxEbaDSeOTeeT0Bldte0bl/mR7iZOkk W7Ifqd4/qLRAo6nwvKzlWc6UuoBKWwrv/72Wt0kszUpgO/ebnwvuJfKYC8+Km63ylY41 OX4RCXBr+u5T+c4r6lap7DPGfi9ir1KorfMyoyp5NN68Di13tPV4sK0tGuI9hdqUWw+l QJDQ== X-Forwarded-Encrypted: i=1; AJvYcCUEIX1GUK1LvCG5YE7z8zu79jYhVfy5ZBboVaISiUJMYYikQKhwZRrnXOHDZd2z6rWDPZ5S3EAkmg8T@nongnu.org X-Gm-Message-State: AOJu0YzSWsJW/fvmQN86MxNatHldeRb5H1t4zZ1OnE/LfwfiwrJ1Vm1y 6rK5HSZgd7h8QAgqdIrUbsf/YcEeLmM4YwrEF7BfLrsnUwNMJ4QBMBHzqwTofvw= X-Gm-Gg: ASbGncvz+DDKcDvEeK4q858pDI9y0KuZQDMJLDIXG0symtUkmtk0HTLB9z8JyCUA4Pn WPnr2lVbSvdodgx5OEl7tIedj6FY21lPecATTqbbfAYriSw6tF2s1Lk7jgJjLNNTtxeOoksPlin +dpoodXZ+qmwdN5JUEGxHDhBfnSnaxgyGkN3ExHGc5/Wo9np2VFL6GQJ9Ac3X7JxiuUHEBWBcar Of2uVvxnaBnZ+TFUgKZSZXWv1xUfUSndZS/5nHYGULct11caFTDlBGBGBCumlCtlDf/F65zgrwf rLUY5RpyW3h2VJKliDDX X-Received: by 2002:a05:600c:91c:b0:434:9e17:190c with SMTP id 5b1f17b1804b1-438e15522bfmr91679435e9.0.1738428028045; Sat, 01 Feb 2025 08:40:28 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438dcc81d74sm127401525e9.37.2025.02.01.08.40.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Feb 2025 08:40:27 -0800 (PST) From: Peter Maydell <peter.maydell@linaro.org> To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH v2 09/69] target/arm: Adjust exception flag handling for AH = 1 Date: Sat, 1 Feb 2025 16:39:12 +0000 Message-Id: <20250201164012.1660228-10-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250201164012.1660228-1-peter.maydell@linaro.org> References: <20250201164012.1660228-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32b.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
target/arm: FEAT_AFP and FEAT_RPRES
|
expand
|
diff --git a/target/arm/vfp_helper.c b/target/arm/vfp_helper.c index 62005e19524..57100e95378 100644 --- a/target/arm/vfp_helper.c +++ b/target/arm/vfp_helper.c @@ -78,7 +78,7 @@ static void arm_set_ah_fp_behaviours(float_status *s) #ifdef CONFIG_TCG /* Convert host exception flags to vfp form. */ -static inline uint32_t vfp_exceptbits_from_host(int host_bits) +static inline uint32_t vfp_exceptbits_from_host(int host_bits, bool ah) { uint32_t target_bits = 0; @@ -100,6 +100,16 @@ static inline uint32_t vfp_exceptbits_from_host(int host_bits) if (host_bits & float_flag_input_denormal_flushed) { target_bits |= FPSR_IDC; } + /* + * With FPCR.AH, IDC is set when an input denormal is used, + * and flushing an output denormal to zero sets both IXC and UFC. + */ + if (ah && (host_bits & float_flag_input_denormal_used)) { + target_bits |= FPSR_IDC; + } + if (ah && (host_bits & float_flag_output_denormal_flushed)) { + target_bits |= FPSR_IXC; + } return target_bits; } @@ -117,7 +127,7 @@ static uint32_t vfp_get_fpsr_from_host(CPUARMState *env) a64_flags |= get_float_exception_flags(&env->vfp.fp_status_a64); a64_flags |= (get_float_exception_flags(&env->vfp.fp_status_f16_a64) - & ~float_flag_input_denormal_flushed); + & ~(float_flag_input_denormal_flushed | float_flag_input_denormal_used)); /* * Flushing an input denormal *only* because FPCR.FIZ == 1 does * not set FPSR.IDC; if FPCR.FZ is also set then this takes @@ -129,7 +139,8 @@ static uint32_t vfp_get_fpsr_from_host(CPUARMState *env) if ((env->vfp.fpcr & (FPCR_FZ | FPCR_AH)) != FPCR_FZ) { a64_flags &= ~float_flag_input_denormal_flushed; } - return vfp_exceptbits_from_host(a32_flags | a64_flags); + return vfp_exceptbits_from_host(a64_flags, env->vfp.fpcr & FPCR_AH) | + vfp_exceptbits_from_host(a32_flags, false); } static void vfp_clear_float_status_exc_flags(CPUARMState *env)