/// getCalleeSaveStackSlotSize - Get the callee-saved register stack slot
/// size in bytes.
unsigned getCalleeSaveStackSlotSize() const {
- // If a target doesn't explicitly initialize this member, PointerSize is
- // used by default.
- if (CalleeSaveStackSlotSize == 0)
- return PointerSize;
- else
- return CalleeSaveStackSlotSize;
+ return CalleeSaveStackSlotSize;
}
/// isLittleEndian - True if the target is little endian.
MCAsmInfo::MCAsmInfo() {
PointerSize = 4;
- CalleeSaveStackSlotSize = 0; // 0 means PointerSize is used in getter.
+ CalleeSaveStackSlotSize = 4;
IsLittleEndian = true;
StackGrowsUp = false;
void MSP430MCAsmInfo::anchor() { }
MSP430MCAsmInfo::MSP430MCAsmInfo(const Target &T, StringRef TT) {
- PointerSize = 2;
+ PointerSize = CalleeSaveStackSlotSize = 2;
PrivateGlobalPrefix = ".L";
WeakRefDirective ="\t.weak\t";
IsLittleEndian = false;
if ((TheTriple.getArch() == Triple::mips64el) ||
- (TheTriple.getArch() == Triple::mips64))
- PointerSize = 8;
+ (TheTriple.getArch() == Triple::mips64)) {
+ PointerSize = CalleeSaveStackSlotSize = 8;
+ }
AlignmentIsInBytes = false;
Data16bitsDirective = "\t.2byte\t";
NVPTXMCAsmInfo::NVPTXMCAsmInfo(const Target &T, const StringRef &TT) {
Triple TheTriple(TT);
- if (TheTriple.getArch() == Triple::nvptx64)
- PointerSize = 8;
+ if (TheTriple.getArch() == Triple::nvptx64) {
+ PointerSize = CalleeSaveStackSlotSize = 8;
+ }
CommentString = "//";
void PPCMCAsmInfoDarwin::anchor() { }
PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(bool is64Bit) {
- if (is64Bit)
- PointerSize = 8;
+ if (is64Bit) {
+ PointerSize = CalleeSaveStackSlotSize = 8;
+ }
IsLittleEndian = false;
PCSymbol = ".";
SparcELFMCAsmInfo::SparcELFMCAsmInfo(const Target &T, StringRef TT) {
IsLittleEndian = false;
Triple TheTriple(TT);
- if (TheTriple.getArch() == Triple::sparcv9)
- PointerSize = 8;
+ if (TheTriple.getArch() == Triple::sparcv9) {
+ PointerSize = CalleeSaveStackSlotSize = 8;
+ }
Data16bitsDirective = "\t.half\t";
Data32bitsDirective = "\t.word\t";