mirror of
https://github.com/intel/llvm.git
synced 2026-01-25 10:55:58 +08:00
TableGen/CodeEmitterGen.cpp: Fix an expression of generating bitmask.
~0U might be i32 on 32-bit hosts, then (uint64_t)~0U might not be expected as (i64)0xFFFFFFFF_FFFFFFFF, but as (i64)0x00000000_FFFFFFFF. llvm-svn: 152407
This commit is contained in:
@@ -163,7 +163,7 @@ AddCodeToMergeInOperand(Record *R, BitsInit *BI, const std::string &VarName,
|
||||
--bit;
|
||||
}
|
||||
|
||||
uint64_t opMask = ~0U >> (64-N);
|
||||
uint64_t opMask = ~(uint64_t)0 >> (64-N);
|
||||
int opShift = beginVarBit - N + 1;
|
||||
opMask <<= opShift;
|
||||
opShift = beginInstBit - beginVarBit;
|
||||
|
||||
Reference in New Issue
Block a user