From 09c3757bc429b3066133a87ad8271e21fad46518 Mon Sep 17 00:00:00 2001 From: Anthony PERARD Date: Sat, 8 Nov 2014 02:40:58 +0000 Subject: 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 -------- .../Ia32/InterlockedCompareExchange16.asm | 45 ---------------------- .../Ia32/InterlockedCompareExchange16.nasm | 42 ++++++++++++++++++++ OvmfPkg/XenBusDxe/XenBusDxe.inf | 3 +- 4 files changed, 43 insertions(+), 62 deletions(-) delete mode 100644 OvmfPkg/XenBusDxe/Ia32/InterlockedCompareExchange16.S delete mode 100644 OvmfPkg/XenBusDxe/Ia32/InterlockedCompareExchange16.asm create mode 100644 OvmfPkg/XenBusDxe/Ia32/InterlockedCompareExchange16.nasm (limited to 'OvmfPkg') diff --git a/OvmfPkg/XenBusDxe/Ia32/InterlockedCompareExchange16.S b/OvmfPkg/XenBusDxe/Ia32/InterlockedCompareExchange16.S deleted file mode 100644 index 5306448..0000000 --- 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.asm deleted file mode 100644 index adcfbd0..0000000 --- a/OvmfPkg/XenBusDxe/Ia32/InterlockedCompareExchange16.asm +++ /dev/null @@ -1,45 +0,0 @@ -;------------------------------------------------------------------------------ -; -; Copyright (c) 2006, Intel Corporation. All rights reserved.
-; 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. -; -; Module Name: -; -; InterlockedCompareExchange16.Asm -; -; Abstract: -; -; InterlockedCompareExchange16 function -; -; Notes: -; -;------------------------------------------------------------------------------ - - .486 - .model flat,C - .code - -;------------------------------------------------------------------------------ -; UINT32 -; EFIAPI -; InternalSyncCompareExchange16 ( -; IN UINT16 *Value, -; IN UINT16 CompareValue, -; IN UINT16 ExchangeValue -; ); -;------------------------------------------------------------------------------ -InternalSyncCompareExchange16 PROC - 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/Ia32/InterlockedCompareExchange16.nasm b/OvmfPkg/XenBusDxe/Ia32/InterlockedCompareExchange16.nasm new file mode 100644 index 0000000..d45582d --- /dev/null +++ b/OvmfPkg/XenBusDxe/Ia32/InterlockedCompareExchange16.nasm @@ -0,0 +1,42 @@ +;------------------------------------------------------------------------------ +; +; Copyright (c) 2006, Intel Corporation. All rights reserved.
+; 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. +; +; Module Name: +; +; InterlockedCompareExchange16.Asm +; +; Abstract: +; +; InterlockedCompareExchange16 function +; +; Notes: +; +;------------------------------------------------------------------------------ + + SECTION .text + +;------------------------------------------------------------------------------ +; UINT32 +; EFIAPI +; InternalSyncCompareExchange16 ( +; IN UINT16 *Value, +; IN UINT16 CompareValue, +; IN UINT16 ExchangeValue +; ); +;------------------------------------------------------------------------------ +global ASM_PFX(InternalSyncCompareExchange16) +ASM_PFX(InternalSyncCompareExchange16): + mov ecx, [esp + 4] + mov eax, [esp + 8] + mov edx, [esp + 12] + lock cmpxchg [ecx], dx + ret + diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.inf b/OvmfPkg/XenBusDxe/XenBusDxe.inf index 2478e35..292e488 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 -- cgit v1.1