Re: [edk2] [PATCH 6/7] OvmfPkg QemuFwCfgLib: Convert Ia32/IoLibExAsm.asm to NASM

Subject: Re: [edk2] [PATCH 6/7] OvmfPkg QemuFwCfgLib: Convert Ia32/IoLibExAsm.asm to NASM

From: Laszlo Ersek <lersek@redhat.com>

To: edk2-devel@lists.sourceforge.net

Date: 2014-10-23 22:28:48

On 10/18/14 20:25, Jordan Justen wrote:
> The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
> Ia32/IoLibExAsm.asm to Ia32/IoLibExAsm.nasm
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jordan Justen 
> ---
>  OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.S     | 52 ----------------------
>  .../Ia32/{IoLibExAsm.asm => IoLibExAsm.nasm}       | 17 +++----
>  OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf      |  3 +-
>  OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf   |  3 +-
>  4 files changed, 7 insertions(+), 68 deletions(-)
>  delete mode 100644 OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.S
>  rename OvmfPkg/Library/QemuFwCfgLib/Ia32/{IoLibExAsm.asm => IoLibExAsm.nasm} (89%)
> 
> diff --git a/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.S b/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.S
> deleted file mode 100644
> index c2735d2..0000000
> --- a/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.S
> +++ /dev/null
> @@ -1,52 +0,0 @@
> -#------------------------------------------------------------------------------
> -#
> -# Copyright (c) 2006 - 2013, 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 > -# http://opensource.org/licenses/bsd-license.php. > -# > -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > -# > -#------------------------------------------------------------------------------ > - > -#------------------------------------------------------------------------------ > -# VOID > -# EFIAPI > -# IoReadFifo8 ( > -# IN UINTN Port, > -# IN UINTN Size, > -# IN VOID *Buffer > -# ); > -#------------------------------------------------------------------------------ > -ASM_GLOBAL ASM_PFX(IoReadFifo8) > -ASM_PFX(IoReadFifo8): > - movw 4(%esp), %dx > - movl 8(%esp), %ecx > - pushl %edi > - movl 16(%esp), %edi > -rep insb > - popl %edi > - ret > - > - > -#------------------------------------------------------------------------------ > -# VOID > -# EFIAPI > -# IoWriteFifo8 ( > -# IN UINTN Port, > -# IN UINTN Size, > -# IN VOID *Buffer > -# ); > -#------------------------------------------------------------------------------ > -ASM_GLOBAL ASM_PFX(IoWriteFifo8) > -ASM_PFX(IoWriteFifo8): > - movw 4(%esp), %dx > - movl 8(%esp), %ecx > - pushl %esi > - movl 16(%esp), %esi > -rep outsb > - popl %esi > - ret > - > diff --git a/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.asm b/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.nasm > similarity index 89% > rename from OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.asm > rename to OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.nasm > index f7d65c4..faa22e9 100644 > --- a/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.asm > +++ b/OvmfPkg/Library/QemuFwCfgLib/Ia32/IoLibExAsm.nasm > @@ -11,9 +11,7 @@ > ; > ;------------------------------------------------------------------------------ > > - .586P > - .model flat,C > - .code > + SECTION .text > > ;------------------------------------------------------------------------------ > ; VOID > @@ -24,7 +22,8 @@ > ; IN VOID *Buffer > ; ); > ;------------------------------------------------------------------------------ > -IoReadFifo8 PROC > +global ASM_PFX(IoReadFifo8) > +ASM_PFX(IoReadFifo8): > > mov dx, [esp + 4] > mov ecx, [esp + 8] > @@ -34,9 +33,6 @@ rep insb > pop edi > ret > > -IoReadFifo8 ENDP > - > - > ;------------------------------------------------------------------------------ > ; VOID > ; EFIAPI > @@ -46,7 +42,8 @@ IoReadFifo8 ENDP > ; IN VOID *Buffer > ; ); > ;------------------------------------------------------------------------------ > -IoWriteFifo8 PROC > +global ASM_PFX(IoWriteFifo8) > +ASM_PFX(IoWriteFifo8): > > mov dx, [esp + 4] > mov ecx, [esp + 8] > @@ -56,7 +53,3 @@ rep outsb > pop esi > ret > > -IoWriteFifo8 ENDP > - > - END > - > diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf > index 071737e..f163de3 100644 > --- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf > +++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf > @@ -36,8 +36,7 @@ > QemuFwCfgPeiDxe.c > > [Sources.IA32] > - Ia32/IoLibExAsm.asm > - Ia32/IoLibExAsm.S > + Ia32/IoLibExAsm.nasm > > [Sources.X64] > X64/IoLibExAsm.asm > diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf > index 71beacb..5c5c5c7 100644 > --- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf > +++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf > @@ -34,8 +34,7 @@ > QemuFwCfgSec.c > > [Sources.IA32] > - Ia32/IoLibExAsm.asm > - Ia32/IoLibExAsm.S > + Ia32/IoLibExAsm.nasm > > [Sources.X64] > X64/IoLibExAsm.asm > Reviewed-by: Laszlo Ersek ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel