Mercurial > projects > ldc
diff gen/tocall.cpp @ 1350:15e9762bb620
Adds explicit alignment information for alloca instructions in general, there's a few cases that still needs to be looked at but this should catch the majority. Fixes ticket #293 .
author | Tomas Lindquist Olsen <tomas.l.olsen gmail com> |
---|---|
date | Thu, 14 May 2009 13:26:40 +0200 |
parents | 459b6b6f9a8d |
children | 46f6365a50d7 |
line wrap: on
line diff
--- a/gen/tocall.cpp Wed May 13 18:08:40 2009 +0200 +++ b/gen/tocall.cpp Thu May 14 13:26:40 2009 +0200 @@ -169,7 +169,7 @@ if (Logger::enabled()) Logger::cout() << "d-variadic argument struct type:\n" << *vtype << '\n'; - LLValue* mem = DtoAlloca(vtype,"_argptr_storage"); + LLValue* mem = DtoRawAlloca(vtype, 0, "_argptr_storage"); // store arguments in the struct for (int i=begin,k=0; i<n_arguments; i++,k++) @@ -316,7 +316,7 @@ // return in hidden ptr is first if (retinptr) { - LLValue* retvar = DtoAlloca(argiter->get()->getContainedType(0), ".rettmp"); + LLValue* retvar = DtoRawAlloca(argiter->get()->getContainedType(0), 0, ".rettmp"); ++argiter; args.push_back(retvar); @@ -552,7 +552,7 @@ // pointer to a struct, store it to a stack slot before continuing. if (tf->next->ty == Tstruct && !isaPointer(retllval)) { Logger::println("Storing return value to stack slot"); - LLValue* mem = DtoAlloca(retllval->getType()); + LLValue* mem = DtoRawAlloca(retllval->getType(), 0); DtoStore(retllval, mem); retllval = mem; }