OvmfPkg PciHostBridgeDxe: Convert X64/IoFifo.asm to NASM

The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/IoFifo.asm to X64/IoFifo.nasm

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
Jordan Justen 2016-03-07 19:18:04 -08:00 committed by Laszlo Ersek
parent 6026bf4600
commit ace1d0517b
3 changed files with 15 additions and 139 deletions

View File

@ -52,8 +52,7 @@
Ia32/IoFifo.nasm Ia32/IoFifo.nasm
[Sources.X64] [Sources.X64]
X64/IoFifo.asm X64/IoFifo.nasm
X64/IoFifo.S
[Protocols] [Protocols]
gEfiPciHostBridgeResourceAllocationProtocolGuid ## PRODUCES gEfiPciHostBridgeResourceAllocationProtocolGuid ## PRODUCES

View File

@ -1,122 +0,0 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
#
# 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, // rcx
# IN UINTN Count, // rdx
# IN VOID *Buffer // r8
# );
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(IoReadFifo8)
ASM_PFX(IoReadFifo8):
cld
xchg %rcx, %rdx
xchg %r8, %rdi # rdi: buffer address; r8: save register
rep insb
mov %r8, %rdi # restore rdi
ret
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# IoReadFifo16 (
# IN UINTN Port, // rcx
# IN UINTN Count, // rdx
# IN VOID *Buffer // r8
# );
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(IoReadFifo16)
ASM_PFX(IoReadFifo16):
cld
xchg %rcx, %rdx
xchg %r8, %rdi # rdi: buffer address; r8: save register
rep insw
mov %r8, %rdi # restore rdi
ret
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# IoReadFifo32 (
# IN UINTN Port, // rcx
# IN UINTN Count, // rdx
# IN VOID *Buffer // r8
# );
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(IoReadFifo32)
ASM_PFX(IoReadFifo32):
cld
xchg %rcx, %rdx
xchg %r8, %rdi # rdi: buffer address; r8: save register
rep insl
mov %r8, %rdi # restore rdi
ret
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# IoWriteFifo8 (
# IN UINTN Port, // rcx
# IN UINTN Count, // rdx
# IN VOID *Buffer // r8
# );
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(IoWriteFifo8)
ASM_PFX(IoWriteFifo8):
cld
xchg %rcx, %rdx
xchg %r8, %rsi # rsi: buffer address; r8: save register
rep outsb
mov %r8, %rsi # restore rsi
ret
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# IoWriteFifo16 (
# IN UINTN Port, // rcx
# IN UINTN Count, // rdx
# IN VOID *Buffer // r8
# );
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(IoWriteFifo16)
ASM_PFX(IoWriteFifo16):
cld
xchg %rcx, %rdx
xchg %r8, %rsi # rsi: buffer address; r8: save register
rep outsw
mov %r8, %rsi # restore rsi
ret
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# IoWriteFifo32 (
# IN UINTN Port, // rcx
# IN UINTN Count, // rdx
# IN VOID *Buffer // r8
# );
#------------------------------------------------------------------------------
ASM_GLOBAL ASM_PFX(IoWriteFifo32)
ASM_PFX(IoWriteFifo32):
cld
xchg %rcx, %rdx
xchg %r8, %rsi # rsi: buffer address; r8: save register
rep outsl
mov %r8, %rsi # restore rsi
ret

View File

@ -12,7 +12,8 @@
; ;
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
.code DEFAULT REL
SECTION .text
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; VOID ; VOID
@ -23,14 +24,14 @@
; IN VOID *Buffer // r8 ; IN VOID *Buffer // r8
; ); ; );
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
IoReadFifo8 PROC global ASM_PFX(IoReadFifo8)
ASM_PFX(IoReadFifo8):
cld cld
xchg rcx, rdx xchg rcx, rdx
xchg rdi, r8 ; rdi: buffer address; r8: save rdi xchg rdi, r8 ; rdi: buffer address; r8: save rdi
rep insb rep insb
mov rdi, r8 ; restore rdi mov rdi, r8 ; restore rdi
ret ret
IoReadFifo8 ENDP
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; VOID ; VOID
@ -41,14 +42,14 @@ IoReadFifo8 ENDP
; IN VOID *Buffer // r8 ; IN VOID *Buffer // r8
; ); ; );
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
IoReadFifo16 PROC global ASM_PFX(IoReadFifo16)
ASM_PFX(IoReadFifo16):
cld cld
xchg rcx, rdx xchg rcx, rdx
xchg rdi, r8 ; rdi: buffer address; r8: save rdi xchg rdi, r8 ; rdi: buffer address; r8: save rdi
rep insw rep insw
mov rdi, r8 ; restore rdi mov rdi, r8 ; restore rdi
ret ret
IoReadFifo16 ENDP
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; VOID ; VOID
@ -59,14 +60,14 @@ IoReadFifo16 ENDP
; IN VOID *Buffer // r8 ; IN VOID *Buffer // r8
; ); ; );
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
IoReadFifo32 PROC global ASM_PFX(IoReadFifo32)
ASM_PFX(IoReadFifo32):
cld cld
xchg rcx, rdx xchg rcx, rdx
xchg rdi, r8 ; rdi: buffer address; r8: save rdi xchg rdi, r8 ; rdi: buffer address; r8: save rdi
rep insd rep insd
mov rdi, r8 ; restore rdi mov rdi, r8 ; restore rdi
ret ret
IoReadFifo32 ENDP
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; VOID ; VOID
@ -77,14 +78,14 @@ IoReadFifo32 ENDP
; IN VOID *Buffer // r8 ; IN VOID *Buffer // r8
; ); ; );
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
IoWriteFifo8 PROC global ASM_PFX(IoWriteFifo8)
ASM_PFX(IoWriteFifo8):
cld cld
xchg rcx, rdx xchg rcx, rdx
xchg rsi, r8 ; rsi: buffer address; r8: save rsi xchg rsi, r8 ; rsi: buffer address; r8: save rsi
rep outsb rep outsb
mov rsi, r8 ; restore rsi mov rsi, r8 ; restore rsi
ret ret
IoWriteFifo8 ENDP
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; VOID ; VOID
@ -95,14 +96,14 @@ IoWriteFifo8 ENDP
; IN VOID *Buffer // r8 ; IN VOID *Buffer // r8
; ); ; );
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
IoWriteFifo16 PROC global ASM_PFX(IoWriteFifo16)
ASM_PFX(IoWriteFifo16):
cld cld
xchg rcx, rdx xchg rcx, rdx
xchg rsi, r8 ; rsi: buffer address; r8: save rsi xchg rsi, r8 ; rsi: buffer address; r8: save rsi
rep outsw rep outsw
mov rsi, r8 ; restore rsi mov rsi, r8 ; restore rsi
ret ret
IoWriteFifo16 ENDP
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; VOID ; VOID
@ -113,14 +114,12 @@ IoWriteFifo16 ENDP
; IN VOID *Buffer // r8 ; IN VOID *Buffer // r8
; ); ; );
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
IoWriteFifo32 PROC global ASM_PFX(IoWriteFifo32)
ASM_PFX(IoWriteFifo32):
cld cld
xchg rcx, rdx xchg rcx, rdx
xchg rsi, r8 ; rsi: buffer address; r8: save rsi xchg rsi, r8 ; rsi: buffer address; r8: save rsi
rep outsd rep outsd
mov rsi, r8 ; restore rsi mov rsi, r8 ; restore rsi
ret ret
IoWriteFifo32 ENDP
END