Don't use a potentially expensive shift if all we want is one set bit.
[oota-llvm.git] / lib / MC / MCAsmInfo.cpp
index de1095bf8acb2a19ad2016fc61e3d05861b5eb16..84e4075621beac2d51af2faacf9611d825bf9f55 100644 (file)
@@ -24,7 +24,7 @@ using namespace llvm;
 
 MCAsmInfo::MCAsmInfo() {
   PointerSize = 4;
-  CalleeSaveStackSlotSize = 0; // 0 means PointerSize is used in getter.
+  CalleeSaveStackSlotSize = 4;
 
   IsLittleEndian = true;
   StackGrowsUp = false;
@@ -34,6 +34,7 @@ MCAsmInfo::MCAsmInfo() {
   HasStaticCtorDtorReferenceInStaticMode = false;
   LinkerRequiresNonEmptyDwarfLines = false;
   MaxInstLength = 4;
+  MinInstAlignment = 1;
   PCSymbol = "$";
   SeparatorString = ";";
   CommentColumn = 40;
@@ -87,17 +88,17 @@ MCAsmInfo::MCAsmInfo() {
   SupportsDebugInformation = false;
   ExceptionsType = ExceptionHandling::None;
   DwarfUsesInlineInfoSection = false;
-  DwarfSectionOffsetDirective = 0;
   DwarfUsesRelocationsAcrossSections = true;
   DwarfRegNumForCFI = false;
   HasMicrosoftFastStdCallMangling = false;
+  NeedsDwarfSectionOffsetDirective = false;
 }
 
 MCAsmInfo::~MCAsmInfo() {
 }
 
 
-unsigned MCAsmInfo::getULEB128Size(unsigned Value) {
+unsigned MCAsmInfo::getULEB128Size(uint64_t Value) {
   unsigned Size = 0;
   do {
     Value >>= 7;
@@ -106,7 +107,7 @@ unsigned MCAsmInfo::getULEB128Size(unsigned Value) {
   return Size;
 }
 
-unsigned MCAsmInfo::getSLEB128Size(int Value) {
+unsigned MCAsmInfo::getSLEB128Size(int64_t Value) {
   unsigned Size = 0;
   int Sign = Value >> (8 * sizeof(Value) - 1);
   bool IsMore;