linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "tip-bot2 for H. Peter Anvin (Intel)" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: "H. Peter Anvin (Intel)" <hpa@zytor.com>,
	Ingo Molnar <mingo@kernel.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/asm] x86/asm: Add _ASM_BYTES() macro for a .byte ... opcode sequence
Date: Mon, 10 May 2021 10:59:39 -0000	[thread overview]
Message-ID: <162064437935.29796.14044755304538421438.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20210510090940.924953-3-hpa@zytor.com>

The following commit has been merged into the x86/asm branch of tip:

Commit-ID:     d88be187a6e6f3a97dfa7ddc500bb9ca191b3772
Gitweb:        https://git.kernel.org/tip/d88be187a6e6f3a97dfa7ddc500bb9ca191b3772
Author:        H. Peter Anvin (Intel) <hpa@zytor.com>
AuthorDate:    Mon, 10 May 2021 02:09:39 -07:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Mon, 10 May 2021 12:33:28 +02:00

x86/asm: Add _ASM_BYTES() macro for a .byte ... opcode sequence

Make it easy to create a sequence of bytes that can be used in either
assembly proper on in a C asm() statement.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210510090940.924953-3-hpa@zytor.com
---
 arch/x86/include/asm/asm.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/include/asm/asm.h b/arch/x86/include/asm/asm.h
index 93aad0b..507a37a 100644
--- a/arch/x86/include/asm/asm.h
+++ b/arch/x86/include/asm/asm.h
@@ -13,6 +13,8 @@
 # define __ASM_FORM_COMMA(x, ...)	" " __stringify(x,##__VA_ARGS__) ","
 #endif
 
+#define _ASM_BYTES(x, ...)	__ASM_FORM(.byte x,##__VA_ARGS__ ;)
+
 #ifndef __x86_64__
 /* 32 bit */
 # define __ASM_SEL(a,b)		__ASM_FORM(a)

  reply	other threads:[~2021-05-10 12:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-10  9:09 [PATCH 0/3] x86/asm: macro improvements in <asm/asm.h> H. Peter Anvin
2021-05-10  9:09 ` [PATCH 1/3] x86/asm: have the __ASM_FORM macros handle commas in arguments H. Peter Anvin
2021-05-10 10:59   ` [tip: x86/asm] x86/asm: Have " tip-bot2 for H. Peter Anvin (Intel)
2021-05-10  9:09 ` [PATCH 2/3] x86/asm: add _ASM_BYTES() macro for a .byte ... opcode sequence H. Peter Anvin
2021-05-10 10:59   ` tip-bot2 for H. Peter Anvin (Intel) [this message]
2021-05-10  9:09 ` [PATCH 3/3] x86/asm: use _ASM_BYTES() in <asm/nops.h> H. Peter Anvin
2021-05-10 10:59   ` [tip: x86/asm] x86/asm: Use " tip-bot2 for H. Peter Anvin (Intel)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=162064437935.29796.14044755304538421438.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).