<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 Feb 1, 2016, at 16:53, 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"><br class=""><div class="gmail_quote">On Fri, Jan 29, 2016 at 10:03 PM, Matt Arsenault <span dir="ltr" class=""><<a href="mailto:arsenm2@gmail.com" target="_blank" class="">arsenm2@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class=""><br class="">
> On Jan 29, 2016, at 13:25, Rail Shafigulin via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:<br class="">
><br class="">
><br class="">
><br class="">
> I think I understand it. But looks like I have everything labelled properly. Maybe I missed something. Here are more details:<br class="">
><br class="">
> defm SFEQ : SF<0x0, "l.sfeq", Escala_CC_EQ>;<br class="">
><br class="">
> multiclass SF<bits<5> op2Val, string asmstr, PatLeaf Cond> {<br class="">
> def _rr : SF_RR<op2Val, asmstr, Cond>;<br class="">
> def _ri : SF_RI<op2Val, asmstr, Cond>;<br class="">
> }<br class="">
><br class="">
> class SF_RR<bits<5> op2Val, string asmstr, PatLeaf Cond><br class="">
> : InstRR<0x9, (outs), (ins GPR:$rA, GPR:$rB),<br class="">
> !strconcat(asmstr, "\t$rA, $rB"),<br class="">
> [(Escalasetflag (i32 GPR:$rA), (i32 GPR:$rB), Cond)]> {<br class="">
> bits<5> op2;<br class="">
> bits<5> rA;<br class="">
> bits<5> rB;<br class="">
><br class="">
> let Inst{25-21} = op2;<br class="">
> let Inst{20-16} = rA;<br class="">
> let Inst{15-11} = rB;<br class="">
><br class="">
> let op2 = op2Val;<br class="">
> }<br class="">
><br class="">
<br class="">
</span>It sounds to me like you are missing the type for the output. If you’re setting an implicit register,<br class="">
you need something like [(set FLAGS, (Escalasetflag i32:$rA, i32:$rB, Cond))]. You also need a corresponding let Defs = [FLAGS], although that’s unrelated to the pattern problem. Assuming EFLAGS has a single type added to it, you don’t need to explicitly add one.<br class="">
<br class="">
Also note you should not need to specify the register class in the pattern. i32:$sA should work etc.<br class="">
<span class=""><font color="#888888" class=""><br class="">
-Matt</font></span></blockquote></div><br class=""></div><div class="gmail_extra">Let me clarify.<br class=""><br class=""></div><div class="gmail_extra">I'm not sure I understand what you are saying. Let me post more information.<br class=""><br class=""><div class="gmail_extra">Here is what I have defined for Escalasetflag<br class=""><br class="">def Escalasetflag : SDNode<"EscalaISD::SET_FLAG", SDT_EscalaSetFlag,<br class=""> [SDNPOutGlue]>;<br class=""><br class=""></div><div class="gmail_extra">How come it was working before and is is not working now? Clearly I'm missing something, but I can't figure out what.<br class=""><br class=""></div>Any help is appreciated.<br class=""></div><div class="gmail_extra"><br clear="all" class=""><br class="">-- <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><br class=""></div><div><br class=""></div><div>What is SDT_EscalaSetFlag?</div><br class=""></body></html>