From nobody Mon Feb 9 08:10:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+40764+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+40764+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1557993383; cv=none; d=zoho.com; s=zohoarc; b=P0fEY939qLGSjT0V0cHDT5bV695n0crDv7/Qg8/s74FECLvO0Z8UVO1aev76GoUEfg0CgZpJd94TkcikQHX09OgB2vvE5PV1J8t2dCpAL0mWnsIP8N2My/xTYZeeoMBuR9wqbSvhl1SeVTTFutSEFrWEF/oszw/QSVcFTvDKKRM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557993383; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=ARj5A9aZ9Dh4VK2KCoykbxxDXn3BVtsPlY0b3pY4tmU=; b=SE9uLi/2gl1r49k3ipcfUNjsqgB70TRO8ovgX53k+G+sMUex7tXXY0czBv54dBTEsJANsMTsoNKAZbIHeDj8QMXD6Cic8Rerf2k5MJSjCIsmoIlo0VJaecXrxFuWhFSyNHX91N5hjw7NNHRvR+40Y+YWzq+EadFXeEZcHBGzvac= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+40764+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1557993383540715.6972136459607; Thu, 16 May 2019 00:56:23 -0700 (PDT) Return-Path: X-Received: from mga09.intel.com (mga09.intel.com []) by groups.io with SMTP; Thu, 16 May 2019 00:56:21 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 May 2019 00:56:21 -0700 X-ExtLoop1: 1 X-Received: from xiaoyu-dev.sh.intel.com ([10.239.47.11]) by orsmga001.jf.intel.com with ESMTP; 16 May 2019 00:56:20 -0700 From: "Xiaoyu lu" To: devel@edk2.groups.io Cc: Laszlo Ersek , Jian J Wang , Ting Ye Subject: [edk2-devel] [PATCH v4 3/7] CryptoPkg/IntrinsicLib: Fix possible unresolved external symbol issue Date: Thu, 16 May 2019 03:54:54 -0400 Message-Id: <1557993298-22205-4-git-send-email-xiaoyux.lu@intel.com> In-Reply-To: <1557993298-22205-1-git-send-email-xiaoyux.lu@intel.com> References: <1557993298-22205-1-git-send-email-xiaoyux.lu@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,xiaoyux.lu@intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1557993382; bh=3H+zLY3pMwSGF+0c8ah0R5dDjuP8fN20ARa5sRU6N2E=; h=Cc:Date:From:Reply-To:Subject:To; b=NJjMP4CoQFaDZL1wYztx/OSurXHE6jKysq5bqI0IfozYiwAI9fxkt05CxVbYGn0C7+2 m7NMsCAdDYXkc9F5xjF5CpyMm1w6IE8C4oRkKEP+8bT/DD142tIsrypu/GTChITDDSUvc NTSDNpYz41wOFujrLEB08Alu6wcUeIlHCR4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1089 This is for the upcoming upgrade to OpenSSL_1_1_1b Compiler optimization(Visual Studio) may automatically use _ftol2 instead of some type conversion. For example: OpensslLib.lib(drbg_lib.obj) : error LNK2001: unresolved external symbol __ftol2 This patch add _ftol2 function for the compiler intrinsic. Cc: Jian J Wang Cc: Ting Ye Signed-off-by: Xiaoyu Lu --- CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf | 4 +++- CryptoPkg/Library/IntrinsicLib/Ia32/MathFtol.c | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 CryptoPkg/Library/IntrinsicLib/Ia32/MathFtol.c diff --git a/CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf b/CryptoPkg/Li= brary/IntrinsicLib/IntrinsicLib.inf index 5a20967b6cb8..fcbb93316cf7 100644 --- a/CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf +++ b/CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf @@ -1,7 +1,7 @@ ## @file # Intrinsic Routines Wrapper Library Instance. # -# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent # ## @@ -29,9 +29,11 @@ [Sources.IA32] =20 Ia32/MathLShiftS64.c | MSFT Ia32/MathRShiftU64.c | MSFT + Ia32/MathFtol.c | MSFT =20 Ia32/MathLShiftS64.c | INTEL Ia32/MathRShiftU64.c | INTEL + Ia32/MathFtol.c | INTEL =20 Ia32/MathLShiftS64.nasm | GCC Ia32/MathRShiftU64.nasm | GCC diff --git a/CryptoPkg/Library/IntrinsicLib/Ia32/MathFtol.c b/CryptoPkg/Lib= rary/IntrinsicLib/Ia32/MathFtol.c new file mode 100644 index 000000000000..147a19a4adb0 --- /dev/null +++ b/CryptoPkg/Library/IntrinsicLib/Ia32/MathFtol.c @@ -0,0 +1,22 @@ +/** @file + 64-bit Math Worker Function. + The 32-bit versions of C compiler generate calls to library routines + to handle 64-bit math. These functions use non-standard calling conventi= ons. + +Copyright (c) 2019, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +/* + * Floating point to integer conversion. + */ +__declspec(naked) void _ftol2 (void) +{ + _asm { + fistp qword ptr [esp-8] + mov edx, [esp-4] + mov eax, [esp-8] + ret + } +} --=20 2.7.4 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#40764): https://edk2.groups.io/g/devel/message/40764 Mute This Topic: https://groups.io/mt/31638508/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-