summaryrefslogtreecommitdiffhomepage
path: root/include/psxtypes/compiler/__psx_compiler_gcc.h
blob: 5995bf1ce534e17ab81abbc81258efb1bf41ab0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#ifndef _PSXTYPES_COMPILER_GCC_H_
#define _PSXTYPES_COMPILER_GCC_H_


/* compiler identification */
#define __COMPILER__			__GCC__
#define __COMPILER_DEPENDENT_SUFFIX__	__gcc


/* x86 processor model */
#if defined(__i986__)
	#define __X86_MODEL 	986
#elif defined(__i886__)
	#define __X86_MODEL 	886
#elif defined(__i786__)
	#define __X86_MODEL 	786
#elif defined(__i686__)
	#define __X86_MODEL 	686
#elif defined(__i586__)
	#define __X86_MODEL 	586
#elif defined(__i486__)
	#define __X86_MODEL 	486
#elif defined(__i386__)
	#define __X86_MODEL 	386
#endif


/* x86_64 processor model */
#if defined(__amd64) && (__amd64)
	#define __X86_64_MODEL 	__amd64
#endif


/* va_list */
#define __CUSTOM_OR_BUILTIN_va_list__  __builtin_va_list


/* compiler keywords */
#define __in
#define __out
#define __in_opt
#define __out_opt
#define __in_out
#define __in_out_opt
#define __reserved
#define __optional
#define __simplified
#define __caller_allocated
#define __caller_initialized
#define __null_placeholder		(0x0)


/* compiler attributes */
#define __attr_aligned__(x)		__attribute__((__aligned__(x)))
#define __attr_ptr_size_aligned__	__attr_aligned__(__SIZEOF_POINTER__)
#define __attr_packed__			__attribute__((__packed__))
#define __attr_export__			__attribute__((dllexport))
#define __attr_import__			__attribute__((dllimport))
#define __attr_naked__
#define __attr_weak__			__attribute__ ((weak))
#define __attr_hidden__			__attribute__ ((visibility("hidden")))
#define __attr_public__			__attribute__ ((visibility("default")))
#define __attr_protected__		__attribute__ ((visibility("protected")))


/* named section support */
#define __attr_section__(s)		__attribute__((section(s)))
#define __attr_section_decl__(s)


/* compiler-dependent assertions */
#define __assert_aligned_size(s,a)	typedef char __assert##s [-(sizeof(s) % a)]
#define __assert_struct_size(s1,s2)     typedef char __assert##s1##s2 [sizeof(s2) -sizeof(s1)]


/* calling conventions */
#ifndef __cdecl
#define __cdecl
#endif

#ifndef __fastcall
#define __fastcall
#endif

#ifndef __stdcall
#define __stdcall
#endif

#undef APIENTRY
#undef CALLBACK
#undef NTAPI
#undef WINAPI

#define APIENTRY
#define CALLBACK
#define NTAPI
#define WINAPI

#endif /* _PSXTYPES_COMPILER_GCC_H_ */