summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/BaseSynchronizationLib/X64
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2018-09-29 20:18:34 +0200
committerLaszlo Ersek <lersek@redhat.com>2018-10-17 18:44:34 +0200
commit310ddb638b7b5223eef1960c7704fee7b18d1bf6 (patch)
tree1f38d0887bdee7096ac55a39a087d9e508d85aed /MdePkg/Library/BaseSynchronizationLib/X64
parentb7dc8888f31402f410c53242839271ba3b94b619 (diff)
downloadedk2-310ddb638b7b5223eef1960c7704fee7b18d1bf6.tar.gz
edk2-310ddb638b7b5223eef1960c7704fee7b18d1bf6.tar.bz2
edk2-310ddb638b7b5223eef1960c7704fee7b18d1bf6.zip
MdePkg/BaseSynchronizationLib GCC: fix whitespace and comments
The "GccInline.c" files have some inconsistent whitespace, and missing (or incorrect) operand comments. Fix and unify them. This patch doesn't change behavior. 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>
Diffstat (limited to 'MdePkg/Library/BaseSynchronizationLib/X64')
-rw-r--r--MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c53
1 files changed, 23 insertions, 30 deletions
diff --git a/MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c b/MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c
index ab7efe23c4..0212798d7a 100644
--- a/MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c
+++ b/MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c
@@ -39,7 +39,7 @@ InternalSyncIncrement (
"movl $1, %%eax \n\t"
"lock \n\t"
"xadd %%eax, %1 \n\t"
- "inc %%eax "
+ "inc %%eax \n\t"
: "=a" (Result), // %0
"+m" (*Value) // %1
: // no inputs that aren't also outputs
@@ -75,10 +75,10 @@ InternalSyncDecrement (
"movl $-1, %%eax \n\t"
"lock \n\t"
"xadd %%eax, %1 \n\t"
- "dec %%eax "
- : "=a" (Result), // %0
- "+m" (*Value) // %1
- : // no inputs that aren't also outputs
+ "dec %%eax \n\t"
+ : "=a" (Result), // %0
+ "+m" (*Value) // %1
+ : // no inputs that aren't also outputs
: "memory",
"cc"
);
@@ -113,16 +113,14 @@ InternalSyncCompareExchange16 (
IN UINT16 ExchangeValue
)
{
-
-
__asm__ __volatile__ (
"lock \n\t"
- "cmpxchgw %3, %1 "
- : "=a" (CompareValue),
- "=m" (*Value)
- : "a" (CompareValue),
- "r" (ExchangeValue),
- "m" (*Value)
+ "cmpxchgw %3, %1 \n\t"
+ : "=a" (CompareValue), // %0
+ "=m" (*Value) // %1
+ : "a" (CompareValue), // %2
+ "r" (ExchangeValue), // %3
+ "m" (*Value) // %4
: "memory",
"cc"
);
@@ -157,16 +155,14 @@ InternalSyncCompareExchange32 (
IN UINT32 ExchangeValue
)
{
-
-
__asm__ __volatile__ (
"lock \n\t"
- "cmpxchgl %3, %1 "
- : "=a" (CompareValue), // %0
- "=m" (*Value) // %1
- : "a" (CompareValue), // %2
- "r" (ExchangeValue), // %3
- "m" (*Value)
+ "cmpxchgl %3, %1 \n\t"
+ : "=a" (CompareValue), // %0
+ "=m" (*Value) // %1
+ : "a" (CompareValue), // %2
+ "r" (ExchangeValue), // %3
+ "m" (*Value) // %4
: "memory",
"cc"
);
@@ -200,20 +196,17 @@ InternalSyncCompareExchange64 (
IN UINT64 ExchangeValue
)
{
-
__asm__ __volatile__ (
"lock \n\t"
- "cmpxchgq %3, %1 "
- : "=a" (CompareValue), // %0
- "=m" (*Value) // %1
- : "a" (CompareValue), // %2
- "r" (ExchangeValue), // %3
- "m" (*Value)
+ "cmpxchgq %3, %1 \n\t"
+ : "=a" (CompareValue), // %0
+ "=m" (*Value) // %1
+ : "a" (CompareValue), // %2
+ "r" (ExchangeValue), // %3
+ "m" (*Value) // %4
: "memory",
"cc"
);
return CompareValue;
}
-
-