diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-02-08 00:29:31 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-02-08 00:29:31 +0000 |
commit | 23cbb1c78a6de399b318f68577469b0a566b0faa (patch) | |
tree | c31dcc6815834cd53d16888937ea72acab6a4e88 /lib/ExecutionEngine/Interpreter/Execution.cpp | |
parent | 785a5ae0cf2a13738ba42f6c91fd42397d20c200 (diff) |
For PR1188:
Compute BitMask correctly.
Patch by Leo (wenwenti@hotmail.com).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34026 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/Interpreter/Execution.cpp')
-rw-r--r-- | lib/ExecutionEngine/Interpreter/Execution.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp index 565915bb5a..fe80dfddd6 100644 --- a/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -1307,7 +1307,7 @@ void Interpreter::visitAShr(BinaryOperator &I) { #define INTEGER_ASSIGN(DEST, BITWIDTH, VAL) \ { \ - uint64_t Mask = (1ull << BITWIDTH) - 1; \ + uint64_t Mask = ~(uint64_t)(0ull) >> (64-BITWIDTH); \ if (BITWIDTH == 1) { \ Dest.Int1Val = (bool) (VAL & Mask); \ } else if (BITWIDTH <= 8) { \ |