audk/MdePkg/Library/BaseSynchronizationLib
Laszlo Ersek c6fedbd791 MdePkg/BaseSynchronizationLib GCC: fix InternalSyncCompareExchange16()
The CMPXCHG instruction has the following operands:
- AX (implicit, CompareValue):    input and output
- destination operand (*Value):   input and output
- source operand (ExchangeValue): input

The IA32 version of InternalSyncCompareExchange16() correctly marks
CompareValue as input/output, but it marks (*Value) only as input.

The X64 version of InternalSyncCompareExchange16() 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:43 +02:00
..
AArch64 MdePkg/Library/BaseSynchronizationLib: Enable VS2017/ARM64 builds 2018-04-17 14:54:28 +08:00
Arm MdePkg: BaseSynchronizationLib: fix Increment/Decrement retvals for ARM 2015-03-20 12:17:02 +00:00
Ebc MdePkg: Clean up source files 2018-06-28 11:19:47 +08:00
Ia32 MdePkg/BaseSynchronizationLib GCC: fix InternalSyncCompareExchange16() 2018-10-17 18:44:43 +02:00
X64 MdePkg/BaseSynchronizationLib GCC: fix InternalSyncCompareExchange16() 2018-10-17 18:44:43 +02:00
BaseSynchronizationLib.inf MdePkg: Removing ipf which is no longer supported from edk2. 2018-09-25 23:48:21 +08:00
BaseSynchronizationLib.uni MdePkg: Convert all .uni files to utf-8 2015-12-15 04:53:50 +00:00
BaseSynchronizationLibInternals.h MdePkg/SynchronizationLib: fix Interlocked[De|In]crement return value 2018-09-25 10:02:53 +08:00
InterlockedDecrementMsc.c MdePkg/SynchronizationLib: fix Interlocked[De|In]crement return value 2018-09-25 10:02:53 +08:00
InterlockedIncrementMsc.c MdePkg/SynchronizationLib: fix Interlocked[De|In]crement return value 2018-09-25 10:02:53 +08:00
Synchronization.c MdePkg/SynchronizationLib: fix Interlocked[De|In]crement return value 2018-09-25 10:02:53 +08:00
SynchronizationGcc.c MdePkg/SynchronizationLib: fix Interlocked[De|In]crement return value 2018-09-25 10:02:53 +08:00
SynchronizationMsc.c MdePkg/SynchronizationLib: fix Interlocked[De|In]crement return value 2018-09-25 10:02:53 +08:00