comparison gen/abi-x86-64.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 f3b92d26ad0f
children 45aca7e7cc88
comparison
equal deleted inserted replaced
1349:a376776e2301 1350:15e9762bb620
453 if (v->isLVal()) { 453 if (v->isLVal()) {
454 lval = v->getLVal(); 454 lval = v->getLVal();
455 } else { 455 } else {
456 // No memory location, create one. 456 // No memory location, create one.
457 LLValue* rval = v->getRVal(); 457 LLValue* rval = v->getRVal();
458 lval = DtoAlloca(rval->getType()); 458 lval = DtoRawAlloca(rval->getType(), 0);
459 DtoStore(rval, lval); 459 DtoStore(rval, lval);
460 } 460 }
461 461
462 const LLType* pTy = getPtrToType(DtoType(dty)); 462 const LLType* pTy = getPtrToType(DtoType(dty));
463 return DtoLoad(DtoBitCast(lval, pTy), "get-result"); 463 return DtoLoad(DtoBitCast(lval, pTy), "get-result");
477 if (v->isLVal()) { 477 if (v->isLVal()) {
478 lval = v->getLVal(); 478 lval = v->getLVal();
479 } else { 479 } else {
480 // No memory location, create one. 480 // No memory location, create one.
481 LLValue* rval = v->getRVal(); 481 LLValue* rval = v->getRVal();
482 lval = DtoAlloca(rval->getType()); 482 lval = DtoRawAlloca(rval->getType(), 0);
483 DtoStore(rval, lval); 483 DtoStore(rval, lval);
484 } 484 }
485 485
486 LLType* abiTy = getAbiType(dty); 486 LLType* abiTy = getAbiType(dty);
487 assert(abiTy && "Why are we rewriting a non-rewritten type?"); 487 assert(abiTy && "Why are we rewriting a non-rewritten type?");