summaryrefslogtreecommitdiffstats
path: root/OvmfPkg
diff options
context:
space:
mode:
authorAnthony PERARD <anthony.perard@citrix.com>2014-11-08 02:40:58 +0000
committerjljusten <jljusten@Edk2>2014-11-08 02:40:58 +0000
commit09c3757bc429b3066133a87ad8271e21fad46518 (patch)
tree94e0f64d40035484a5921eaad007e3aa852c4bc5 /OvmfPkg
parent8e7ca01de038f0f4ee3df8fabf0caa2eb804379c (diff)
downloadedk2-09c3757bc429b3066133a87ad8271e21fad46518.tar.gz
edk2-09c3757bc429b3066133a87ad8271e21fad46518.tar.bz2
edk2-09c3757bc429b3066133a87ad8271e21fad46518.zip
OvmfPkg XenBusDxe: Convert Ia32/InterlockedCompareExchange16.asm to NASM
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert Ia32/InterlockedCompareExchange16.asm to Ia32/InterlockedCompareExchange16.nasm Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16315 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg')
-rw-r--r--OvmfPkg/XenBusDxe/Ia32/InterlockedCompareExchange16.S15
-rw-r--r--OvmfPkg/XenBusDxe/Ia32/InterlockedCompareExchange16.nasm (renamed from OvmfPkg/XenBusDxe/Ia32/InterlockedCompareExchange16.asm)9
-rw-r--r--OvmfPkg/XenBusDxe/XenBusDxe.inf3
3 files changed, 4 insertions, 23 deletions
diff --git a/OvmfPkg/XenBusDxe/Ia32/InterlockedCompareExchange16.S b/OvmfPkg/XenBusDxe/Ia32/InterlockedCompareExchange16.S
deleted file mode 100644
index 5306448515..0000000000
--- a/OvmfPkg/XenBusDxe/Ia32/InterlockedCompareExchange16.S
+++ /dev/null
@@ -1,15 +0,0 @@
-# UINT16
-# EFIAPI
-# InternalSyncCompareExchange16 (
-# IN volatile UINT16 *Value,
-# IN UINT16 CompareValue,
-# IN UINT16 ExchangeValue
-# );
-ASM_GLOBAL ASM_PFX(InternalSyncCompareExchange16)
-ASM_PFX(InternalSyncCompareExchange16):
- mov 4(%esp), %ecx
- mov 8(%esp), %eax
- mov 12(%esp), %edx
- lock
- cmpxchgw %dx, (%ecx)
- ret
diff --git a/OvmfPkg/XenBusDxe/Ia32/InterlockedCompareExchange16.asm b/OvmfPkg/XenBusDxe/Ia32/InterlockedCompareExchange16.nasm
index adcfbd080b..d45582dd81 100644
--- a/OvmfPkg/XenBusDxe/Ia32/InterlockedCompareExchange16.asm
+++ b/OvmfPkg/XenBusDxe/Ia32/InterlockedCompareExchange16.nasm
@@ -21,9 +21,7 @@
;
;------------------------------------------------------------------------------
- .486
- .model flat,C
- .code
+ SECTION .text
;------------------------------------------------------------------------------
; UINT32
@@ -34,12 +32,11 @@
; IN UINT16 ExchangeValue
; );
;------------------------------------------------------------------------------
-InternalSyncCompareExchange16 PROC
+global ASM_PFX(InternalSyncCompareExchange16)
+ASM_PFX(InternalSyncCompareExchange16):
mov ecx, [esp + 4]
mov eax, [esp + 8]
mov edx, [esp + 12]
lock cmpxchg [ecx], dx
ret
-InternalSyncCompareExchange16 ENDP
- END
diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.inf b/OvmfPkg/XenBusDxe/XenBusDxe.inf
index 2478e35b63..292e488387 100644
--- a/OvmfPkg/XenBusDxe/XenBusDxe.inf
+++ b/OvmfPkg/XenBusDxe/XenBusDxe.inf
@@ -50,8 +50,7 @@
[Sources.IA32]
Ia32/hypercall.nasm
- Ia32/InterlockedCompareExchange16.S
- Ia32/InterlockedCompareExchange16.asm
+ Ia32/InterlockedCompareExchange16.nasm
Ia32/TestAndClearBit.S
Ia32/TestAndClearBit.asm