From nobody Fri Apr 4 06:19:13 2025 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; arc=pass (i=1 dmarc=pass fromdomain=htecgroup.com); dmarc=pass(p=reject dis=none) header.from=htecgroup.com ARC-Seal: i=2; a=rsa-sha256; t=1740589485; cv=pass; d=zohomail.com; s=zohoarc; b=bOFTmh9QH/IduNpze3LGj+1AqGjtYLfUT6M+5vBEB5iyz98/jK2ToAPyZE5mAdCvjhRHz7zKKc57dVhcYbP80AvW1ztVYGEZH/GymjGoAlZVhFYdzBy5/z+68aZUfM/pAF4X4KyPmufoFtrW7V1WeoSW1EOroOPaXJRAYFpgytU= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1740589485; h=Content-Type: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=OmvkKjNzWmlYL9hmD7xXtPKG9RBEhuwvo/Rh5fmAdAk=; b=hGicTRjWYR4YgMIVPpcaXacBASwuhb6cjLOshqJ7QbzvZrkIVyLtT/HGTP4911P1c4A7SITdVkmAd2g0YtAajcMZJvOl0DmbQK3cfkCWbS0KVYao+m1BozLbwSBLa4d9KePbJeSHnf+vWlbIMMqj6q7h9th/+zrJP/eb68qRahI= ARC-Authentication-Results: i=2; 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; arc=pass (i=1 dmarc=pass fromdomain=htecgroup.com); dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1740589485306209.40530588841182; Wed, 26 Feb 2025 09:04:45 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tnKp6-00018Z-4b; Wed, 26 Feb 2025 12:03: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 1tnKp5-00018Q-CD for qemu-devel@nongnu.org; Wed, 26 Feb 2025 12:03:51 -0500 Received: from mail-vi1eur05on2071e.outbound.protection.outlook.com ([2a01:111:f403:2613::71e] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tnKp3-0005r6-4D for qemu-devel@nongnu.org; Wed, 26 Feb 2025 12:03:50 -0500 Received: from PA4PR09MB4864.eurprd09.prod.outlook.com (2603:10a6:102:ed::17) by VI0PR09MB7419.eurprd09.prod.outlook.com (2603:10a6:800:24b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8466.16; Wed, 26 Feb 2025 17:03:05 +0000 Received: from PA4PR09MB4864.eurprd09.prod.outlook.com ([fe80::a02b:9d5c:eca5:e024]) by PA4PR09MB4864.eurprd09.prod.outlook.com ([fe80::a02b:9d5c:eca5:e024%6]) with mapi id 15.20.8489.018; Wed, 26 Feb 2025 17:03:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=v2gdhwgJEnsckYIKGMUcsKBFb3qGqAOgcqtB2TmDxIW/iIewdHzVKfQJ66PWc+qdf1wvyACVaFSwS+lIDd6sUYEn6nSx/rgXgGuFIy/o8iSOH4MFja5GUrPz6WlIXo5KXRy1p/KQe6VW9MpgOjxFbLrhsvWKUMhBxoP906/Bs7rw0iq/HD+6h+wBQR/2pctuEQV2yrFEzUK+jfqqcNrtUyTsACwrt4nDnZxmUlLSQlKmEfxQFgKStDCpqx4HMyjEyc/H3qGLke8K9+IwcyiROYaUt6WtYRPSj8S/W4VjmB4ZaQRIDc5JhcC7aY3TnwOZ1u6LMoVm629JG+JPYNGr9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OmvkKjNzWmlYL9hmD7xXtPKG9RBEhuwvo/Rh5fmAdAk=; b=w+X4lQ7BorBuo/O742W3DqVhNbOnTDM/bsQdo0VKeNe6FUbAWUoIJaGZNPSRiEUsJ1sQzdpK+ulR5gheHQ8bCGra/MQM+glMnoQHhBYrQEd2a3yVWQw9A9y/3HvZs2L3h5vP6U+kkD8Oo8Vx5InAhm6IvkKdf0/ndQma+LJlTzX9iuPKLFxeGVI1A+hbyliQZWIxnpHvKFsXjm0VZ9bBGkAgCqm9RG5M8ne3lx2AVX+VL4rirm2LuSWx3giGEPBoofmA4GgOcgnzJof7wUspB14nFKv+UZxFUu8g5Us8a23CcY9c59JpkeQ1FPeD7jmj9Sk63LrU4lcxqFTmSW0Zcg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=htecgroup.com; dmarc=pass action=none header.from=htecgroup.com; dkim=pass header.d=htecgroup.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=htecgroup.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OmvkKjNzWmlYL9hmD7xXtPKG9RBEhuwvo/Rh5fmAdAk=; b=TYaVO8hidPIQljD1XDM6yhYR9xJz9E0YztqnVOrmRzlVbWLANy/qQ5bPEJQGbmlBZJ2U1snk80atAp0jOfAUUkAvhLZ+k8hglVHvbsUJkXpiGKCseWrxBnRDSV0cMwspTXWm7viFduE4NunMtANL/jmIHWixTbfgxyK8qGHMGMfdlxfLpIgJGIuNbxkZ9g3CDI4f0aCf/lsCoSPbxNk7Rc4WD1a9YNj+YDdTkSHxv1BmBnqwI3hLFPRPp7vHEW/ss8Qx1eOPBglpHhyMeQOqCBI9SG4k3ReXcb2ywOEJuqGlk55QyYl0oJsgk8GiBguI6aKubf0k3k2sN36HJdDnHg== From: Aleksandar Rakic To: "qemu-devel@nongnu.org" CC: "cfu@mips.com" , Djordje Todorovic , "arikalo@gmail.com" , "philmd@linaro.org" , "peter.maydell@linaro.org" , Aleksandar Rakic , Faraz Shahbazker Subject: [PATCH v5 2/3] Skip NaN mode check for soft-float Thread-Topic: [PATCH v5 2/3] Skip NaN mode check for soft-float Thread-Index: AQHbiHBN9WWu61L0jUe8EWyWqAJpAg== Date: Wed, 26 Feb 2025 17:03:04 +0000 Message-ID: <20250226170246.1971355-4-aleksandar.rakic@htecgroup.com> References: <20250226170246.1971355-1-aleksandar.rakic@htecgroup.com> In-Reply-To: <20250226170246.1971355-1-aleksandar.rakic@htecgroup.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=htecgroup.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PA4PR09MB4864:EE_|VI0PR09MB7419:EE_ x-ms-office365-filtering-correlation-id: 564d127a-d0c4-4772-b329-08dd56876fa0 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|1800799024|376014|38070700018; x-microsoft-antispam-message-info: =?iso-8859-1?Q?W0kfI94CDFHl0IFZdb6bAi4P5JgD6QdMFUMN+BW+KoSeDZCSw9goMvNeQf?= =?iso-8859-1?Q?H6UWCRfoz4PosNldDJO/yUDf1ZZx3bFh6XscE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RStImsmrAB2c2QxQPJF4CRegglSNU6QHApmWy30r424Yg4e949?= =?iso-8859-1?Q?ymm8r1dSvgQxefvR0HEYce2wJ7L24XA9XU1alMfBJsu9Q0HasDSnN6THPb?= =?iso-8859-1?Q?Hicj6XAjuhDFv5D87E1Bbu+uBf1a+2wHctRjvQkk4BkOJqvI9N7Ll5le9n?= =?iso-8859-1?Q?Ukc8KTEQfaK0R+eCD5MefYGE9rgugHiF7XYnkvYNJzu565IjR584VeKvco?= =?iso-8859-1?Q?xNlRx2wa4+uo6/FQxwTPs2kp0s+PE102n+cjPLtXz9sRn5Bm9Bj3Pu/Q/W?= =?iso-8859-1?Q?uDKns+shnQz9y2rUFANEeM39OyLFmPUfpO/TrtTcftRAs0DlbcHxcCXJMr?= =?iso-8859-1?Q?GHVQMaickZJXmPiTDFnSj8Gjrq/YOm/WfRVSHIcmJDzq0q9EyIm7fDx3Qe?= =?iso-8859-1?Q?yh1BXsXfZcSt6K+oChDAYbACGvP6n/qrr6qq2JXysj2ztHfxM4F1rHKRRs?= =?iso-8859-1?Q?fqElmgO6Dunrp3scECyfNtmL6jISccRnOChgJEofcwRxv5em072S1Oaeps?= =?iso-8859-1?Q?XZRBmt9d2fPNmm9ROyxfaG?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PA4PR09MB4864.eurprd09.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(38070700018); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?wGc3Ie/s7lQpBgMRDud8B2tLphWYkRCbR3MwTgHmAltPBieDPlvGJxsapk?= =?iso-8859-1?Q?pxMqdDDJjVc7/mYtqrcUWCgRuljdBrRXxiPekTArc5MTxWrDpl58/IcEoQ?= =?iso-8859-1?Q?HFTlGp441Uh5Md6nS/1n3sBDswNkwIIBP0jLuOd7L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bNKyHQDJ7YXH5JGhB9mz+fJQJn0swVtGY9zTeTBPkD8qHUj2DwMFO?= =?iso-8859-1?Q?U9tjuuxJf1ga4LsWnRKcge4beVAjbAJg+WoXC/hUvqh4nRDuh+avG2+FM8?= =?iso-8859-1?Q?xBvh/ORi3TIkn8Z12a39s5AL0FrNg3tHYLR3hUONoCBLL0mt/S6btB3Ruv?= =?iso-8859-1?Q?G3ikli9LuAiRqIw5s6Nm2LcjnY9qGQrfUBWt1iYwJbK0zXJKCBp/eD6lPI?= =?iso-8859-1?Q?yl/0RuvwnY5vArSOL1vLi0OR5FRqoo3NmkQ51YwPJX1LJhTIqhWZgVhBO+?= =?iso-8859-1?Q?rSUiOelUxuFP+2RwFGpTinHDjGxXCbO5+vEyDiKsalw3WhxaU1s7D1lqkG?= =?iso-8859-1?Q?iIA+IfasWYwjOyJsn77YOAZahBEzul8L9MlTA8QXloZyEOzNn40YExFlVt?= =?iso-8859-1?Q?dGMoliwrGWmAHLO7W+tNJfHiyrrn/wUbjUJyUvH0Y6NvkwHohg+nPuHqCm?= =?iso-8859-1?Q?TaB3IpZT1iOJ7eQcPUWgUx8/UVG/vfrWAHNlsu5IWAx7ZvnnmV1ySa//I/?= =?iso-8859-1?Q?m7M7G6VxnmCUfPU/uNs3Y+Fv8B2H8W0KL92CmcBJg2txHqB9GJ04MoIa/1?= =?iso-8859-1?Q?kAp8ykMz1fMMTdbTgfNiKcufJtMQBFF9YgENvSdDdzNveF8cK2Ey+qVzDB?= =?iso-8859-1?Q?NO3GbXcFdNVWwhNlHyM=3D?= Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: htecgroup.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PA4PR09MB4864.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 564d127a-d0c4-4772-b329-08dd56876fa0 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Feb 2025 17:03:04.9436 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 9f85665b-7efd-4776-9dfe-b6bfda2565ee X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: G9Px+ge8EqoA9ncUjvWv9Tpn7BEqgFyFhXPycPkByLBT6Bs0+kyQt1YXfHN3goy94RK5HWST6GWWWpHNBcBY+0HIHSB+UsNgIMRoUtpJWGA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR09MB7419 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=2a01:111:f403:2613::71e; envelope-from=aleksandar.rakic@htecgroup.com; helo=EUR05-VI1-obe.outbound.protection.outlook.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_PASS=-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 @htecgroup.com) X-ZM-MESSAGEID: 1740589488462019100 Content-Type: text/plain; charset="utf-8" From: Aleksandar Rakic Skip NaN mode check for soft-float since NaN mode is irrelevant if an ELF binary's FPU mode is soft-float, i.e. it doesn't utilize a FPU. Cherry-picked 63492a56485f6b755fccf7ad623f7a189bfc79b6 from https://github.com/MIPS/gnutools-qemu Signed-off-by: Faraz Shahbazker Signed-off-by: Aleksandar Rakic --- linux-user/mips/cpu_loop.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/linux-user/mips/cpu_loop.c b/linux-user/mips/cpu_loop.c index 462387a073..07c1ebe287 100644 --- a/linux-user/mips/cpu_loop.c +++ b/linux-user/mips/cpu_loop.c @@ -304,8 +304,10 @@ void target_cpu_copy_regs(CPUArchState *env, struct ta= rget_pt_regs *regs) if (env->insn_flags & ISA_NANOMIPS32) { return; } - if (((info->elf_flags & EF_MIPS_NAN2008) !=3D 0) !=3D - ((env->active_fpu.fcr31 & (1 << FCR31_NAN2008)) !=3D 0)) { + if (info->fp_abi !=3D MIPS_ABI_FP_SOFT + && ((info->elf_flags & EF_MIPS_NAN2008) !=3D 0) !=3D + ((env->active_fpu.fcr31 & (1 << FCR31_NAN2008)) !=3D 0)) + { if ((env->active_fpu.fcr31_rw_bitmask & (1 << FCR31_NAN2008)) =3D=3D 0) { fprintf(stderr, "ELF binary's NaN mode not supported by CPU\n"= ); --=20 2.34.1