xref: /kvmtool/x86/include/kvm/assembly.h (revision af7b08685968ff8f6ffdf5cac1ef067688bce8c6)
1305d9054SCyrill Gorcunov #ifndef ASSEMBLY_H_
2305d9054SCyrill Gorcunov #define ASSEMBLY_H_
3305d9054SCyrill Gorcunov 
4305d9054SCyrill Gorcunov #define __ALIGN	.p2align 4, 0x90
5305d9054SCyrill Gorcunov #define ENTRY(name)	\
6305d9054SCyrill Gorcunov 	__ALIGN;	\
7305d9054SCyrill Gorcunov 	.globl name;	\
8305d9054SCyrill Gorcunov 	name:
9305d9054SCyrill Gorcunov 
108b8fb6c7SCyrill Gorcunov #define GLOBAL(name)	\
118b8fb6c7SCyrill Gorcunov 	.globl name;	\
128b8fb6c7SCyrill Gorcunov 	name:
138b8fb6c7SCyrill Gorcunov 
14*28ce0d66SCyrill Gorcunov #define ENTRY_END(name)	GLOBAL(name##_end)
15*28ce0d66SCyrill Gorcunov #define END(name)	GLOBAL(name##_end)
16305d9054SCyrill Gorcunov 
17305d9054SCyrill Gorcunov /*
18305d9054SCyrill Gorcunov  * gas produces size override prefix with which
19305d9054SCyrill Gorcunov  * we are unhappy, lets make it hardcoded for
20305d9054SCyrill Gorcunov  * 16 bit mode
21305d9054SCyrill Gorcunov  */
22305d9054SCyrill Gorcunov #define IRET	.byte 0xcf
23305d9054SCyrill Gorcunov 
24305d9054SCyrill Gorcunov #endif /* ASSEMBLY_H_ */
25