diff options
-rw-r--r-- | MdePkg/Library/BaseSynchronizationLib/Ia32/GccInline.c | 4 | ||||
-rw-r--r-- | MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/MdePkg/Library/BaseSynchronizationLib/Ia32/GccInline.c b/MdePkg/Library/BaseSynchronizationLib/Ia32/GccInline.c index af39bdeb51..760a020a32 100644 --- a/MdePkg/Library/BaseSynchronizationLib/Ia32/GccInline.c +++ b/MdePkg/Library/BaseSynchronizationLib/Ia32/GccInline.c @@ -40,7 +40,7 @@ InternalSyncIncrement ( "lock \n\t"
"xadd %%eax, %1 \n\t"
"inc %%eax \n\t"
- : "=a" (Result), // %0
+ : "=&a" (Result), // %0
"+m" (*Value) // %1
: // no inputs that aren't also outputs
: "memory",
@@ -76,7 +76,7 @@ InternalSyncDecrement ( "lock \n\t"
"xadd %%eax, %1 \n\t"
"dec %%eax \n\t"
- : "=a" (Result), // %0
+ : "=&a" (Result), // %0
"+m" (*Value) // %1
: // no inputs that aren't also outputs
: "memory",
diff --git a/MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c b/MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c index edb904c007..767d4626b8 100644 --- a/MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c +++ b/MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c @@ -40,7 +40,7 @@ InternalSyncIncrement ( "lock \n\t"
"xadd %%eax, %1 \n\t"
"inc %%eax \n\t"
- : "=a" (Result), // %0
+ : "=&a" (Result), // %0
"+m" (*Value) // %1
: // no inputs that aren't also outputs
: "memory",
@@ -76,7 +76,7 @@ InternalSyncDecrement ( "lock \n\t"
"xadd %%eax, %1 \n\t"
"dec %%eax \n\t"
- : "=a" (Result), // %0
+ : "=&a" (Result), // %0
"+m" (*Value) // %1
: // no inputs that aren't also outputs
: "memory",
|