mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
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
This commit is contained in:
@ -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) { \
|
||||
|
Reference in New Issue
Block a user