The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/TestAndClearBit.asm to X64/TestAndClearBit.nasm

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anthony PERARD <anthony.per...@citrix.com>
---
 OvmfPkg/XenBusDxe/X64/TestAndClearBit.S                      | 12 ------------
 .../X64/{TestAndClearBit.asm => TestAndClearBit.nasm}        |  8 ++++----
 OvmfPkg/XenBusDxe/XenBusDxe.inf                              |  3 +--
 3 files changed, 5 insertions(+), 18 deletions(-)
 delete mode 100644 OvmfPkg/XenBusDxe/X64/TestAndClearBit.S
 rename OvmfPkg/XenBusDxe/X64/{TestAndClearBit.asm => TestAndClearBit.nasm} 
(63%)

diff --git a/OvmfPkg/XenBusDxe/X64/TestAndClearBit.S 
b/OvmfPkg/XenBusDxe/X64/TestAndClearBit.S
deleted file mode 100644
index 0372e83..0000000
--- a/OvmfPkg/XenBusDxe/X64/TestAndClearBit.S
+++ /dev/null
@@ -1,12 +0,0 @@
-# INT32
-# EFIAPI
-# TestAndClearBit (
-#   IN  INT32 Bit,                // rcx
-#   IN  volatile VOID* Address    // rdx
-#   );
-ASM_GLOBAL ASM_PFX(TestAndClearBit)
-ASM_PFX(TestAndClearBit):
-  lock
-  btrl %ecx, (%rdx)
-  sbbl %eax, %eax
-  ret
diff --git a/OvmfPkg/XenBusDxe/X64/TestAndClearBit.asm 
b/OvmfPkg/XenBusDxe/X64/TestAndClearBit.nasm
similarity index 63%
rename from OvmfPkg/XenBusDxe/X64/TestAndClearBit.asm
rename to OvmfPkg/XenBusDxe/X64/TestAndClearBit.nasm
index 3a25879..38ac549 100644
--- a/OvmfPkg/XenBusDxe/X64/TestAndClearBit.asm
+++ b/OvmfPkg/XenBusDxe/X64/TestAndClearBit.nasm
@@ -1,4 +1,5 @@
-.code
+DEFAULT REL
+SECTION .text
 
 ; INT32
 ; EFIAPI
@@ -6,11 +7,10 @@
 ;   IN  INT32 Bit,                // rcx
 ;   IN  volatile VOID* Address    // rdx
 ;   );
-TestAndClearBit PROC
+global ASM_PFX(TestAndClearBit)
+ASM_PFX(TestAndClearBit):
   lock
   btr [rdx], ecx
   sbb eax, eax
   ret
-TestAndClearBit ENDP
 
-END
diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.inf b/OvmfPkg/XenBusDxe/XenBusDxe.inf
index 61f7568..4ce4743 100644
--- a/OvmfPkg/XenBusDxe/XenBusDxe.inf
+++ b/OvmfPkg/XenBusDxe/XenBusDxe.inf
@@ -56,8 +56,7 @@
 [Sources.X64]
   X64/hypercall.nasm
   X64/InterlockedCompareExchange16.nasm
-  X64/TestAndClearBit.S
-  X64/TestAndClearBit.asm
+  X64/TestAndClearBit.nasm
 
 [LibraryClasses]
   UefiDriverEntryPoint
-- 
Anthony PERARD


------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to