From nobody Mon Feb 9 07:22:52 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+41590+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+41590+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1559126577; cv=none; d=zoho.com; s=zohoarc; b=H7y1iAYq4669AeTug6K4LCq2+2xTPAIkWMa3MHZ1UFU0d4mZtrbnYQ9Sn2fUxvtrUAxFJSsxFVIym6mjswcTijUhPsiFSy/LvF+lstlSDUZ2OPSCnS/ovBfstuQFIqq7p77LkY6XjJIQu1OU6dVXwGTweUJyrUXD2z7bMRzCeo4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559126577; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=pM/Ft8mZE0gLP4wDuAFDdcMRv05xsB2oYdeqODUaVPw=; b=Vws1hQc7lCRWTjTltv613EH0jDQp/4gsJohNwqH3BeoUB1vVWIIVYddaTVKuhu+sfBRXTAbzAMPiq9bmigi1xmrSd0vx0y4OtmIb9pzsO1jts1nGpuVvPlDdvinva9lT5FSe5EOezzbjfXn+ihXfm8TD5Cg/h6Go3YcfRXdRwW0= 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+41590+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 1559126576998617.4096660208354; Wed, 29 May 2019 03:42:56 -0700 (PDT) Return-Path: X-Received: from mga14.intel.com (mga14.intel.com []) by groups.io with SMTP; Wed, 29 May 2019 03:42:56 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 May 2019 03:42:55 -0700 X-ExtLoop1: 1 X-Received: from xiaoyu-dev.sh.intel.com ([10.239.47.11]) by fmsmga004.fm.intel.com with ESMTP; 29 May 2019 03:42:55 -0700 From: "Xiaoyu Lu" To: devel@edk2.groups.io Cc: Xiaoyu Lu , Jian J Wang , Ting Ye Subject: [edk2-devel] [PATCH v5 3/9] CryptoPkg/IntrinsicLib: Fix possible unresolved external symbol issue Date: Wed, 29 May 2019 06:40:32 -0400 Message-Id: <1559126438-9211-4-git-send-email-xiaoyux.lu@intel.com> In-Reply-To: <1559126438-9211-1-git-send-email-xiaoyux.lu@intel.com> References: <1559126438-9211-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=1559126576; bh=UGSGOJOt5r5/hbVzJLZMff6i85j3OH6mu9tAcYGAdCc=; h=Cc:Date:From:Reply-To:Subject:To; b=u2N1OZg93+vcxxNFy7gUF51YShOeWnXDW0DvnFFaImQSAmXgk5tQJUpuZ5GYiO5cVwA Ik0u6Os4H40BJ61D6Hrfsyf7OLX9BZJWkytzcMIM8yCdEzLS6thaHdTDrNa09J9ODjh3h HkBPRJ6SsaffHvmiKcb4xTdAifZubus+Dh4= 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 Tested-by: Gary Lin --- 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 (#41590): https://edk2.groups.io/g/devel/message/41590 Mute This Topic: https://groups.io/mt/31832283/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-