projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be5bb80
)
x86/asm: Add _ASM_BYTES() macro for a .byte ... opcode sequence
author
H. Peter Anvin (Intel)
<hpa@zytor.com>
Mon, 10 May 2021 09:09:39 +0000
(
02:09
-0700)
committer
Ingo Molnar
<mingo@kernel.org>
Mon, 10 May 2021 10:33:28 +0000
(12:33 +0200)
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
patch
|
blob
|
history
diff --git
a/arch/x86/include/asm/asm.h
b/arch/x86/include/asm/asm.h
index 93aad0b638065b76dca35ed8e241e3726e98db5f..507a37a4602761dbf8b1a3a8a366130110c6ae58 100644
(file)
--- 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)