ProcessorBind.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __PROCESSOR_BIND_H__
00016 #define __PROCESSOR_BIND_H__
00017
00018
00019
00020
00021 #define MDE_CPU_IA32
00022
00023
00024
00025
00026 #ifndef __GNUC__
00027 #pragma pack()
00028 #endif
00029
00030 #if __INTEL_COMPILER
00031
00032
00033
00034
00035 #pragma warning ( disable : 869 )
00036
00037
00038
00039
00040
00041 #pragma warning ( disable : 1418 )
00042
00043
00044
00045
00046
00047 #pragma warning ( disable : 1419 )
00048
00049 #endif
00050
00051
00052 #if _MSC_EXTENSIONS
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062 #pragma warning ( disable : 4214 )
00063
00064
00065
00066
00067 #pragma warning ( disable : 4100 )
00068
00069
00070
00071
00072
00073 #pragma warning ( disable : 4057 )
00074
00075
00076
00077
00078 #pragma warning ( disable : 4127 )
00079
00080
00081
00082
00083 #pragma warning ( disable : 4505 )
00084
00085
00086
00087
00088 #pragma warning ( disable : 4206 )
00089
00090 #endif
00091
00092
00093 #if !defined(__GNUC__) && (__STDC_VERSION__ < 199901L)
00094
00095
00096
00097
00098 #if _MSC_EXTENSIONS
00099
00100
00101
00102
00103 typedef unsigned __int64 UINT64;
00104 typedef __int64 INT64;
00105 typedef unsigned __int32 UINT32;
00106 typedef __int32 INT32;
00107 typedef unsigned short UINT16;
00108 typedef unsigned short CHAR16;
00109 typedef short INT16;
00110 typedef unsigned char BOOLEAN;
00111 typedef unsigned char UINT8;
00112 typedef char CHAR8;
00113 typedef char INT8;
00114 #else
00115
00116
00117
00118
00119
00120 typedef unsigned long long UINT64;
00121 typedef long long INT64;
00122 typedef unsigned int UINT32;
00123 typedef int INT32;
00124 typedef unsigned short UINT16;
00125 typedef unsigned short CHAR16;
00126 typedef short INT16;
00127 typedef unsigned char BOOLEAN;
00128 typedef unsigned char UINT8;
00129 typedef char CHAR8;
00130 typedef char INT8;
00131 #endif
00132
00133 #define UINT8_MAX 0xff
00134
00135 #else
00136
00137
00138
00139 #include "stdint.h"
00140 typedef uint8_t BOOLEAN;
00141 typedef int8_t INT8;
00142 typedef uint8_t UINT8;
00143 typedef int16_t INT16;
00144 typedef uint16_t UINT16;
00145 typedef int32_t INT32;
00146 typedef uint32_t UINT32;
00147 typedef int64_t INT64;
00148 typedef uint64_t UINT64;
00149 typedef char CHAR8;
00150 typedef uint16_t CHAR16;
00151
00152 #endif
00153
00154 typedef UINT32 UINTN;
00155 typedef INT32 INTN;
00156
00157
00158
00159
00160
00161 #define MAX_BIT 0x80000000
00162 #define MAX_2_BITS 0xC0000000
00163
00164
00165
00166
00167 #define MAX_ADDRESS 0xFFFFFFFF
00168
00169
00170
00171
00172 #define CPU_STACK_ALIGNMENT sizeof(UINTN)
00173
00174
00175
00176
00177
00178
00179 #if _MSC_EXTENSIONS
00180
00181
00182
00183 #define EFIAPI __cdecl
00184 #else
00185 #if __GNUC__
00186 #define EFIAPI __attribute__((cdecl,regparm(0)))
00187 #endif
00188 #endif
00189
00190
00191
00192
00193
00194
00195 #if _MSC_EXTENSIONS
00196 #define GLOBAL_REMOVE_IF_UNREFERENCED __declspec(selectany)
00197 #else
00198 #define GLOBAL_REMOVE_IF_UNREFERENCED
00199 #endif
00200
00201
00202
00203
00204 #if __GNUC__
00205 #if defined(linux)
00206 #define ASM_PFX(name) name
00207 #else
00208 #define ASM_PFX(name) _##name
00209 #endif
00210 #endif
00211
00212 #define FUNCTION_ENTRY_POINT(p) (p)
00213
00214 #endif
00215