Mercurial > projects > ldc
comparison gen/asmstmt.cpp @ 1036:01544da4cdd8
Added ~{memory} clobber when a jump_target is generated in inline asm (branch out of inline asm)
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Tue, 03 Mar 2009 19:18:47 +0100 |
parents | 125c09006ac6 |
children | 1d8a8ecf14e1 |
comparison
equal
deleted
inserted
replaced
1035:4c524d80e6e1 | 1036:01544da4cdd8 |
---|---|
592 jump_target = DtoAlloca(LLType::Int32Ty, "__llvm_jump_target"); | 592 jump_target = DtoAlloca(LLType::Int32Ty, "__llvm_jump_target"); |
593 gIR->ir->CreateStore(DtoConstUint(0), jump_target); | 593 gIR->ir->CreateStore(DtoConstUint(0), jump_target); |
594 // setup variable for output from asm | 594 // setup variable for output from asm |
595 outSetterStmt->out_c = "=*m,"; | 595 outSetterStmt->out_c = "=*m,"; |
596 outSetterStmt->out.push_back(jump_target); | 596 outSetterStmt->out.push_back(jump_target); |
597 asmblock->clobs.insert("~{memory},"); | |
597 | 598 |
598 asmblock->s.push_back(outSetterStmt); | 599 asmblock->s.push_back(outSetterStmt); |
599 } | 600 } |
600 else | 601 else |
601 delete outSetterStmt; | 602 delete outSetterStmt; |