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 ;------------------------------------------------------------------------------
22 ;------------------------------------------------------------------------------
25 ; InternalSyncCompareExchange16 (
26 ; IN volatile UINT16 *Value,
27 ; IN UINT16 CompareValue,
28 ; IN UINT16 ExchangeValue
30 ;------------------------------------------------------------------------------
31 global ASM_PFX(InternalSyncCompareExchange16)
32 ASM_PFX(InternalSyncCompareExchange16):
34 lock cmpxchg [rcx], r8w