From 0ae9d5e88e6fbffdcf2103ec0d54eac0f7295428 Mon Sep 17 00:00:00 2001 From: Anthony PERARD Date: Sat, 8 Nov 2014 02:41:28 +0000 Subject: OvmfPkg XenBusDxe: Convert X64/InterlockedCompareExchange16.asm to NASM The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert X64/InterlockedCompareExchange16.asm to X64/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@16318 6f19259b-4bc3-4df7-8a09-765794883524 --- .../XenBusDxe/X64/InterlockedCompareExchange16.S | 13 ------- .../XenBusDxe/X64/InterlockedCompareExchange16.asm | 41 ---------------------- .../X64/InterlockedCompareExchange16.nasm | 41 ++++++++++++++++++++++ OvmfPkg/XenBusDxe/XenBusDxe.inf | 3 +- 4 files changed, 42 insertions(+), 56 deletions(-) delete mode 100644 OvmfPkg/XenBusDxe/X64/InterlockedCompareExchange16.S delete mode 100644 OvmfPkg/XenBusDxe/X64/InterlockedCompareExchange16.asm create mode 100644 OvmfPkg/XenBusDxe/X64/InterlockedCompareExchange16.nasm (limited to 'OvmfPkg') diff --git a/OvmfPkg/XenBusDxe/X64/InterlockedCompareExchange16.S b/OvmfPkg/XenBusDxe/X64/InterlockedCompareExchange16.S deleted file mode 100644 index 23e08f3f6e..0000000000 --- a/OvmfPkg/XenBusDxe/X64/InterlockedCompareExchange16.S +++ /dev/null @@ -1,13 +0,0 @@ -# UINT16 -# EFIAPI -# InternalSyncCompareExchange16 ( -# IN volatile UINT16 *Value, -# IN UINT16 CompareValue, -# IN UINT16 ExchangeValue -# ); -ASM_GLOBAL ASM_PFX(InternalSyncCompareExchange16) -ASM_PFX(InternalSyncCompareExchange16): - mov %edx, %eax - lock - cmpxchgw %r8w, (%rcx) - ret diff --git a/OvmfPkg/XenBusDxe/X64/InterlockedCompareExchange16.asm b/OvmfPkg/XenBusDxe/X64/InterlockedCompareExchange16.asm deleted file mode 100644 index b23e421abc..0000000000 --- a/OvmfPkg/XenBusDxe/X64/InterlockedCompareExchange16.asm +++ /dev/null @@ -1,41 +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: -; -;------------------------------------------------------------------------------ - - .code - -;------------------------------------------------------------------------------ -; UINT16 -; EFIAPI -; InterlockedCompareExchange16 ( -; IN UINT16 *Value, -; IN UINT16 CompareValue, -; IN UINT16 ExchangeValue -; ); -;------------------------------------------------------------------------------ -InternalSyncCompareExchange16 PROC - mov eax, edx - lock cmpxchg [rcx], r8w - ret -InternalSyncCompareExchange16 ENDP - - END diff --git a/OvmfPkg/XenBusDxe/X64/InterlockedCompareExchange16.nasm b/OvmfPkg/XenBusDxe/X64/InterlockedCompareExchange16.nasm new file mode 100644 index 0000000000..048d1f32f6 --- /dev/null +++ b/OvmfPkg/XenBusDxe/X64/InterlockedCompareExchange16.nasm @@ -0,0 +1,41 @@ +;------------------------------------------------------------------------------ +; +; 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: +; +;------------------------------------------------------------------------------ + + DEFAULT REL + SECTION .text + +;------------------------------------------------------------------------------ +; UINT16 +; EFIAPI +; InterlockedCompareExchange16 ( +; IN UINT16 *Value, +; IN UINT16 CompareValue, +; IN UINT16 ExchangeValue +; ); +;------------------------------------------------------------------------------ +global ASM_PFX(InternalSyncCompareExchange16) +ASM_PFX(InternalSyncCompareExchange16): + mov eax, edx + lock cmpxchg [rcx], r8w + ret + diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.inf b/OvmfPkg/XenBusDxe/XenBusDxe.inf index 3309f53f6b..61f7568e55 100644 --- a/OvmfPkg/XenBusDxe/XenBusDxe.inf +++ b/OvmfPkg/XenBusDxe/XenBusDxe.inf @@ -55,8 +55,7 @@ [Sources.X64] X64/hypercall.nasm - X64/InterlockedCompareExchange16.S - X64/InterlockedCompareExchange16.asm + X64/InterlockedCompareExchange16.nasm X64/TestAndClearBit.S X64/TestAndClearBit.asm -- cgit v1.2.3