<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 29, 2016 at 10:03 PM, Matt Arsenault <span dir="ltr"><<a href="mailto:arsenm2@gmail.com" target="_blank">arsenm2@gmail.com</a>></span> wrote:<br><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>
> On Jan 29, 2016, at 13:25, Rail Shafigulin via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
><br>
><br>
> I think I understand it. But looks like I have everything labelled properly. Maybe I missed something. Here are more details:<br>
><br>
> defm SFEQ : SF<0x0, "l.sfeq", Escala_CC_EQ>;<br>
><br>
> multiclass SF<bits<5> op2Val, string asmstr, PatLeaf Cond> {<br>
> def _rr : SF_RR<op2Val, asmstr, Cond>;<br>
> def _ri : SF_RI<op2Val, asmstr, Cond>;<br>
> }<br>
><br>
> class SF_RR<bits<5> op2Val, string asmstr, PatLeaf Cond><br>
> : InstRR<0x9, (outs), (ins GPR:$rA, GPR:$rB),<br>
> !strconcat(asmstr, "\t$rA, $rB"),<br>
> [(Escalasetflag (i32 GPR:$rA), (i32 GPR:$rB), Cond)]> {<br>
> bits<5> op2;<br>
> bits<5> rA;<br>
> bits<5> rB;<br>
><br>
> let Inst{25-21} = op2;<br>
> let Inst{20-16} = rA;<br>
> let Inst{15-11} = rB;<br>
><br>
> let op2 = op2Val;<br>
> }<br>
><br>
<br>
</span>It sounds to me like you are missing the type for the output. If you’re setting an implicit register,<br>
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>
<br>
Also note you should not need to specify the register class in the pattern. i32:$sA should work etc.<br>
<span class=""><font color="#888888"><br>
-Matt</font></span></blockquote></div><br></div><div class="gmail_extra">Let me clarify.<br><br></div><div class="gmail_extra">I'm not sure I understand what you are saying. Let me post more information.<br><br><div class="gmail_extra">Here is what I have defined for Escalasetflag<br><br>def Escalasetflag : SDNode<"EscalaISD::SET_FLAG", SDT_EscalaSetFlag,<br> [SDNPOutGlue]>;<br><br></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><br></div>Any help is appreciated.<br></div><div class="gmail_extra"><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Rail Shafigulin<br></div>Software Engineer <br>Esencia Technologies<br></div></div></div></div>
</div></div>