From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.zytor.com (terminus.zytor.com [65.50.211.136]) (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 ECC0421A08D6A for ; Tue, 6 Jun 2017 14:06:30 -0700 (PDT) Received: from [IPv6:2607:fb90:a6b8:4699:dd98:d3be:7336:c13d] ([172.58.39.94]) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id v56L5O36032554 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 6 Jun 2017 14:05:25 -0700 Date: Tue, 06 Jun 2017 14:05:10 -0700 User-Agent: K-9 Mail for Android In-Reply-To: <7A0046FF-FF4E-44FA-9A6F-D2765E07DAA1@apple.com> 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> MIME-Version: 1.0 To: Andrew Fish , "Fan, Jeff" CC: Mike Kinney , "edk2-devel@lists.01.org" From: hpa@zytor.com Message-ID: Subject: Re: [Patch 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:06:31 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On June 6, 2017 1:49:34 PM PDT, Andrew Fish wrote: > >> On Jun 6, 2017, at 12:41 PM, H=2E Peter Anvin wrote: >>=20 >> On 05/22/17 19:08, Fan, Jeff wrote: >>>=20 >>> diff --git a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs=2Enasm >b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs=2Enasm >>> index fa54d01=2E=2E0b14a53 100644 >>> --- a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs=2Enasm >>> +++ b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs=2Enasm >>> @@ -1,5 +1,5 @@ >>> >;------------------------------------------------------------------------= ------ >; -; Copyright (c) 2015 - 2016, Intel Corporation=2E All rights >reserved=2E
>>> +; Copyright (c) 2015 - 2017, Intel Corporation=2E All rights=20 >>> +reserved=2E
>>> ; This program and the accompanying materials ; are licensed and >made available under the terms and conditions of the BSD License ; >which accompanies this distribution=2E The full text of the license may >be found at @@ -201,7 +201,7 @@ CProcedureInvoke: >>> push rbp >>> mov rbp, rsp >>>=20 >>> - 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=2E=20 > >Also given it is a #define (equ) why do we use camel case vs=2E all caps? > >Thanks, > >Andrew Fish > >>> sub rsp, 20h >>> call rax ; Call assembly function to >initialize FPU per UEFI spec >>> add rsp, 20h >>=20 >> FYI, the qword specifier is unnecessary since you are already >specifying >> rax=2E >>=20 >> However, why not simply drop the use of rax entirely and do: >>=20 >> call [esi + InitializeFloatingPointUnitsAddress] >>=20 >> (Also: is this *really* supposed to be esi and not rsi? The former >> means a 32-bit address=2E) >>=20 >> -hpa >> _______________________________________________ >> edk2-devel mailing list >> edk2-devel@lists=2E01=2Eorg >> https://lists=2E01=2Eorg/mailman/listinfo/edk2-devel The NASM command-line option --prefix _ should do exactly that=2E --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E