Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2509906pxj; Mon, 10 May 2021 04:51:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWxfOv+yl5uxVEjGzGIjB4kjOxbP1Cuj91SwUYyQaiFKn1r83vq0EXzbi+LeElvUVQmjWB X-Received: by 2002:a05:6402:270b:: with SMTP id y11mr28861685edd.332.1620647504819; Mon, 10 May 2021 04:51:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620647504; cv=none; d=google.com; s=arc-20160816; b=TV6ndl/jpPrI3POt64/6jWSZ/P2v83Yd7JUVEH1gDdbX42tA7R5g/1sqEEwtFYZaHa b3rYzKe7siXGuf0Cya64kZUY+exshUO95aLa8gkW60uK/lMXOzMvoIhlCG8z+l8zE+Cd qgrDBrkcy3/RqYzAs2ZWMDIzTYQrStz/32uoXxWnO1GtLYu9OMPC+enEMR2mR/2yCFa3 5+Msi81homDgEY+RVk/f0gDIiJjMLvV0whkvpRZ8rlbCWgtYw4C8uMGwu+7dd0V97S3M F0x59fuH2fAcuUNMDcTFrWP3QUn03yzsRLybtLZoYsgT/0dw363IMjQVonH+V3tb5PZp 3BIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=yD3id9dv8CxdRVNuAL7X9WjllHhVF7OeGCyQU0LLhx0=; b=Rt6mx0IaT0D6WTRJE7X68b39vYg4hADQ1Rup94gz4eNB+xUUUm4bzW5i3ZXPv9fRAA bFL780D9eooUALX55x2gsC3VhKvOvm/rd3J1CFzeTxQCzulHeGdJ2It6LgnC9ma99d51 DLLU3mBkgDC6poT/wMpJcB2BaZcCKNx5fK1OhtyAbjr5chk71z+6V4P8nX+UJ35s4h0j fPry+0NKf7Yu/r/t6jLSCKLWbdHH5bjfTSWGidQbpgT48BXq3+KsqRwABFtpYI4iRasB w5woieEhGLGr1hcD/eg8NCDLDiZEdiwht77TusS9yEU7caKQrPRz51QJY19IZnwq8hMW BxEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="3bPWO/1B"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=GiKtvqqg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g6si13914289edb.247.2021.05.10.04.51.20; Mon, 10 May 2021 04:51:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="3bPWO/1B"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=GiKtvqqg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243104AbhEJLsJ (ORCPT + 99 others); Mon, 10 May 2021 07:48:09 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:36326 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235355AbhEJLAp (ORCPT ); Mon, 10 May 2021 07:00:45 -0400 Date: Mon, 10 May 2021 10:59:39 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1620644380; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yD3id9dv8CxdRVNuAL7X9WjllHhVF7OeGCyQU0LLhx0=; b=3bPWO/1BHV8Elg91KfTGuCm28cP+u7YlsWdOx75VslAEx2rSBgfVUEC4N+aiN9dFmPvt7e W5b3FIR+4MqDQCZ7l77sa1zaTiuzjnxxrtIHieIaN5Zcp/MMNWStePdApMeDmyPeJRkAUg ShDLwc3CnuEpvgww3LxcicioBjc45zIdbCH7egnCnlT1E9kedm7D9mXnSdWMNXoKIgkSEq VDGT8K4D5FERoPF5y0TciQgzr6RXJRQMZCONFLJzumy+MIINO/tJ6ZAZg4LDCeycVBEoF9 0mUyCJKZY7S9Ghowv4WAlQ1+jNQdAwmzTHDVBC2d09uI3HsO4VZDya3jarlaQQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1620644380; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yD3id9dv8CxdRVNuAL7X9WjllHhVF7OeGCyQU0LLhx0=; b=GiKtvqqgI3M0mg+y8RMGKW5OI/14uo/gDqJKVhzXz0mFGL+pLI7YyJjbVKi6O/BN8VIgrw +zkocFBjlruEc7AA== From: "tip-bot2 for H. Peter Anvin (Intel)" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/asm] x86/asm: Have the __ASM_FORM macros handle commas in arguments Cc: "H. Peter Anvin (Intel)" , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20210510090940.924953-2-hpa@zytor.com> References: <20210510090940.924953-2-hpa@zytor.com> MIME-Version: 1.0 Message-ID: <162064437978.29796.11173208105063192798.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/asm branch of tip: Commit-ID: be5bb8021c9731f5593de6419ae35d3f16a3e497 Gitweb: https://git.kernel.org/tip/be5bb8021c9731f5593de6419ae35d3f16a3e497 Author: H. Peter Anvin (Intel) AuthorDate: Mon, 10 May 2021 02:09:38 -07:00 Committer: Ingo Molnar CommitterDate: Mon, 10 May 2021 12:33:28 +02:00 x86/asm: Have the __ASM_FORM macros handle commas in arguments The __ASM_FORM macros are really useful, but in order to be able to use them to define instructions via .byte directives breaks because of the necessary commas. Change the macros to handle commas correctly. [ mingo: Removed stray whitespaces & aligned the definitions vertically. ] Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210510090940.924953-2-hpa@zytor.com --- arch/x86/include/asm/asm.h | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/arch/x86/include/asm/asm.h b/arch/x86/include/asm/asm.h index 0603c74..93aad0b 100644 --- a/arch/x86/include/asm/asm.h +++ b/arch/x86/include/asm/asm.h @@ -3,25 +3,24 @@ #define _ASM_X86_ASM_H #ifdef __ASSEMBLY__ -# define __ASM_FORM(x) x -# define __ASM_FORM_RAW(x) x -# define __ASM_FORM_COMMA(x) x, +# define __ASM_FORM(x, ...) x,## __VA_ARGS__ +# define __ASM_FORM_RAW(x, ...) x,## __VA_ARGS__ +# define __ASM_FORM_COMMA(x, ...) x,## __VA_ARGS__, #else #include - -# define __ASM_FORM(x) " " __stringify(x) " " -# define __ASM_FORM_RAW(x) __stringify(x) -# define __ASM_FORM_COMMA(x) " " __stringify(x) "," +# define __ASM_FORM(x, ...) " " __stringify(x,##__VA_ARGS__) " " +# define __ASM_FORM_RAW(x, ...) __stringify(x,##__VA_ARGS__) +# define __ASM_FORM_COMMA(x, ...) " " __stringify(x,##__VA_ARGS__) "," #endif #ifndef __x86_64__ /* 32 bit */ -# define __ASM_SEL(a,b) __ASM_FORM(a) -# define __ASM_SEL_RAW(a,b) __ASM_FORM_RAW(a) +# define __ASM_SEL(a,b) __ASM_FORM(a) +# define __ASM_SEL_RAW(a,b) __ASM_FORM_RAW(a) #else /* 64 bit */ -# define __ASM_SEL(a,b) __ASM_FORM(b) -# define __ASM_SEL_RAW(a,b) __ASM_FORM_RAW(b) +# define __ASM_SEL(a,b) __ASM_FORM(b) +# define __ASM_SEL_RAW(a,b) __ASM_FORM_RAW(b) #endif #define __ASM_SIZE(inst, ...) __ASM_SEL(inst##l##__VA_ARGS__, \