summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c')
-rw-r--r--MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c b/MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c
index 0212798d7a..4338fb8e65 100644
--- a/MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c
+++ b/MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c
@@ -115,12 +115,10 @@ InternalSyncCompareExchange16 (
{
__asm__ __volatile__ (
"lock \n\t"
- "cmpxchgw %3, %1 \n\t"
- : "=a" (CompareValue), // %0
- "=m" (*Value) // %1
- : "a" (CompareValue), // %2
- "r" (ExchangeValue), // %3
- "m" (*Value) // %4
+ "cmpxchgw %2, %1 \n\t"
+ : "+a" (CompareValue), // %0
+ "+m" (*Value) // %1
+ : "r" (ExchangeValue) // %2
: "memory",
"cc"
);