audk/MdePkg/Library/BaseSynchronizationLib/X64
Laszlo Ersek e5d4e7500f MdePkg/BaseSynchronizationLib GCC: fix X64 InternalSyncCompareExchange64()
(This patch is identical to the X64 half of the last one, except for the
InternalSyncCompareExchange32() -> InternalSyncCompareExchange64() and
"cmpxchgl" -> "cmpxchgq" replacements.)

The CMPXCHG instruction has the following operands:
- AX (implicit, CompareValue):    input and output
- destination operand (*Value):   input and output
- source operand (ExchangeValue): input

The X64 version of InternalSyncCompareExchange64() attempts to mark both
CompareValue and (*Value) as input/output, but it doesn't use the
appropriate constraints for either operand.

Fix these issues. Furthermore, prefer the short "+" constraint for I/O
operands over the <output-operand-number> constraint that can be applied
to the input instances of I/O operands.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1208
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2018-10-17 18:44:48 +02:00
..
GccInline.c MdePkg/BaseSynchronizationLib GCC: fix X64 InternalSyncCompareExchange64() 2018-10-17 18:44:48 +02:00
InterlockedCompareExchange16.c MdePkg/BaseSynchronizationLib: Add volatile Interlocked*() APIs 2016-11-17 17:08:19 -08:00
InterlockedCompareExchange16.nasm MdePkg/BaseSynchronizationLib: Fix function names in function headers 2016-11-17 17:08:26 -08:00
InterlockedCompareExchange32.c MdePkg/BaseSynchronizationLib: Add volatile Interlocked*() APIs 2016-11-17 17:08:19 -08:00
InterlockedCompareExchange32.nasm MdePkg/BaseSynchronizationLib: Fix function names in function headers 2016-11-17 17:08:26 -08:00
InterlockedCompareExchange64.c MdePkg/BaseSynchronizationLib: Add volatile Interlocked*() APIs 2016-11-17 17:08:19 -08:00
InterlockedCompareExchange64.nasm MdePkg/BaseSynchronizationLib: Fix function names in function headers 2016-11-17 17:08:26 -08:00
InterlockedDecrement.nasm MdePkg/SynchronizationLib: fix Interlocked[De|In]crement return value 2018-09-25 10:02:53 +08:00
InterlockedIncrement.nasm MdePkg/SynchronizationLib: fix Interlocked[De|In]crement return value 2018-09-25 10:02:53 +08:00