]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Ebc/ProcessorBind.h
1. UINTN & INTN issue for EBC architecture:
[mirror_edk2.git] / MdePkg / Include / Ebc / ProcessorBind.h
index cef769241b1fbe9cb92c8e3e6a16c4914b5242b5..5a6e7dc9bbdb58ce5bab9ceafd67bb09b9f43be5 100644 (file)
@@ -54,15 +54,13 @@ typedef unsigned long         UINTN;
 //\r
 // Scalable macro to set the most significant bit in a natural number\r
 //\r
 //\r
 // Scalable macro to set the most significant bit in a natural number\r
 //\r
-#define MAX_BIT     0x8000000000000000ULL \r
-#define MAX_2_BITS  0xC000000000000000ULL\r
-\r
+#define MAX_BIT     (1ULL << (sizeof (INTN) * 8 - 1)) \r
+#define MAX_2_BITS  (3ULL << (sizeof (INTN) * 8 - 2))\r
 \r
 //\r
 // Maximum legal EBC address\r
 //\r
 \r
 //\r
 // Maximum legal EBC address\r
 //\r
-#define MAX_ADDRESS   0xFFFFFFFFFFFFFFFFULL\r
-\r
+#define MAX_ADDRESS   ((UINTN) ~0)\r
 //\r
 // Modifier to ensure that all protocol member functions and EFI intrinsics\r
 // use the correct C calling convention. All protocol member functions and\r
 //\r
 // Modifier to ensure that all protocol member functions and EFI intrinsics\r
 // use the correct C calling convention. All protocol member functions and\r