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 <anthony.per...@citrix.com> --- OvmfPkg/XenBusDxe/X64/InterlockedCompareExchange16.S | 13 ------------- ...pareExchange16.asm => InterlockedCompareExchange16.nasm} | 8 ++++---- OvmfPkg/XenBusDxe/XenBusDxe.inf | 3 +-- 3 files changed, 5 insertions(+), 19 deletions(-) delete mode 100644 OvmfPkg/XenBusDxe/X64/InterlockedCompareExchange16.S rename OvmfPkg/XenBusDxe/X64/{InterlockedCompareExchange16.asm => InterlockedCompareExchange16.nasm} (88%) diff --git a/OvmfPkg/XenBusDxe/X64/InterlockedCompareExchange16.S b/OvmfPkg/XenBusDxe/X64/InterlockedCompareExchange16.S deleted file mode 100644 index 23e08f3..0000000 --- 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.nasm similarity index 88% rename from OvmfPkg/XenBusDxe/X64/InterlockedCompareExchange16.asm rename to OvmfPkg/XenBusDxe/X64/InterlockedCompareExchange16.nasm index b23e421..048d1f3 100644 --- a/OvmfPkg/XenBusDxe/X64/InterlockedCompareExchange16.asm +++ b/OvmfPkg/XenBusDxe/X64/InterlockedCompareExchange16.nasm @@ -21,7 +21,8 @@ ; ;------------------------------------------------------------------------------ - .code + DEFAULT REL + SECTION .text ;------------------------------------------------------------------------------ ; UINT16 @@ -32,10 +33,9 @@ ; IN UINT16 ExchangeValue ; ); ;------------------------------------------------------------------------------ -InternalSyncCompareExchange16 PROC +global ASM_PFX(InternalSyncCompareExchange16) +ASM_PFX(InternalSyncCompareExchange16): mov eax, edx lock cmpxchg [rcx], r8w ret -InternalSyncCompareExchange16 ENDP - END diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.inf b/OvmfPkg/XenBusDxe/XenBusDxe.inf index 3309f53..61f7568 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 -- Anthony PERARD ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel