xref: /kvmtool/x86/include/kvm/assembly.h (revision 8b8fb6c72412de538a9df566e847eb99804ae950)
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 
10*8b8fb6c7SCyrill Gorcunov #define GLOBAL(name)	\
11*8b8fb6c7SCyrill Gorcunov 	.globl name;	\
12*8b8fb6c7SCyrill Gorcunov 	name:
13*8b8fb6c7SCyrill Gorcunov 
14305d9054SCyrill Gorcunov #define ENTRY_END(name)
15305d9054SCyrill Gorcunov 
16305d9054SCyrill Gorcunov /*
17305d9054SCyrill Gorcunov  * gas produces size override prefix with which
18305d9054SCyrill Gorcunov  * we are unhappy, lets make it hardcoded for
19305d9054SCyrill Gorcunov  * 16 bit mode
20305d9054SCyrill Gorcunov  */
21305d9054SCyrill Gorcunov #define IRET	.byte 0xcf
22305d9054SCyrill Gorcunov 
23305d9054SCyrill Gorcunov #endif /* ASSEMBLY_H_ */
24