Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

H. Peter Anvin (Intel) and committed by
Ingo Molnar
d88be187 be5bb802

+2
+2
arch/x86/include/asm/asm.h
··· 13 13 # define __ASM_FORM_COMMA(x, ...) " " __stringify(x,##__VA_ARGS__) "," 14 14 #endif 15 15 16 + #define _ASM_BYTES(x, ...) __ASM_FORM(.byte x,##__VA_ARGS__ ;) 17 + 16 18 #ifndef __x86_64__ 17 19 /* 32 bit */ 18 20 # define __ASM_SEL(a,b) __ASM_FORM(a)