From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-in5.apple.com (mail-out5.apple.com [17.151.62.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 10D5821967BD7 for ; Tue, 6 Jun 2017 14:14:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; d=apple.com; s=mailout2048s; c=relaxed/simple; q=dns/txt; i=@apple.com; t=1496783710; h=From:Sender:Reply-To:Subject:Date:Message-id:To:Cc:MIME-version:Content-type: Content-transfer-encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-reply-to:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=jhXwFw6O4I900Dk/wGrHmeu6bXPT4CkdtCsvBsIlVKQ=; b=jOyTN7RZKRT2rF2xpLeD5ECGzo2FZwgeVQZRcUhoCPoNhRy48pryEEwUJWCyWZ5m qXo1Yg2O4B2/dpaPRS12F0E8yrurMVc+qhwkpzQjh3bl7cu/tBdlm+fiCPb3kzoR QYAdRauRGqSdu3H/QLnWPWqPTcfHL6VZeLPz8rGlftTUb32acx6zF8bu0MfAdj30 lvGq/HLUgYJqJJqRTV3qwwP2/ShQWNnkWnyIjAyhb33Tng/Xvx0PgeDMnq73CEyN ZQyCKnoBU6gLQzWLl+SW0j4Giw0B8rmWZQOKmDMPRsNS88NrThptKJcIwsepM2hp rM6sw8pvHfA2u+5UVovzwA==; Received: from relay6.apple.com (relay6.apple.com [17.128.113.90]) (using TLS with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail-in5.apple.com (Apple Secure Mail Relay) with SMTP id 3E.18.01595.D5B17395; Tue, 6 Jun 2017 14:15:10 -0700 (PDT) X-AuditID: 11973e13-caa429a00000063b-c2-59371b5d58ed Received: from nwk-mmpp-sz12.apple.com (nwk-mmpp-sz12.apple.com [17.128.115.204]) by relay6.apple.com (Apple SCV relay) with SMTP id 7C.60.09762.D5B17395; Tue, 6 Jun 2017 14:15:09 -0700 (PDT) MIME-version: 1.0 Received: from [17.153.85.153] (unknown [17.153.85.153]) by nwk-mmpp-sz12.apple.com (Oracle Communications Messaging Server 8.0.1.2.20170210 64bit (built Feb 10 2017)) with ESMTPSA id <0OR500JDD9P8LY90@nwk-mmpp-sz12.apple.com>; Tue, 06 Jun 2017 14:15:09 -0700 (PDT) Sender: afish@apple.com From: Andrew Fish In-reply-to: Date: Tue, 06 Jun 2017 14:15:08 -0700 Cc: "Fan, Jeff" , Mike Kinney , "edk2-devel@lists.01.org" Message-id: References: <1495473154-18184-1-git-send-email-michael.d.kinney@intel.com> <542CF652F8836A4AB8DBFAAD40ED192A4C5E8084@shsmsx102.ccr.corp.intel.com> <629c1154-77c8-07cf-131e-cdc64300245c@zytor.com> <7A0046FF-FF4E-44FA-9A6F-D2765E07DAA1@apple.com> To: hpa@zytor.com X-Mailer: Apple Mail (2.3273) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrBLMWRmVeSWpSXmKPExsUi2FAYpRsnbR5pcPsno8W6Pd/YLaZtFLc4 uX4Jo0VHxz8mBxaPxXteMnlMuvCY2eNEyxfWAOYoLpuU1JzMstQifbsEroydqzYxF7wTrph+ bz9LA+MJ/i5GTg4JAROJGVv6GLsYuTiEBFYzSVy+/4Wpi5EDLLFhVzxE/BCjxNyJe5hAGngF BCV+TL7HAlLDLCAvcfC8LEiYWUBL4vujVhaI+olMEvsPrAKrFxYQl3h3ZhMzSL2wQLzEzPn2 IGE2AWWJFfM/sIOEOQVsJc584AYJswioSsw+9gtsDLNAC6NE1/ePUGttJLrnb2aCmL+WSeLE vpMsIAkRoHuO7rvHAvGMrMSt2ZeYQYokBA6wScxet5d1AqPwLCR3z0K4exaSuxcwMq9iFMpN zMzRzcwz1UssKMhJ1UvOz93ECAr66XbCOxhPr7I6xCjAwajEwyuwyyx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ch V2] UefiCpuPkg/MpInitLib: Fix X64 XCODE5/NASM compatibility issues X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2017 21:14:03 -0000 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII > On Jun 6, 2017, at 2:05 PM, hpa@zytor.com wrote: > > On June 6, 2017 1:49:34 PM PDT, Andrew Fish wrote: >> >>> On Jun 6, 2017, at 12:41 PM, H. Peter Anvin wrote: >>> >>> On 05/22/17 19:08, Fan, Jeff wrote: >>>> >>>> diff --git a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm >> b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm >>>> index fa54d01..0b14a53 100644 >>>> --- a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm >>>> +++ b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm >>>> @@ -1,5 +1,5 @@ >>>> >> ;------------------------------------------------------------------------------ >> ; -; Copyright (c) 2015 - 2016, Intel Corporation. All rights >> reserved.
>>>> +; Copyright (c) 2015 - 2017, Intel Corporation. All rights >>>> +reserved.
>>>> ; This program and the accompanying materials ; are licensed and >> made available under the terms and conditions of the BSD License ; >> which accompanies this distribution. The full text of the license may >> be found at @@ -201,7 +201,7 @@ CProcedureInvoke: >>>> push rbp >>>> mov rbp, rsp >>>> >>>> - mov rax, ASM_PFX(InitializeFloatingPointUnits) >>>> + mov rax, qword [esi + >> InitializeFloatingPointUnitsAddress] >> >> Does nasm remove the need for the ASM_PFX() macro? That macro hides if >> C is decorating with a _ prefix. >> >> Also given it is a #define (equ) why do we use camel case vs. all caps? >> >> Thanks, >> >> Andrew Fish >> >>>> sub rsp, 20h >>>> call rax ; Call assembly function to >> initialize FPU per UEFI spec >>>> add rsp, 20h >>> >>> FYI, the qword specifier is unnecessary since you are already >> specifying >>> rax. >>> >>> However, why not simply drop the use of rax entirely and do: >>> >>> call [esi + InitializeFloatingPointUnitsAddress] >>> >>> (Also: is this *really* supposed to be esi and not rsi? The former >>> means a 32-bit address.) >>> >>> -hpa >>> _______________________________________________ >>> edk2-devel mailing list >>> edk2-devel@lists.01.org >>> https://lists.01.org/mailman/listinfo/edk2-devel > > The NASM command-line option --prefix _ should do exactly that. How does it know when to prefix the _? That could break dead stripping with the Xcode linker. L is used to imply local symbol, don't dead strip. Thanks, Andrew Fish > -- > Sent from my Android device with K-9 Mail. Please excuse my brevity.