From 09c3757bc429b3066133a87ad8271e21fad46518 Mon Sep 17 00:00:00 2001 From: Anthony PERARD Date: Sat, 8 Nov 2014 02:40:58 +0000 Subject: [PATCH] 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 Reviewed-by: Jordan Justen git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16315 6f19259b-4bc3-4df7-8a09-765794883524 --- .../XenBusDxe/Ia32/InterlockedCompareExchange16.S | 15 --------------- ...ge16.asm => InterlockedCompareExchange16.nasm} | 9 +++------ OvmfPkg/XenBusDxe/XenBusDxe.inf | 3 +-- 3 files changed, 4 insertions(+), 23 deletions(-) delete mode 100644 OvmfPkg/XenBusDxe/Ia32/InterlockedCompareExchange16.S rename OvmfPkg/XenBusDxe/Ia32/{InterlockedCompareExchange16.asm => InterlockedCompareExchange16.nasm} (88%) 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 similarity index 88% rename from OvmfPkg/XenBusDxe/Ia32/InterlockedCompareExchange16.asm rename to 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