<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 2, 2015, at 7:01 PM, Rail Shafigulin <<a href="mailto:rail@esenciatech.com" class="">rail@esenciatech.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><span class=""></span><div class="">You shouldn’t need to modify the the MachineFunction to do that. Just emit the extra MCInst directly. The ARM backend does things analogous to this for some of its MC level pseudo-instructions that might prove useful as examples you could adapt.</div><br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">After looking at multiple options this was exactly my conclusion. Do you mind pointing me to the code in ARM that does that?<br class=""></div></div></div></div></div></blockquote><div><br class=""></div><div>There’s a giant switch statement in ARMAsmPrinter::EmitInstruction() that does a lot of it. The ARM::BMOVPCRX_CALL case does multiple instruction expansion from a single MachineInstr.</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></div><div class=""> <br class=""></div></div>-- <br class=""><div class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">Rail Shafigulin<br class=""></div>Software Engineer <br class="">Esencia Technologies<br class=""></div></div></div></div>
</div></div>
</div></blockquote></div><br class=""></body></html>