Mercurial > projects > ldc
diff gen/naked.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 | ea7b8b6c96c0 |
children | 8d086d552909 |
line wrap: on
line diff
--- a/gen/naked.cpp Wed May 13 18:08:40 2009 +0200 +++ b/gen/naked.cpp Thu May 14 13:26:40 2009 +0200 @@ -258,7 +258,7 @@ // generate asm as->out_c = "=*m,=*m,"; - LLValue* tmp = DtoAlloca(llretTy, ".tmp_asm_ret"); + LLValue* tmp = DtoRawAlloca(llretTy, 0, ".tmp_asm_ret"); as->out.push_back( tmp ); as->out.push_back( DtoGEPi(tmp, 0,1) ); as->code = "movd %eax, $<<out0>>" "\n\t" "mov %edx, $<<out1>>"; @@ -413,7 +413,7 @@ if (type->ty == Tstruct) { // make a copy - llvm::Value* mem = DtoAlloca(ret_type, ".__asm_tuple_ret"); + llvm::Value* mem = DtoAlloca(type, ".__asm_tuple_ret"); TypeStruct* ts = (TypeStruct*)type; size_t n = ts->sym->fields.dim;