1 ;------------------------------------------------------------------------------
3 ; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
4 ; Copyright (c) 2015, Linaro Ltd. All rights reserved.<BR>
5 ; SPDX-License-Identifier: BSD-2-Clause-Patent
9 ; InterlockedCompareExchange16.Asm
13 ; InterlockedCompareExchange16 function
17 ;------------------------------------------------------------------------------
21 ;------------------------------------------------------------------------------
24 ; InternalSyncCompareExchange16 (
25 ; IN volatile UINT16 *Value,
26 ; IN UINT16 CompareValue,
27 ; IN UINT16 ExchangeValue
29 ;------------------------------------------------------------------------------
30 global ASM_PFX(InternalSyncCompareExchange16)
31 ASM_PFX(InternalSyncCompareExchange16):
35 lock cmpxchg [ecx], dx