summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Object/RelocVisitor.h8
-rw-r--r--lib/VMCore/Attributes.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/include/llvm/Object/RelocVisitor.h b/include/llvm/Object/RelocVisitor.h
index 7668bdedb7..17e52edd5d 100644
--- a/include/llvm/Object/RelocVisitor.h
+++ b/include/llvm/Object/RelocVisitor.h
@@ -80,17 +80,17 @@ private:
RelocToApply zeroExtend(RelocToApply r, char Width) {
if (Width == r.Width)
return r;
- r.Value &= (1 << ((Width * 8))) - 1;
+ r.Value &= (1LL << ((Width * 8))) - 1;
return r;
}
RelocToApply signExtend(RelocToApply r, char Width) {
if (Width == r.Width)
return r;
- bool SignBit = r.Value & (1 << ((Width * 8) - 1));
+ bool SignBit = r.Value & (1LL << ((Width * 8) - 1));
if (SignBit) {
- r.Value |= ~((1 << (Width * 8)) - 1);
+ r.Value |= ~((1LL << (Width * 8)) - 1);
} else {
- r.Value &= (1 << (Width * 8)) - 1;
+ r.Value &= (1LL << (Width * 8)) - 1;
}
return r;
}
diff --git a/lib/VMCore/Attributes.cpp b/lib/VMCore/Attributes.cpp
index 5a552c34e1..68aa954f61 100644
--- a/lib/VMCore/Attributes.cpp
+++ b/lib/VMCore/Attributes.cpp
@@ -281,14 +281,14 @@ bool AttrBuilder::hasAlignmentAttr() const {
uint64_t AttrBuilder::getAlignment() const {
if (!hasAlignmentAttr())
return 0;
- return 1U <<
+ return 1ULL <<
(((Bits & AttributesImpl::getAttrMask(Attributes::Alignment)) >> 16) - 1);
}
uint64_t AttrBuilder::getStackAlignment() const {
if (!hasAlignmentAttr())
return 0;
- return 1U <<
+ return 1ULL <<
(((Bits & AttributesImpl::getAttrMask(Attributes::StackAlignment))>>26)-1);
}