forked from OSchip/llvm-project
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:
parent
aebd3da46d
commit
c72fdf4490
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue