Skip to content

Commit

Permalink
x86/asm: Add _ASM_BYTES() macro for a .byte ... opcode sequence
Browse files Browse the repository at this point in the history
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
  • Loading branch information
H. Peter Anvin (Intel) authored and Ingo Molnar committed May 10, 2021
1 parent be5bb80 commit d88be18
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86/include/asm/asm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d88be18

Please sign in to comment.