ReactOS  r75636
ProcessorBind.h
Go to the documentation of this file.
1 
15 #ifndef __PROCESSOR_BIND_H__
16 #define __PROCESSOR_BIND_H__
17 
21 #define MDE_CPU_IA32
22 
23 //
24 // Make sure we are using the correct packing rules per EFI specification
25 //
26 #if !defined(__GNUC__)
27 #pragma pack()
28 #endif
29 
30 #if defined(__INTEL_COMPILER)
31 //
32 // Disable ICC's remark #869: "Parameter" was never referenced warning.
33 // This is legal ANSI C code so we disable the remark that is turned on with -Wall
34 //
35 #pragma warning ( disable : 869 )
36 
37 //
38 // Disable ICC's remark #1418: external function definition with no prior declaration.
39 // This is legal ANSI C code so we disable the remark that is turned on with /W4
40 //
41 #pragma warning ( disable : 1418 )
42 
43 //
44 // Disable ICC's remark #1419: external declaration in primary source file
45 // This is legal ANSI C code so we disable the remark that is turned on with /W4
46 //
47 #pragma warning ( disable : 1419 )
48 
49 //
50 // Disable ICC's remark #593: "Variable" was set but never used.
51 // This is legal ANSI C code so we disable the remark that is turned on with /W4
52 //
53 #pragma warning ( disable : 593 )
54 
55 #endif
56 
57 
58 #if defined(_MSC_EXTENSIONS)
59 
60 //
61 // Disable warning that make it impossible to compile at /W4
62 // This only works for Microsoft* tools
63 //
64 
65 //
66 // Disabling bitfield type checking warnings.
67 //
68 #pragma warning ( disable : 4214 )
69 
70 //
71 // Disabling the unreferenced formal parameter warnings.
72 //
73 #pragma warning ( disable : 4100 )
74 
75 //
76 // Disable slightly different base types warning as CHAR8 * can not be set
77 // to a constant string.
78 //
79 #pragma warning ( disable : 4057 )
80 
81 //
82 // ASSERT(FALSE) or while (TRUE) are legal constructes so supress this warning
83 //
84 #pragma warning ( disable : 4127 )
85 
86 //
87 // This warning is caused by functions defined but not used. For precompiled header only.
88 //
89 #pragma warning ( disable : 4505 )
90 
91 //
92 // This warning is caused by empty (after preprocessing) source file. For precompiled header only.
93 //
94 #pragma warning ( disable : 4206 )
95 
96 #endif
97 
98 
99 #if defined(_MSC_EXTENSIONS)
100 
101 //
102 // use Microsoft C complier dependent integer width types
103 //
104 
108 typedef unsigned __int64 UINT64;
112 typedef __int64 INT64;
116 typedef unsigned __int32 UINT32;
120 typedef __int32 INT32;
124 typedef unsigned short UINT16;
129 typedef unsigned short CHAR16;
133 typedef short INT16;
138 typedef unsigned char BOOLEAN;
142 typedef unsigned char UINT8;
146 typedef char CHAR8;
150 typedef char INT8;
151 #else
152 typedef unsigned long long UINT64;
159 typedef signed long long INT64;
163 typedef unsigned int UINT32;
167 typedef signed int INT32;
171 typedef unsigned short UINT16;
176 typedef unsigned short CHAR16;
180 typedef signed short INT16;
185 typedef unsigned char BOOLEAN;
189 typedef unsigned char UINT8;
193 typedef signed char CHAR8;
197 typedef signed char INT8;
198 #endif
199 
204 typedef UINT32 UINTN;
209 typedef INT32 INTN;
210 
211 //
212 // Processor specific defines
213 //
214 
218 #define MAX_BIT 0x80000000
219 #define MAX_2_BITS 0xC0000000
223 
227 #define MAX_ADDRESS 0xFFFFFFFF
228 
232 #define CPU_STACK_ALIGNMENT sizeof(UINTN)
233 
234 //
235 // Modifier to ensure that all protocol member functions and EFI intrinsics
236 // use the correct C calling convention. All protocol member functions and
237 // EFI intrinsics are required to modify their member functions with EFIAPI.
238 //
239 #ifdef EFIAPI
240 #elif defined(_MSC_EXTENSIONS)
244 #define EFIAPI __cdecl
248 #elif defined(__GNUC__)
249 #define EFIAPI __attribute__((cdecl))
253 #else
254 #define EFIAPI
259 #endif
260 
261 #if defined(__GNUC__)
262 #define ASM_GLOBAL .globl
267 #endif
268 
279 #define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
280 
281 #endif
282 
signed char INT8
unsigned short CHAR16
UINT32 UINTN
signed long long INT64
unsigned int UINT32
unsigned char BOOLEAN
INT32 INTN
signed char CHAR8
#define __int32
Definition: basetyps.h:19
unsigned short UINT16
signed int INT32
unsigned long long UINT64
unsigned char UINT8
#define __int64
Definition: basetyps.h:16
signed short INT16