diff options
author | H. Peter Anvin (Intel) <hpa@zytor.com> | 2021-05-10 12:09:39 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2021-05-10 13:33:28 +0300 |
commit | d88be187a6e6f3a97dfa7ddc500bb9ca191b3772 (patch) | |
tree | 9ed3c850fd256ab6133f2ef676c784deb6dce7c2 | |
parent | be5bb8021c9731f5593de6419ae35d3f16a3e497 (diff) | |
download | linux-d88be187a6e6f3a97dfa7ddc500bb9ca191b3772.tar.xz |
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
-rw-r--r-- | arch/x86/include/asm/asm.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/include/asm/asm.h b/arch/x86/include/asm/asm.h index 93aad0b63806..507a37a46027 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) |