Alignment of a va_arg must be at least as large as the ABI's minimum alignment.

llvm-svn: 137420
This commit is contained in:
Akira Hatanaka 2011-08-12 02:30:14 +00:00
parent 22c55d180d
commit ae31c7af1c
1 changed files with 1 additions and 0 deletions

View File

@ -3082,6 +3082,7 @@ llvm::Value* MipsABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
AddrTyped = Builder.CreateBitCast(Addr, PTy);
llvm::Value *AlignedAddr = Builder.CreateBitCast(AddrTyped, BP);
TypeAlign = std::max(TypeAlign, MinABIStackAlignInBytes);
uint64_t Offset =
llvm::RoundUpToAlignment(CGF.getContext().getTypeSize(Ty) / 8, TypeAlign);
llvm::Value *NextAddr =