diff options
Diffstat (limited to 'roms/edk2/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange16.nasm')
-rw-r--r-- | roms/edk2/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange16.nasm | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/roms/edk2/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange16.nasm b/roms/edk2/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange16.nasm new file mode 100644 index 000000000..36bed4d72 --- /dev/null +++ b/roms/edk2/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange16.nasm @@ -0,0 +1,37 @@ +;------------------------------------------------------------------------------
+;
+; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
+; Copyright (c) 2015, Linaro Ltd. All rights reserved.<BR>
+; SPDX-License-Identifier: BSD-2-Clause-Patent
+;
+; Module Name:
+;
+; InterlockedCompareExchange16.Asm
+;
+; Abstract:
+;
+; InterlockedCompareExchange16 function
+;
+; Notes:
+;
+;------------------------------------------------------------------------------
+
+ SECTION .text
+
+;------------------------------------------------------------------------------
+; UINT16
+; EFIAPI
+; InternalSyncCompareExchange16 (
+; IN volatile UINT16 *Value,
+; IN UINT16 CompareValue,
+; IN UINT16 ExchangeValue
+; );
+;------------------------------------------------------------------------------
+global ASM_PFX(InternalSyncCompareExchange16)
+ASM_PFX(InternalSyncCompareExchange16):
+ mov ecx, [esp + 4]
+ mov ax, [esp + 8]
+ mov dx, [esp + 12]
+ lock cmpxchg [ecx], dx
+ ret
+
|