From patchwork Fri May 3 03:02:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 13652288 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2089.outbound.protection.outlook.com [40.107.236.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0DF141C6BE; Fri, 3 May 2024 03:02:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.89 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714705351; cv=fail; b=gKqbpnbtf1Ztig4CAmFFyQ+6PG6JgJChuT+XQI0RxXd5W7hCtSF+2mJY4L5n+0/jx1pFWdzeD1CgJMcWyWWPonSeHixcR3k50AyeR+L36P6H7AXYwfzHI7D5uazSKSl1BhLaIf9gt3VnD3BmUMtxf40bwG8R7phrWI1GVErZQ/4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714705351; c=relaxed/simple; bh=cwA0gFYXz3BUdHrQnZZ9wj7J9+njZ+oBhrdJxstY7IQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=uV1IZsMmAohrVyOw1r8F+VLBhLJxZiPn3lo0DL/kwO9PaM8c/irOCgEdhMYvauxqnBtjjN+jm5Sxs4y5yDQ9dD7g8H66p4FI9Ysd0GHiVycOcidCZH7FEDji9pCITochKQGH98uc3ZdL9bd+ZpHsXgwDvj5eGqYm04FtY9P8g/8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=mGlSPAfl; arc=fail smtp.client-ip=40.107.236.89 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="mGlSPAfl" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UztQze5idXQZNwKN0rDOCO4oQu54uAbNbvfl/mxD3HCWQu0BH0rixsOuxcm8HNMV2U9TCSwfMFVhEEzDnojzJzxXyL9OOQGTXOXIcNQfhPIbACH0Oh3HWRD+gA6egtcnCDUA/hz90NKQvjEiSsEwV8B+3Z+mmAV2Zq42BTi9kqwK4gi3wX/oi3W00zkKoavg4xbqmkA7EQwf2bybquoaebtqOP/3VaXXr5SEyxRdvKOCKcBdxvxnsw4jIH83aUSWC2Y7inhHPZpBSrXSVdqiedyjMyzFYXDyeGvDOUU4OwmOSA+6y1wJowjkuaJVOJho1SGqcQ5MKPFRj7IgEQOowg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=dnmBrYk3OK4mw6MTPykzlq8+LK/K2jDYYaxhtdmsk5Y=; b=imCWiRlprgkrKQUCHm+Q6qrnJ+26Io5n4bpuACFPdrpVsNQ41ummOuoZ4P1htgBuU0ITXDvDnee2dUcLwdTnUzLwEsTXq15jHr7zLLdZCnb1aheaM+BJL8Ey9oG/92eisDFCPOeL9EZV2OsEJ8TMzLTfKMYckA+ecKtLEv+DpceWPGzXs/8t/wn+AEjaDyHaSkj4UDCqniGijEV4UaoTpC2rUZudWkdFCMRSTbbWP0xwSCjXfqJCkITj0CYoGBUT9bkNtsDOJOKRknGWK7PW4t9Tidd7g7NyeUJPyrfxIvYV/SGZ2xc/Xyy+041rRzFnYbDzssI34ACIXsSaqxmffw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dnmBrYk3OK4mw6MTPykzlq8+LK/K2jDYYaxhtdmsk5Y=; b=mGlSPAflDGZZogMp2To1RLYTULpJn0LlIKz4zRgbbZtzJSncXbSon+cKRcAuZJzOnnWtT4AbOxSubzDgDySAd9k+kcRmqb5sie/hDwurU1aqx4i4Vcn326AaCip/IV9uZUGOzbxwrifWVgEGTctTHfFOMBMb+xltP00vkacRLUDUTM2ygp2Zfkdaq7RsIjXS0RgZCFIBfgt0JmXkzSJ8e6lsKxKONkqUu0IUp1zsvrS0aAWik8fnLDRRqvhoNqbll/C54sK1ocZollqvOkpyYQLC7XyQ3cOOy9aodTYV9+nRceXU1IbhuMpC8dxXCMZo07IsyN1eGrV8z5x4+uL4vQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) by LV8PR12MB9109.namprd12.prod.outlook.com (2603:10b6:408:18a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.28; Fri, 3 May 2024 03:02:18 +0000 Received: from BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07]) by BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07%4]) with mapi id 15.20.7519.035; Fri, 3 May 2024 03:02:18 +0000 From: John Hubbard To: Shuah Khan Cc: angquan yu , "Kirill A . Shutemov" , Ingo Molnar , Binbin Wu , Alexey Dobriyan , Rick Edgecombe , Sohil Mehta , Yu-cheng Yu , Dave Hansen , Valentin Obst , linux-kselftest@vger.kernel.org, LKML , llvm@lists.linux.dev, x86@kernel.org, John Hubbard Subject: [PATCH 2/7] selftests/x86: build test_FISTTP.c with clang Date: Thu, 2 May 2024 20:02:09 -0700 Message-ID: <20240503030214.86681-3-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240503030214.86681-1-jhubbard@nvidia.com> References: <20240503030214.86681-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: BYAPR02CA0055.namprd02.prod.outlook.com (2603:10b6:a03:54::32) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|LV8PR12MB9109:EE_ X-MS-Office365-Filtering-Correlation-Id: 8ffb178f-dc8c-4d00-6581-08dc6b1d7135 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|7416005|376005|366007|1800799015; X-Microsoft-Antispam-Message-Info: QXHJpi+zqT0wjPI4K9x9DiRVakUE2osFjlTHQVY4cLA6Q5rVuDWsPekwL5MmGF2BqcoDdxt4CtaVmPjwxkymJNLCQSnUfVQTLEu19tQ2MRbSUS2QnJ8RGmAReEgGm74ql8nLKSX01WyTccc2aLwS0IP5UTHjdsHf+XW7H/3MdWCCp0uuo9y+QobDMdHo9xneAwTQT8gNL6rCH+NLPspa5kaw+fn6JOZu2QNbBGExhhYqK/4YUvCay69C4THczMSwvRJhz9GXuPbiGA6dhX6QhedncUTUnTz3xL29k7VrdRBxzg4s4Ah/DNDCHwpWLBjZrm9RM7T8rduHAc6G2nT9vQktbg3+XotfqX7dFkjG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005)(376005)(366007)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nbRUHUyr6wp3CaHySv6LE/vVAvfRnbNE58cHHyrC0VGdemCI+hHlaBRY+3KCZB2PRXtrTkbGR4rNr+6arPYvksovWxpwU6fWR18qA7qPXUSQlZ89IQk8OK3dw8Y/v27Fu/BfUUpNZ1g/BTJgRzELAdQp7hmDM3Y/BG7NVpA0RbiuAKyqFi96444k7u4tlmonzlni+sR9lYuvS51bpyIb5+dKbeYrDzzN06jk6crhSJTTlmAbG9FegmbUs2kNzjayAPwSOuTW+gixUZxBwMm5AXBMUJw9CMKFC5JSIKd6KXW7xHFfUBRvfuyzzxt8Bf+ljJHdhUq9carvMWVYNEl5aWwMQaSENpdLuNZCP3Q3Hk8NG+v5C86TXuIUXhYf0btMJZHdIo+mwaOYJBSlNIFW+tPrwCsTyxtQMM0xTKfYI90gr842y0gNLvvkU02JADMRntIj8oeKN1DpDVF0vj5MrU+3q6YzILkDHMUdOa8ZmnNSSGTglugL2EzrY+WfZie6oAUM7Gx6BIf1TFB4GP74geY1hUnqflyvGjFL5jvvwMmzD+5u06uiehjApph1woTBwZWQP5h5ODFsb4dZF1JiI2mWebANvi4MLUN3qDhnyZVFCPZVvHucuCtaJnGhl7qWmJNfUGKIW9caAEEA6zey9QjNBRCiSFPkdCJNHilWcdL7PHKffccv8heQY2S9PTpFrRJxD+VHqkL5XoRv1nvQnRhznv78j4oH3Uoh5pIRmGuVne7wlloofNe8Zx3VpIOearUolW5yCliwLVUq51BVo+msjgS5XVwbO8UBIbdl9RdHzzBYyKSIRoc+jiTewaAjV8tTTUTL7yQZLkUVH2h8ww931TANcBmwQi1bpQhuUuSsP87g5XZvIQywpkv7VsVM+pVPwzUSZkH6xsrvZzVl79bFa3imVyBPT2sxyYpchBH0tYoVByeNEPjpUcKEhUa7Kt/931hc9E7D6Kd3IPzKOodNVI14r6b/8rfKOueMdqWu99//hb9e8nKyAILn9O+zk7ex7lo3Kt6k6x8nI1LYItXPXOyi/OU071e64HSCOqrlIe3F76K+iOYVHQqY+RJRPX1jC++yCPMBkhEX/UanLqiXJeINmw4m2/tOUPsGQXexrc5qnrwww+Y1QAyJ5u3oOUnGh7GXb9n4GYzz3nV+Ttqkwx16mFqX3nc3p+6JGRVtgeXFT1XuckRFvqHtooCSxJ67dzlt4A7MtC4guCY6LQU9fcnADon1b8SzPLSiHE2q1ueb5Z8ZuUjqQUFqQgmHnVlEw6IBD98WVpegJKtUe0upTezuaf55HlcA+UnmmluK7duU5kY7W/I6hsg4qQf8lAsKv/2lvz5hxukDkBbM3nSuAD6xmO4VUzziDCZjFSOodq8rtvxw3zg7e9nAWExLXOIFppEx+D7LoN5Wo9ufnMbTsznz90ufm4Vw1VtoCnWqf/v+xnnXeghgyAzxbcKRSlcAAIGJW4ZM3f9pCQJnYPlZVcU0c+twgu7N6snjrm72LaDaozn6a8MUao4QGEx6Tyx0zE108ouKzww8itAW8IGGPJRUnuY6pos2xGie4g3iWO5Oc6ih/qI1xLIIe9RL X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8ffb178f-dc8c-4d00-6581-08dc6b1d7135 X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2024 03:02:17.8201 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ceBZyHNiQpsaQP7HKypQtrSxBWXbd6YjukOewGvX8UbxO5mc7MXIndsk9QbTq8T2e/bn3Z49NjxglPvIFmhdcw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR12MB9109 First of all, in order to build with clang at all, one must first apply Valentin Obst's build fix for LLVM [1]. Once that is done, then when building with clang, via: make LLVM=1 -C tools/testing/selftests ...the build fails because clang inline asm requires size suffixes for instructions, including the fisttp instruction. In this case, the 16-bit suffix 's' is missing. Fix by adding an 's' (short) suffix in each place that it is missing. [1] https://lore.kernel.org/all/20240329-selftests-libmk-llvm-rfc-v1-1-2f9ed7d1c49f@valentinobst.de/ Signed-off-by: John Hubbard --- tools/testing/selftests/x86/test_FISTTP.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/x86/test_FISTTP.c b/tools/testing/selftests/x86/test_FISTTP.c index 09789c0ce3e9..b9ae9d8cebcb 100644 --- a/tools/testing/selftests/x86/test_FISTTP.c +++ b/tools/testing/selftests/x86/test_FISTTP.c @@ -25,7 +25,7 @@ int test(void) feclearexcept(FE_DIVBYZERO|FE_INEXACT|FE_INVALID|FE_OVERFLOW|FE_UNDERFLOW); asm volatile ("\n" " fld1""\n" - " fisttp res16""\n" + " fisttps res16""\n" " fld1""\n" " fisttpl res32""\n" " fld1""\n" @@ -45,7 +45,7 @@ int test(void) feclearexcept(FE_DIVBYZERO|FE_INEXACT|FE_INVALID|FE_OVERFLOW|FE_UNDERFLOW); asm volatile ("\n" " fldpi""\n" - " fisttp res16""\n" + " fisttps res16""\n" " fldpi""\n" " fisttpl res32""\n" " fldpi""\n" @@ -66,7 +66,7 @@ int test(void) asm volatile ("\n" " fldpi""\n" " fchs""\n" - " fisttp res16""\n" + " fisttps res16""\n" " fldpi""\n" " fchs""\n" " fisttpl res32""\n" @@ -88,7 +88,7 @@ int test(void) feclearexcept(FE_DIVBYZERO|FE_INEXACT|FE_INVALID|FE_OVERFLOW|FE_UNDERFLOW); asm volatile ("\n" " fldln2""\n" - " fisttp res16""\n" + " fisttps res16""\n" " fldln2""\n" " fisttpl res32""\n" " fldln2""\n"