]> git.proxmox.com Git - mirror_edk2.git/blame - PcAtChipsetPkg/PciHostBridgeDxe/Ia32/IoFifo.S
EmulatorPkg: Fix Visual Studio build for IA32 & X64
[mirror_edk2.git] / PcAtChipsetPkg / PciHostBridgeDxe / Ia32 / IoFifo.S
CommitLineData
1fd376d9 1#------------------------------------------------------------------------------\r
2#\r
3# Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
4# This program and the accompanying materials\r
5# are licensed and made available under the terms and conditions of the BSD License\r
6# which accompanies this distribution. The full text of the license may be found at\r
7# http://opensource.org/licenses/bsd-license.php.\r
8#\r
9# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11#\r
12#------------------------------------------------------------------------------\r
13\r
14#------------------------------------------------------------------------------\r
15# VOID\r
16# EFIAPI\r
17# IoReadFifo8 (\r
18# IN UINTN Port,\r
19# IN UINTN Count,\r
20# IN VOID *Buffer\r
21# );\r
22#------------------------------------------------------------------------------\r
23ASM_GLOBAL ASM_PFX(IoReadFifo8)\r
24ASM_PFX(IoReadFifo8):\r
25 push %edi\r
26 cld\r
27 movw 8(%esp), %dx\r
28 mov 12(%esp), %ecx\r
29 mov 16(%esp), %edi\r
30rep insb\r
31 pop %edi\r
32 ret\r
33\r
34#------------------------------------------------------------------------------\r
35# VOID\r
36# EFIAPI\r
37# IoReadFifo16 (\r
38# IN UINTN Port,\r
39# IN UINTN Count,\r
40# IN VOID *Buffer\r
41# );\r
42#------------------------------------------------------------------------------\r
43ASM_GLOBAL ASM_PFX(IoReadFifo16)\r
44ASM_PFX(IoReadFifo16):\r
45 push %edi\r
46 cld\r
47 movw 8(%esp), %dx\r
48 mov 12(%esp), %ecx\r
49 mov 16(%esp), %edi\r
50rep insw\r
51 pop %edi\r
52 ret\r
53\r
54#------------------------------------------------------------------------------\r
55# VOID\r
56# EFIAPI\r
57# IoReadFifo32 (\r
58# IN UINTN Port,\r
59# IN UINTN Count,\r
60# IN VOID *Buffer\r
61# );\r
62#------------------------------------------------------------------------------\r
63ASM_GLOBAL ASM_PFX(IoReadFifo32)\r
64ASM_PFX(IoReadFifo32):\r
65 push %edi\r
66 cld\r
67 movw 8(%esp), %dx\r
68 mov 12(%esp), %ecx\r
69 mov 16(%esp), %edi\r
70rep insl\r
71 pop %edi\r
72 ret\r
73\r
74#------------------------------------------------------------------------------\r
75# VOID\r
76# EFIAPI\r
77# IoWriteFifo8 (\r
78# IN UINTN Port,\r
79# IN UINTN Count,\r
80# IN VOID *Buffer\r
81# );\r
82#------------------------------------------------------------------------------\r
83ASM_GLOBAL ASM_PFX(IoWriteFifo8)\r
84ASM_PFX(IoWriteFifo8):\r
85 push %esi\r
86 cld\r
87 movw 8(%esp), %dx\r
88 mov 12(%esp), %ecx\r
89 mov 16(%esp), %esi\r
90rep outsb\r
91 pop %esi\r
92 ret\r
93\r
94#------------------------------------------------------------------------------\r
95# VOID\r
96# EFIAPI\r
97# IoWriteFifo16 (\r
98# IN UINTN Port,\r
99# IN UINTN Count,\r
100# IN VOID *Buffer\r
101# );\r
102#------------------------------------------------------------------------------\r
103ASM_GLOBAL ASM_PFX(IoWriteFifo16)\r
104ASM_PFX(IoWriteFifo16):\r
105 push %esi\r
106 cld\r
107 movw 8(%esp), %dx\r
108 mov 12(%esp), %ecx\r
109 mov 16(%esp), %esi\r
110rep outsw\r
111 pop %esi\r
112 ret\r
113\r
114#------------------------------------------------------------------------------\r
115# VOID\r
116# EFIAPI\r
117# IoWriteFifo32 (\r
118# IN UINTN Port,\r
119# IN UINTN Count,\r
120# IN VOID *Buffer\r
121# );\r
122#------------------------------------------------------------------------------\r
123ASM_GLOBAL ASM_PFX(IoWriteFifo32)\r
124ASM_PFX(IoWriteFifo32):\r
125 push %esi\r
126 cld\r
127 movw 8(%esp), %dx\r
128 mov 12(%esp), %ecx\r
129 mov 16(%esp), %esi\r
130rep outsl\r
131 pop %esi\r
132 ret\r
133\r