From nobody Sun Nov 24 08:41:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1725902935; cv=none; d=zohomail.com; s=zohoarc; b=OxTl8H5fo/UXR6CBc3JoVXWvJLJtrQ/T3OXKyi90bMUg7G9/WHzYMrA29tjsoeuhYfF8nZJeSGus137c+j1Kj5qXcKffk0wr2pMyPHTNMccSM/5HuewYSiAY3UM0WsuBjiLGyp+rwpSRv1fF1mgkGO53i+ui/dbDQWC10eqe2Sw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725902935; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0PKG5YPQcXKyDHlspbxmEdeyLcXXv/kd5HUMAwRWwDA=; b=JrJYvhLHchsqjCjMse2Bg0EGd+CmlOZ8zAleHHN1II6CcZdaTGVZiu6rvjSqDLqCVpDqOqH3bZI6m4l9lK0fzERbJjzDsshC0UDE5vc0BB5jOtKpxvr+wNAmOSROtc6SIFxlXA4VrEy8F5qkA3d6LoQBnp3u5L9sQoU8nAz72nU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1725902935929103.14792052018879; Mon, 9 Sep 2024 10:28:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sniBs-0004U9-Pn; Mon, 09 Sep 2024 13:28:40 -0400 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 1sniBm-00044L-2f for qemu-devel@nongnu.org; Mon, 09 Sep 2024 13:28:34 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sniBk-00060p-6R for qemu-devel@nongnu.org; Mon, 09 Sep 2024 13:28:33 -0400 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-7179802b91fso2826246b3a.3 for ; Mon, 09 Sep 2024 10:28:31 -0700 (PDT) Received: from stoup.. (174-21-81-121.tukw.qwest.net. [174.21.81.121]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20710e11e02sm36539875ad.14.2024.09.09.10.28.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2024 10:28:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725902910; x=1726507710; 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=0PKG5YPQcXKyDHlspbxmEdeyLcXXv/kd5HUMAwRWwDA=; b=CyouL0zzfRpyKfcXmByisclRz+f10QcsTS9Oon1wE0OT9tZIQPKHMV7ddNHPmRRrKE RUF7CnX4ep2a9P0CzAU5gttE7Nu/mL74Uqsb4JncByo9ujo/AeT7d1g2iK++aayeMpM8 C6qUKFWIqlX68IQW0AMJn21wG2TOAOclU05BTxWxwvelBw9rmhMBpWI7L5xpTTWAaDY+ IlrtSJji8O3fnART0gpXEnA7Fo44IUluwjCmBNsBGG5UiYay8PaHSOB0paWn/6IKUpAQ Eur4Y7lIRXSz4DElGZcN0C2TtXeHuG8sKX0zqZnRGqRqM8ncuxWPQGsqE9vEe4vgd4ur bgow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725902910; x=1726507710; 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=0PKG5YPQcXKyDHlspbxmEdeyLcXXv/kd5HUMAwRWwDA=; b=D5tIsh4zGG1k43N3dsTOAXUw7YlEu/Jnl6p5nHVXbPHINzBZrHCfCQ9cZzWJ5UNp1W 15+UaYyN9YepGgtV/TvdAf6XNA3XUgBktEhulFE8eT43nlO+9mHX+5Iep/e63h7A0ZkU tDoaGjHIYlSpXSD2aCK2gxLW95mFavJJobbQ8bG/ceI+v94n0ONaMiK22AZVs/eyKr6S op5/pHe8QSqWRKHzvQRUJZnrJGLG53m6tiJ6vpQWA0iT2gXSt0y3wT/pLaQBMQNTB9Ex aryd5aJko6gzNJFPt09IlsepNNehBvojWR6afttYRy7qSo2gpdOJFdPW+37hw4Hi5TJM m1Gw== X-Gm-Message-State: AOJu0YwFRpzXBo71J/Izb/5R2J1tZwXjQwa/YvGyVBbCUWuD9D/eRIST uTKyDTqC9UI1T1rqdNVIlm1sf5saNb+iIh26n34AXikiwcE162iLaQBSEhje6RfV+wiN1PPcAhT E X-Google-Smtp-Source: AGHT+IHutecmoihmbB3z3oZNyJKzDaDs70cg1mG2IGG9igYMnbvsijZx6h/66RlU2p50THw+quhEbg== X-Received: by 2002:a05:6a21:39a:b0:1cf:3c60:b8dc with SMTP id adf61e73a8af0-1cf3c60ba63mr3525604637.34.1725902910095; Mon, 09 Sep 2024 10:28:30 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: laurent@vivier.eu, daniel@0x0f.com Subject: [PATCH v3 05/26] target/m68k: Update FPSR.EXC Date: Mon, 9 Sep 2024 10:28:02 -0700 Message-ID: <20240909172823.649837-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240909172823.649837-1-richard.henderson@linaro.org> References: <20240909172823.649837-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x433.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1725902937039116600 Content-Type: text/plain; charset="utf-8" So far we've only been updating the AEXC byte. Update the EXC byte as well. Signed-off-by: Richard Henderson --- target/m68k/fpu_helper.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/target/m68k/fpu_helper.c b/target/m68k/fpu_helper.c index 56694418f2..0c8c14966d 100644 --- a/target/m68k/fpu_helper.c +++ b/target/m68k/fpu_helper.c @@ -170,7 +170,7 @@ void HELPER(update_fpsr)(CPUM68KState *env, FPReg *pval) floatx80 val =3D pval->d; int soft; =20 - fpsr &=3D ~FPSR_CC_MASK; + fpsr &=3D ~(FPSR_CC_MASK | FPSR_EXC_MASK); =20 if (floatx80_is_neg(val)) { fpsr |=3D FPSR_CC_N; @@ -187,20 +187,22 @@ void HELPER(update_fpsr)(CPUM68KState *env, FPReg *pv= al) if (soft) { set_float_exception_flags(0, &env->fp_status); =20 - if (soft & float_flag_invalid) { - fpsr |=3D FPSR_AEXP_IOP; + if (soft & float_flag_invalid_snan) { + fpsr |=3D FPSR_EXC_SNAN | FPSR_AEXP_IOP; + } else if (soft & float_flag_invalid) { + fpsr |=3D FPSR_EXC_OPERR | FPSR_AEXP_IOP; } if (soft & float_flag_overflow) { - fpsr |=3D FPSR_AEXP_OVFL; + fpsr |=3D FPSR_EXC_OVFL | FPSR_AEXP_OVFL; } if (soft & (float_flag_underflow | float_flag_output_denormal)) { - fpsr |=3D FPSR_AEXP_UNFL; + fpsr |=3D FPSR_EXC_UNFL | FPSR_AEXP_UNFL; } if (soft & float_flag_divbyzero) { - fpsr |=3D FPSR_AEXP_DZ; + fpsr |=3D FPSR_EXC_DZ | FPSR_AEXP_DZ; } if (soft & float_flag_inexact) { - fpsr |=3D FPSR_AEXC_INEX; + fpsr |=3D FPSR_EXC_INEX2 | FPSR_AEXC_INEX; } } =20 --=20 2.43.0