diff options
author | mdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-12-07 23:10:08 +0000 |
---|---|---|
committer | mdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-12-07 23:10:08 +0000 |
commit | f4ec40abd6533850edb914de59b7ef5f1c1c1bb6 (patch) | |
tree | 1e398baa8e8a50367effc9d98fff318316838b96 /MdePkg/Include/Ia32 | |
parent | 2a3f6a21d3fb87b66be48aa8be2c0380a0db0ae6 (diff) | |
download | edk2-f4ec40abd6533850edb914de59b7ef5f1c1c1bb6.tar.gz edk2-f4ec40abd6533850edb914de59b7ef5f1c1c1bb6.tar.bz2 edk2-f4ec40abd6533850edb914de59b7ef5f1c1c1bb6.zip |
Add more detailed comments for many of the Base Types
Remove all declarations of UINT8_MAX. Use BIT8-1 instead.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6909 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Include/Ia32')
-rw-r--r-- | MdePkg/Include/Ia32/ProcessorBind.h | 144 |
1 files changed, 137 insertions, 7 deletions
diff --git a/MdePkg/Include/Ia32/ProcessorBind.h b/MdePkg/Include/Ia32/ProcessorBind.h index 3f3fae73cf..9d91a16cd1 100644 --- a/MdePkg/Include/Ia32/ProcessorBind.h +++ b/MdePkg/Include/Ia32/ProcessorBind.h @@ -98,18 +98,54 @@ #if _MSC_EXTENSIONS
//
- // use Microsoft* C complier dependent interger width types
+ // 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
@@ -117,48 +153,131 @@ // Assume standard IA-32 alignment.
// Need to check portability of long long
//
+
+ ///
+ /// 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 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
-
- #define UINT8_MAX 0xff
-
#else
//
// Use ANSI C 2000 stdint.h integer width declarations
//
- #include "stdint.h"
+ #include <stdint.h>
+
+ ///
+ /// Logical Boolean. 1-byte value containing 0 for FALSE or a 1 for TRUE. Other
+ /// values are undefined.
+ ///
typedef uint8_t BOOLEAN;
+ ///
+ /// 1-byte signed value
+ ///
typedef int8_t INT8;
+ ///
+ /// 1-byte unsigned value
+ ///
typedef uint8_t UINT8;
+ ///
+ /// 2-byte signed value
+ ///
typedef int16_t INT16;
+ ///
+ /// 2-byte unsigned value
+ ///
typedef uint16_t UINT16;
+ ///
+ /// 4-byte signed value
+ ///
typedef int32_t INT32;
+ ///
+ /// 4-byte unsigned value
+ ///
typedef uint32_t UINT32;
+ ///
+ /// 8-byte signed value
+ ///
typedef int64_t INT64;
+ ///
+ /// 8-byte unsigned value
+ ///
typedef uint64_t UINT64;
+ ///
+ /// 1-byte Character
+ ///
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.
+ ///
typedef uint16_t CHAR16;
#endif
+///
+/// Unsigned value of native width. (4 bytes on supported 32-bit processor instructions,
+/// 8 bytes on supported 64-bit processor instructions)
+///
typedef UINT32 UINTN;
+///
+/// Signed value of native width. (4 bytes on supported 32-bit processor instructions,
+/// 8 bytes on supported 64-bit processor instructions)
+///
typedef INT32 INTN;
+//
+// Processor specific defines
+//
///
-/// Processor specific defines
+/// A value of native width with the highest bit set.
///
#define MAX_BIT 0x80000000
+///
+/// A value of native width with the two highest bits set.
+///
#define MAX_2_BITS 0xC0000000
///
@@ -178,11 +297,14 @@ typedef INT32 INTN; //
#if _MSC_EXTENSIONS
///
- /// Microsoft* compiler requires _EFIAPI useage, __cdecl is Microsoft* specific C.
+ /// Microsoft* compiler specific method for EFIAPI calling convension
///
#define EFIAPI __cdecl
#else
#if __GNUC__
+ ///
+ /// GCC specific method for EFIAPI calling convension
+ ///
#define EFIAPI __attribute__((cdecl))
#endif
#endif
@@ -193,8 +315,16 @@ typedef INT32 INTN; // a non standard extension
//
#if _MSC_EXTENSIONS
+ ///
+ /// Remove global variable from the linked image if there are no references to
+ /// it after all compiler and linker optimizations have been performed.
+ ///
#define GLOBAL_REMOVE_IF_UNREFERENCED __declspec(selectany)
#else
+ ///
+ /// Remove global variable from the linked image if there are no references to
+ /// it after all compiler and linker optimizations have been performed.
+ ///
#define GLOBAL_REMOVE_IF_UNREFERENCED
#endif
|