From b551dd31f6b15aa959127ee906084fcf5bf0154e Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Thu, 3 Nov 2011 00:05:50 +0000 Subject: [PATCH] Set MinABIStackAlignInBytes to 8 if ABI is N32/64. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143597 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/TargetInfo.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp index 83cddb2d80..2bd341ce21 100644 --- a/lib/CodeGen/TargetInfo.cpp +++ b/lib/CodeGen/TargetInfo.cpp @@ -2992,11 +2992,12 @@ void MSP430TargetCodeGenInfo::SetTargetAttributes(const Decl *D, namespace { class MipsABIInfo : public ABIInfo { - static const unsigned MinABIStackAlignInBytes = 4; bool IsO32; + unsigned MinABIStackAlignInBytes; llvm::Type* HandleStructTy(QualType Ty) const; public: - MipsABIInfo(CodeGenTypes &CGT, bool _IsO32) : ABIInfo(CGT), IsO32(_IsO32) {} + MipsABIInfo(CodeGenTypes &CGT, bool _IsO32) : + ABIInfo(CGT), IsO32(_IsO32), MinABIStackAlignInBytes(IsO32 ? 4 : 8) {} ABIArgInfo classifyReturnType(QualType RetTy) const; ABIArgInfo classifyArgumentType(QualType RetTy) const; @@ -3005,8 +3006,6 @@ public: CodeGenFunction &CGF) const; }; -const unsigned MipsABIInfo::MinABIStackAlignInBytes; - class MIPSTargetCodeGenInfo : public TargetCodeGenInfo { unsigned SizeOfUnwindException; public: -- 2.40.0