summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Martin <olivier.martin@arm.com>2013-08-29 09:00:13 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2013-08-29 09:00:13 +0000
commit2a79158c47d828d50903b265a30fe759c45d5003 (patch)
treef546705d7260e1855d91c999d861bd8ba1047823
parent6ce55357091a1c43ab96816b3e63e09956fd37b9 (diff)
downloadedk2-platforms-2a79158c47d828d50903b265a30fe759c45d5003.tar.xz
MdePkg/AArch64: Fixed some definitions in ProcessorBind.h
- Fixed INT8 declaration - Introduced MAX_INTN/MAX_UINTN - Force the MAX_* to be 'unsigned long long' numbers Change-Id: I1ad818559d051df9a880aa8e4ac090e76fdb27e0 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14610 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdePkg/Include/AArch64/ProcessorBind.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/MdePkg/Include/AArch64/ProcessorBind.h b/MdePkg/Include/AArch64/ProcessorBind.h
index 72d38eca67..ce2468287b 100644
--- a/MdePkg/Include/AArch64/ProcessorBind.h
+++ b/MdePkg/Include/AArch64/ProcessorBind.h
@@ -32,7 +32,7 @@
#if _MSC_EXTENSIONS
//
- // use Microsoft* C complier dependent interger width types
+ // use Microsoft* C complier dependent integer width types
//
typedef unsigned __int64 UINT64;
typedef __int64 INT64;
@@ -44,10 +44,11 @@
typedef unsigned char BOOLEAN;
typedef unsigned char UINT8;
typedef char CHAR8;
- typedef char INT8;
+ typedef signed char INT8;
#else
//
// Assume standard AARCH64 alignment.
+ //
typedef unsigned long long UINT64;
typedef long long INT64;
typedef unsigned int UINT32;
@@ -58,7 +59,7 @@
typedef unsigned char BOOLEAN;
typedef unsigned char UINT8;
typedef char CHAR8;
- typedef char INT8;
+ typedef signed char INT8;
#endif
///
@@ -80,17 +81,23 @@ typedef INT64 INTN;
///
/// A value of native width with the highest bit set.
///
-#define MAX_BIT 0x8000000000000000
+#define MAX_BIT 0x8000000000000000ULL
///
/// A value of native width with the two highest bits set.
///
-#define MAX_2_BITS 0xC000000000000000
+#define MAX_2_BITS 0xC000000000000000ULL
///
/// Maximum legal AARCH64 address
///
-#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFF
+#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFFULL
+
+///
+/// Maximum legal AArch64 INTN and UINTN values.
+///
+#define MAX_INTN ((INTN)0x7FFFFFFFFFFFFFFFULL)
+#define MAX_UINTN ((UINTN)0xFFFFFFFFFFFFFFFFULL)
///
/// The stack alignment required for AARCH64