ASMAtomicXchgU16.asm revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
0N/A;; @file
2362N/A; InnoTek Portable Runtime - ASMAtomicXchgU16().
0N/A;
0N/A
0N/A;
0N/A; Copyright (C) 2006 InnoTek Systemberatung GmbH
0N/A;
0N/A; This file is part of VirtualBox Open Source Edition (OSE), as
0N/A; available from http://www.virtualbox.org. This file is free software;
0N/A; you can redistribute it and/or modify it under the terms of the GNU
0N/A; General Public License as published by the Free Software Foundation,
0N/A; in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
0N/A; distribution. VirtualBox OSE is distributed in the hope that it will
0N/A; be useful, but WITHOUT ANY WARRANTY of any kind.
2362N/A;
0N/A; If you received this file as part of a commercial VirtualBox
0N/A; distribution, then only the terms of your commercial VirtualBox
0N/A; license agreement apply instead of the previous paragraph.
0N/A;
0N/A
0N/A
0N/A;*******************************************************************************
0N/A;* Header Files *
0N/A;*******************************************************************************
0N/A%include "iprt/asmdefs.mac"
0N/A
0N/ABEGINCODE
0N/A
0N/A;;
0N/A; @returns rax Current *pu16 value
0N/A; @param rcx pu16 Pointer to the 16-bit variable to update.
4378N/A; @param rdx u16 The 16-bit value to assign to *pu16.
4378N/ABEGINPROC_EXPORTED ASMAtomicXchgU16
4378N/A xchg [rcx], dx
4378N/A movzx eax, dx
4378N/A ret
4378N/AENDPROC ASMAtomicXchgU16
4378N/A
4378N/A