]> granicus.if.org Git - clang/commitdiff
Set MinABIStackAlignInBytes to 8 if ABI is N32/64.
authorAkira Hatanaka <ahatanaka@mips.com>
Thu, 3 Nov 2011 00:05:50 +0000 (00:05 +0000)
committerAkira Hatanaka <ahatanaka@mips.com>
Thu, 3 Nov 2011 00:05:50 +0000 (00:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143597 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/TargetInfo.cpp

index 83cddb2d80aacba7eb7ddacc2ed3f23bc4014502..2bd341ce2187e2b13e3dad4333f87f8af6bacdb0 100644 (file)
@@ -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: