summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2012-03-09 14:52:44 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2012-03-09 14:52:44 +0000
commitc72fdf4490d44fd0d1546f965e11398ccf467273 (patch)
tree4fcd9f6be38e2692280a8490c11292c188225fc1
parentaebd3da46daf14363dfabacd5e65ca6cbeeb7908 (diff)
downloadbcm5719-llvm-c72fdf4490d44fd0d1546f965e11398ccf467273.tar.gz
bcm5719-llvm-c72fdf4490d44fd0d1546f965e11398ccf467273.zip
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
-rw-r--r--llvm/utils/TableGen/CodeEmitterGen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/CodeEmitterGen.cpp b/llvm/utils/TableGen/CodeEmitterGen.cpp
index 91d8446bc8e..3943e8a40f8 100644
--- a/llvm/utils/TableGen/CodeEmitterGen.cpp
+++ b/llvm/utils/TableGen/CodeEmitterGen.cpp
@@ -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;
OpenPOWER on IntegriCloud