diff options
Diffstat (limited to 'MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedDecrement.nasm')
-rw-r--r-- | MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedDecrement.nasm | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedDecrement.nasm b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedDecrement.nasm index 951f207bd7b42..21d81e5aff8c7 100644 --- a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedDecrement.nasm +++ b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedDecrement.nasm @@ -1,13 +1,7 @@ ;------------------------------------------------------------------------------ ; -; Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> -; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full text of the license may be found at -; http://opensource.org/licenses/bsd-license.php. -; -; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +; Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +; SPDX-License-Identifier: BSD-2-Clause-Patent ; ; Module Name: ; @@ -32,8 +26,8 @@ ;------------------------------------------------------------------------------ global ASM_PFX(InternalSyncDecrement) ASM_PFX(InternalSyncDecrement): - mov eax, [esp + 4] - lock dec dword [eax] - mov eax, [eax] + mov ecx, [esp + 4] + mov eax, 0FFFFFFFFh + lock xadd dword [ecx], eax + dec eax ret - |