From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=17.171.2.68; helo=ma1-aaemail-dr-lapp02.apple.com; envelope-from=afish@apple.com; receiver=edk2-devel@lists.01.org Received: from ma1-aaemail-dr-lapp02.apple.com (ma1-aaemail-dr-lapp02.apple.com [17.171.2.68]) (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 76562211D5062 for ; Tue, 5 Mar 2019 12:57:53 -0800 (PST) Received: from pps.filterd (ma1-aaemail-dr-lapp02.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp02.apple.com (8.16.0.27/8.16.0.27) with SMTP id x25KbKuL011250; Tue, 5 Mar 2019 12:57:51 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=mime-version : content-transfer-encoding : content-type : sender : subject : from : in-reply-to : date : cc : message-id : references : to; s=20180706; bh=871E2TbK/tqxBrjPffiMUzy6Tc2L5qY8lrUYhpWyn70=; b=vROBVK5h/q5Yh2sYLCfLPIlLTsXhTFordjxKbpYB+hizApC0zuhU8vaR2kjlP1HSlGqI aEj38ac5/kERO8PB16RB7kDjYGezlbdeAbE7XFOeh/yVuPme1wBhpmVuSd7DzOD634ee flfCRLJo3mjyq991OgK9iAtfGYLkQ/Z9CQzuttNFrPIrhPYEKz5c7bMzmDqcGI0rwrOH qEgPIQodVfMNjtLabdWRNpM7XSvzW+izKPx3hrR0aUjGwkxDuy9djilJQnRy/iFxanIv JZRWEIvyVco4mCIL7RzTcUxerwBFcvjpSRa3LLMCDXodgW3nfQENL9K4+OPlb/dXV0Ut Ow== Received: from mr2-mtap-s01.rno.apple.com (mr2-mtap-s01.rno.apple.com [17.179.226.133]) by ma1-aaemail-dr-lapp02.apple.com with ESMTP id 2qyqd2qkee-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 05 Mar 2019 12:57:51 -0800 MIME-version: 1.0 Received: from ma1-mmpp-sz10.apple.com (ma1-mmpp-sz10.apple.com [17.171.128.150]) by mr2-mtap-s01.rno.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) with ESMTPS id <0PNW00FWZVKEPK40@mr2-mtap-s01.rno.apple.com>; Tue, 05 Mar 2019 12:57:50 -0800 (PST) Received: from process_milters-daemon.ma1-mmpp-sz10.apple.com by ma1-mmpp-sz10.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) id <0PNW00300VFZYR00@ma1-mmpp-sz10.apple.com>; Tue, 05 Mar 2019 12:57:50 -0800 (PST) X-Va-A: X-Va-T-CD: b26a099780da835e7da8fc62e5f102c4 X-Va-E-CD: 7d4c618f85f76966dfbaabb394b9e4f0 X-Va-R-CD: a66fd94a21bd5e42e01791934a036d45 X-Va-CD: 0 X-Va-ID: f470df88-9b11-42ef-9ce4-89e10435641f X-V-A: X-V-T-CD: b26a099780da835e7da8fc62e5f102c4 X-V-E-CD: 7d4c618f85f76966dfbaabb394b9e4f0 X-V-R-CD: a66fd94a21bd5e42e01791934a036d45 X-V-CD: 0 X-V-ID: a16c4b21-84be-4f40-8cce-9729e43c9b7a X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-03-05_10:,, signatures=0 Received: from [17.234.230.246] (unknown [17.234.230.246]) by ma1-mmpp-sz10.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) with ESMTPSA id <0PNW001LNVKBBJ80@ma1-mmpp-sz10.apple.com>; Tue, 05 Mar 2019 12:57:49 -0800 (PST) Sender: afish@apple.com From: Andrew Fish In-reply-to: <20190305014059.17988-4-shenglei.zhang@intel.com> Date: Tue, 05 Mar 2019 12:57:45 -0800 Cc: edk2-devel-01 , Mike Kinney , Liming Gao Message-id: References: <20190305014059.17988-1-shenglei.zhang@intel.com> <20190305014059.17988-4-shenglei.zhang@intel.com> To: Shenglei Zhang X-Mailer: Apple Mail (2.3445.6.18) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-05_10:, , signatures=0 Subject: Re: [PATCH 3/3] MdePkg/BaseSynchronizationLib: Remove inline X86 assembly code X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Mar 2019 20:57:53 -0000 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Shenglei, I was confused by the names of these patches. From a C point of view this is inline assembly: VOID EFIAPI CpuBreakpoint ( VOID ) { __asm__ __volatile__ ("int $3"); } These patches seem to be removing GAS and MASM assembly files, but not the inline assembly *.c files? We don't want to remove the inline assembly from the BaseLib as that could have size, performance, and compiler optimization impact. For example CpuBreakpoint() for clang with LTO would end up inlining a single byte. For i385 a call to assembler would be 5 bytes at each call location plus the overhead of the function. So that is a size increase and a performance overhead. For a C complier calling an assembly function is a serializing event an that can restrict optimizations. Thus having some limited inline assembly support is very useful. Thanks, Andrew Fish > On Mar 4, 2019, at 5:40 PM, Shenglei Zhang wrote: > > MdePkg BaseSynchronizationLib still uses the inline X86 assembly code > in C code files.It should be updated to consume nasm only. > https://bugzilla.tianocore.org/show_bug.cgi?id=1163 > > Cc: Michael D Kinney > Cc: Liming Gao > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Shenglei Zhang > --- > .../Library/BaseSynchronizationLib/BaseSynchronizationLib.inf | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf b/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf > index 32414b29fa..719dc1938d 100755 > --- a/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf > +++ b/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf > @@ -75,13 +75,11 @@ > > [Sources.ARM] > Synchronization.c > - Arm/Synchronization.asm | RVCT > Arm/Synchronization.S | GCC > > [Sources.AARCH64] > Synchronization.c > AArch64/Synchronization.S | GCC > - AArch64/Synchronization.asm | MSFT > > [Packages] > MdePkg/MdePkg.dec > -- > 2.18.0.windows.1 > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel