]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c
MdePkg/BaseSynchronizationLib: Fix InternalSync[De|In]crement
[mirror_edk2.git] / MdePkg / Library / BaseSynchronizationLib / X64 / GccInline.c
index edb904c00704851f59a97f8175a328383cee31f3..767d4626b888df26672e5f2f928f611916c005ee 100644 (file)
@@ -40,7 +40,7 @@ InternalSyncIncrement (
     "lock               \n\t"\r
     "xadd    %%eax, %1  \n\t"\r
     "inc     %%eax      \n\t"\r
-    : "=a" (Result),          // %0\r
+    : "=&a" (Result),         // %0\r
       "+m" (*Value)           // %1\r
     :                         // no inputs that aren't also outputs\r
     : "memory",\r
@@ -76,7 +76,7 @@ InternalSyncDecrement (
     "lock                \n\t"\r
     "xadd    %%eax, %1   \n\t"\r
     "dec     %%eax       \n\t"\r
-    : "=a" (Result),           // %0\r
+    : "=&a" (Result),          // %0\r
       "+m" (*Value)            // %1\r
     :                          // no inputs that aren't also outputs\r
     : "memory",\r