summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MdePkg/Library/BaseLib/Math64.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/MdePkg/Library/BaseLib/Math64.c b/MdePkg/Library/BaseLib/Math64.c
index 83d7684721..9624cf9002 100644
--- a/MdePkg/Library/BaseLib/Math64.c
+++ b/MdePkg/Library/BaseLib/Math64.c
@@ -86,7 +86,7 @@ InternalMathARShiftU64 (
//
// Test if this compiler supports arithmetic shift
//
- TestValue = (((-1) << (sizeof (-1) * 8 - 1)) >> (sizeof (-1) * 8 - 1));
+ TestValue = (INTN)((INT64)(1ULL << 63) >> 63);
if (TestValue == -1) {
//
// Arithmetic shift is supported