summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2026-03-08 20:12:35 +0300
committerBorislav Petkov (AMD) <bp@alien8.de>2026-03-08 21:56:49 +0300
commitceea7868b594ccf376562af40b9463d9f2fb7dd0 (patch)
treef7c7fbd2daa87d8918c328a1dc5f96e20d3710d4
parent09fbb775f1d01945119c4a0be4afacf30cc86796 (diff)
downloadlinux-ceea7868b594ccf376562af40b9463d9f2fb7dd0.tar.xz
x86/local: Remove trailing semicolon from _ASM_XADD in local_add_return()
Remove the trailing semicolon from the inline assembly statement in local_add_return(). The _ASM_XADD macro already expands to a complete instruction, making the extra semicolon unnecessary. More importantly, the stray semicolon causes GCC to treat the inline asm as containing multiple instructions, which can skew its internal instruction count estimation and affect optimization heuristics. No functional change intended. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://patch.msgid.link/20260308171250.7278-1-ubizjak@gmail.com
-rw-r--r--arch/x86/include/asm/local.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/include/asm/local.h b/arch/x86/include/asm/local.h
index 59aa966dc212..4957018fef3e 100644
--- a/arch/x86/include/asm/local.h
+++ b/arch/x86/include/asm/local.h
@@ -106,7 +106,7 @@ static inline bool local_add_negative(long i, local_t *l)
static inline long local_add_return(long i, local_t *l)
{
long __i = i;
- asm volatile(_ASM_XADD "%0, %1;"
+ asm volatile(_ASM_XADD "%0, %1"
: "+r" (i), "+m" (l->a.counter)
: : "memory");
return i + __i;