diff options
author | geekboy15a <geekboy15a@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-03-11 20:52:54 +0000 |
---|---|---|
committer | geekboy15a <geekboy15a@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-03-11 20:52:54 +0000 |
commit | 52aa9e136bb99c9c09d37179765344278251c618 (patch) | |
tree | e6bcb810240553acb267b43efaebcf4c19b00003 /MdePkg/Include/X64/ProcessorBind.h | |
parent | 4903c013bcdb61a487cbf72c0ad784ba3a1b18f9 (diff) | |
download | edk2-platforms-52aa9e136bb99c9c09d37179765344278251c618.tar.xz |
Updating processor bindings to not use stdint.h. Also added code to verify at compile time that data widths are correct.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10232 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Include/X64/ProcessorBind.h')
-rw-r--r-- | MdePkg/Include/X64/ProcessorBind.h | 252 |
1 files changed, 68 insertions, 184 deletions
diff --git a/MdePkg/Include/X64/ProcessorBind.h b/MdePkg/Include/X64/ProcessorBind.h index 2512ff17a3..b22d654ae6 100644 --- a/MdePkg/Include/X64/ProcessorBind.h +++ b/MdePkg/Include/X64/ProcessorBind.h @@ -97,220 +97,104 @@ #endif
-#if !defined(__GNUC__) && (__STDC_VERSION__ < 199901L)
- //
- // No ANSI C 2000 stdint.h integer width declarations, so define equivalents
- //
-
- #if defined(_MSC_EXTENSIONS)
- //
- // use Microsoft C complier dependent integer width types
- //
-
- ///
- /// 8-byte unsigned value
- ///
- typedef unsigned __int64 UINT64;
- ///
- /// 8-byte signed value
- ///
- typedef __int64 INT64;
- ///
- /// 4-byte unsigned value
- ///
- typedef unsigned __int32 UINT32;
- ///
- /// 4-byte signed value
- ///
- typedef __int32 INT32;
- ///
- /// 2-byte unsigned value
- ///
- typedef unsigned short UINT16;
- ///
- /// 2-byte Character. Unless otherwise specified all strings are stored in the
- /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.
- ///
- typedef unsigned short CHAR16;
- ///
- /// 2-byte signed value
- ///
- typedef short INT16;
- ///
- /// Logical Boolean. 1-byte value containing 0 for FALSE or a 1 for TRUE. Other
- /// values are undefined.
- ///
- typedef unsigned char BOOLEAN;
- ///
- /// 1-byte unsigned value
- ///
- typedef unsigned char UINT8;
- ///
- /// 1-byte Character
- ///
- typedef char CHAR8;
- ///
- /// 1-byte signed value
- ///
- typedef char INT8;
- #else
- #if defined(_EFI_P64)
- //
- // P64 - pointers being 64-bit and longs and ints are 32-bits.
- //
-
- ///
- /// 8-byte unsigned value
- ///
- typedef unsigned long long UINT64;
- ///
- /// 8-byte signed value
- ///
- typedef long long INT64;
- ///
- /// 4-byte unsigned value
- ///
- typedef unsigned int UINT32;
- ///
- /// 4-byte signed value
- ///
- typedef int INT32;
- ///
- /// 2-byte Character. Unless otherwise specified all strings are stored in the
- /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.
- ///
- typedef unsigned short CHAR16;
- ///
- /// 2-byte unsigned value
- ///
- typedef unsigned short UINT16;
- ///
- /// 2-byte signed value
- ///
- typedef short INT16;
- ///
- /// Logical Boolean. 1-byte value containing 0 for FALSE or a 1 for TRUE. Other
- /// values are undefined.
- ///
- typedef unsigned char BOOLEAN;
- ///
- /// 1-byte unsigned value
- ///
- typedef unsigned char UINT8;
- ///
- /// 1-byte Character
- ///
- typedef char CHAR8;
- ///
- /// 1-byte signed value
- ///
- typedef char INT8;
- #else
- //
- // Assume LP64 - longs and pointers are 64-bit. Ints are 32-bit.
- //
-
- ///
- /// 8-byte unsigned value
- ///
- typedef unsigned long UINT64;
- ///
- /// 8-byte signed value
- ///
- typedef long INT64;
- ///
- /// 4-byte unsigned value
- ///
- typedef unsigned int UINT32;
- ///
- /// 4-byte signed value
- ///
- typedef int INT32;
- ///
- /// 2-byte unsigned value
- ///
- typedef unsigned short UINT16;
- ///
- /// 2-byte Character. Unless otherwise specified all strings are stored in the
- /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.
- ///
- typedef unsigned short CHAR16;
- ///
- /// 2-byte signed value
- ///
- typedef short INT16;
- ///
- /// Logical Boolean. 1-byte value containing 0 for FALSE or a 1 for TRUE. Other
- /// values are undefined.
- ///
- typedef unsigned char BOOLEAN;
- ///
- /// 1-byte unsigned value
- ///
- typedef unsigned char UINT8;
- ///
- /// 1-byte Character
- ///
- typedef char CHAR8;
- ///
- /// 1-byte signed value
- ///
- typedef char INT8;
- #endif
- #endif
-#else
+#if defined(_MSC_EXTENSIONS)
//
- // Use ANSI C 2000 stdint.h integer width declarations
+ // use Microsoft C complier dependent integer width types
//
- #include <stdint.h>
///
+ /// 8-byte unsigned value
+ ///
+ typedef unsigned __int64 UINT64;
+ ///
+ /// 8-byte signed value
+ ///
+ typedef __int64 INT64;
+ ///
+ /// 4-byte unsigned value
+ ///
+ typedef unsigned __int32 UINT32;
+ ///
+ /// 4-byte signed value
+ ///
+ typedef __int32 INT32;
+ ///
+ /// 2-byte unsigned value
+ ///
+ typedef unsigned short UINT16;
+ ///
+ /// 2-byte Character. Unless otherwise specified all strings are stored in the
+ /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.
+ ///
+ typedef unsigned short CHAR16;
+ ///
+ /// 2-byte signed value
+ ///
+ typedef short INT16;
+ ///
/// Logical Boolean. 1-byte value containing 0 for FALSE or a 1 for TRUE. Other
/// values are undefined.
///
- typedef uint8_t BOOLEAN;
+ typedef unsigned char BOOLEAN;
+ ///
+ /// 1-byte unsigned value
+ ///
+ typedef unsigned char UINT8;
+ ///
+ /// 1-byte Character
+ ///
+ typedef char CHAR8;
///
/// 1-byte signed value
///
- typedef int8_t INT8;
+ typedef char INT8;
+#else
///
- /// 1-byte unsigned value
+ /// 8-byte unsigned value
///
- typedef uint8_t UINT8;
+ typedef unsigned long long UINT64;
///
- /// 2-byte signed value
+ /// 8-byte signed value
///
- typedef int16_t INT16;
+ typedef long long INT64;
///
- /// 2-byte unsigned value
+ /// 4-byte unsigned value
///
- typedef uint16_t UINT16;
+ typedef unsigned int UINT32;
///
/// 4-byte signed value
///
- typedef int32_t INT32;
+ typedef int INT32;
///
- /// 4-byte unsigned value
+ /// 2-byte unsigned value
///
- typedef uint32_t UINT32;
+ typedef unsigned short UINT16;
///
- /// 8-byte signed value
+ /// 2-byte Character. Unless otherwise specified all strings are stored in the
+ /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.
///
- typedef int64_t INT64;
+ typedef unsigned short CHAR16;
///
- /// 8-byte unsigned value
+ /// 2-byte signed value
+ ///
+ typedef short INT16;
+ ///
+ /// Logical Boolean. 1-byte value containing 0 for FALSE or a 1 for TRUE. Other
+ /// values are undefined.
///
- typedef uint64_t UINT64;
+ typedef unsigned char BOOLEAN;
+ ///
+ /// 1-byte unsigned value
+ ///
+ typedef unsigned char UINT8;
///
/// 1-byte Character
///
- typedef char CHAR8;
+ typedef char CHAR8;
///
- /// 2-byte Character. Unless otherwise specified all strings are stored in the
- /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.
+ /// 1-byte signed value
///
- typedef uint16_t CHAR16;
-
+ typedef char INT8;
#endif
///
|