xref: /kvm-unit-tests/lib/kbuild.h (revision d74708246bd9a593e03ecca476a5f1ed36e47288)
1 #ifndef _KBUILD_H_
2 #define _KBUILD_H_
3 #define DEFINE(sym, val) \
4 	asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
5 #define OFFSET(sym, str, mem)	DEFINE(sym, offsetof(struct str, mem))
6 #define COMMENT(x)		asm volatile("\n.ascii \"->#" x "\"")
7 #define BLANK()			asm volatile("\n.ascii \"->\"" : : )
8 #endif
9