-;------------------------------------------------------------------------------\r
-;\r
-; Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
-; This program and the accompanying materials\r
-; are licensed and made available under the terms and conditions of the BSD License\r
-; which accompanies this distribution. The full text of the license may be found at\r
-; http://opensource.org/licenses/bsd-license.php.\r
-;\r
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-;\r
-;------------------------------------------------------------------------------\r
-\r
- DEFAULT REL\r
- SECTION .text\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; IoReadFifo8 (\r
-; IN UINTN Port, // rcx\r
-; IN UINTN Size, // rdx\r
-; IN VOID *Buffer // r8\r
-; );\r
-;------------------------------------------------------------------------------\r
-global ASM_PFX(IoReadFifo8)\r
-ASM_PFX(IoReadFifo8):\r
-\r
- xchg rcx, rdx\r
- xchg rdi, r8 ; rdi: buffer address; r8: save rdi\r
-rep insb\r
- mov rdi, r8 ; restore rdi\r
- ret\r
-\r
-;------------------------------------------------------------------------------\r
-; VOID\r
-; EFIAPI\r
-; IoWriteFifo8 (\r
-; IN UINTN Port, // rcx\r
-; IN UINTN Size, // rdx\r
-; IN VOID *Buffer // r8\r
-; );\r
-;------------------------------------------------------------------------------\r
-global ASM_PFX(IoWriteFifo8)\r
-ASM_PFX(IoWriteFifo8):\r
-\r
- xchg rcx, rdx\r
- xchg rsi, r8 ; rdi: buffer address; r8: save rdi\r
-rep outsb\r
- mov rsi, r8 ; restore rdi\r
- ret\r
-\r