Mercurial > projects > ldc
comparison gen/asmstmt.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 | 7d28dcbff23e |
children | 2292878925f4 |
comparison
equal
deleted
inserted
replaced
1349:a376776e2301 | 1350:15e9762bb620 |
---|---|
598 // finalize code | 598 // finalize code |
599 outSetterStmt->code = code.str(); | 599 outSetterStmt->code = code.str(); |
600 outSetterStmt->code += asmGotoEndLabel.str()+":\n"; | 600 outSetterStmt->code += asmGotoEndLabel.str()+":\n"; |
601 | 601 |
602 // create storage for and initialize the temporary | 602 // create storage for and initialize the temporary |
603 jump_target = DtoAlloca(LLType::Int32Ty, "__llvm_jump_target"); | 603 jump_target = DtoAlloca(Type::tint32, "__llvm_jump_target"); |
604 gIR->ir->CreateStore(DtoConstUint(0), jump_target); | 604 gIR->ir->CreateStore(DtoConstUint(0), jump_target); |
605 // setup variable for output from asm | 605 // setup variable for output from asm |
606 outSetterStmt->out_c = "=*m,"; | 606 outSetterStmt->out_c = "=*m,"; |
607 outSetterStmt->out.push_back(jump_target); | 607 outSetterStmt->out.push_back(jump_target); |
608 | 608 |