summaryrefslogtreecommitdiff
path: root/OvmfPkg/XenBusDxe/Ia32/TestAndClearBit.S
diff options
context:
space:
mode:
Diffstat (limited to 'OvmfPkg/XenBusDxe/Ia32/TestAndClearBit.S')
-rw-r--r--OvmfPkg/XenBusDxe/Ia32/TestAndClearBit.S13
1 files changed, 13 insertions, 0 deletions
diff --git a/OvmfPkg/XenBusDxe/Ia32/TestAndClearBit.S b/OvmfPkg/XenBusDxe/Ia32/TestAndClearBit.S
new file mode 100644
index 0000000000..58dfa8ba57
--- /dev/null
+++ b/OvmfPkg/XenBusDxe/Ia32/TestAndClearBit.S
@@ -0,0 +1,13 @@
+# 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