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

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anthony PERARD <[email protected]>
---
 OvmfPkg/XenBusDxe/Ia32/TestAndClearBit.S                    | 13 -------------
 .../Ia32/{TestAndClearBit.asm => TestAndClearBit.nasm}      |  7 +++----
 OvmfPkg/XenBusDxe/XenBusDxe.inf                             |  3 +--
 3 files changed, 4 insertions(+), 19 deletions(-)
 delete mode 100644 OvmfPkg/XenBusDxe/Ia32/TestAndClearBit.S
 rename OvmfPkg/XenBusDxe/Ia32/{TestAndClearBit.asm => TestAndClearBit.nasm} 
(67%)

diff --git a/OvmfPkg/XenBusDxe/Ia32/TestAndClearBit.S 
b/OvmfPkg/XenBusDxe/Ia32/TestAndClearBit.S
deleted file mode 100644
index 58dfa8b..0000000
--- a/OvmfPkg/XenBusDxe/Ia32/TestAndClearBit.S
+++ /dev/null
@@ -1,13 +0,0 @@
-# INT32
-# EFIAPI
-# TestAndClearBit (
-#   IN  INT32 Bit,
-#   IN  volatile VOID* Address
-#   );
-ASM_GLOBAL ASM_PFX(TestAndClearBit)
-ASM_PFX(TestAndClearBit):
-  mov 4(%esp), %ecx
-  mov 8(%esp), %edx
-  lock btrl %ecx, (%edx)
-  sbbl %eax, %eax
-  ret
diff --git a/OvmfPkg/XenBusDxe/Ia32/TestAndClearBit.asm 
b/OvmfPkg/XenBusDxe/Ia32/TestAndClearBit.nasm
similarity index 67%
rename from OvmfPkg/XenBusDxe/Ia32/TestAndClearBit.asm
rename to OvmfPkg/XenBusDxe/Ia32/TestAndClearBit.nasm
index ac80902..d77f74e 100644
--- a/OvmfPkg/XenBusDxe/Ia32/TestAndClearBit.asm
+++ b/OvmfPkg/XenBusDxe/Ia32/TestAndClearBit.nasm
@@ -1,4 +1,4 @@
-.code
+SECTION .text
 
 ; INT32
 ; EFIAPI
@@ -6,12 +6,11 @@
 ;   IN  INT32 Bit,
 ;   IN  volatile VOID* Address
 ;   );
-TestAndClearBit PROC
+global ASM_PFX(TestAndClearBit)
+ASM_PFX(TestAndClearBit):
   mov ecx, [esp + 4]
   mov edx, [esp + 8]
   lock btr [edx], ecx
   sbb eax, eax
   ret
-TestAndClearBit ENDP
 
-END
diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.inf b/OvmfPkg/XenBusDxe/XenBusDxe.inf
index 292e488..b421b85 100644
--- a/OvmfPkg/XenBusDxe/XenBusDxe.inf
+++ b/OvmfPkg/XenBusDxe/XenBusDxe.inf
@@ -51,8 +51,7 @@
 [Sources.IA32]
   Ia32/hypercall.nasm
   Ia32/InterlockedCompareExchange16.nasm
-  Ia32/TestAndClearBit.S
-  Ia32/TestAndClearBit.asm
+  Ia32/TestAndClearBit.nasm
 
 [Sources.X64]
   X64/hypercall.S
-- 
Anthony PERARD


------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to