<div class="gmail_quote">On Sun, May 8, 2011 at 2:41 AM, 陳韋任 <span dir="ltr"><<a href="mailto:chenwj@iis.sinica.edu.tw">chenwj@iis.sinica.edu.tw</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi, all<br>
<br>
  I am trying to add "not" instruction support to PTX backend.<br>
I add the line below in PTXInstrInfo.td,<br>
<br>
defm NOT : PTX_LOGIC<"not", not>;<br>
<br>
  But I get errors below,<br>
<br>
-------------------------------------------------------------------------------<br>
Included from PTX.td:75:<br>
PTXInstrInfo.td:732:10: error: Value 'PTX_LOGIC::opnode' of type 'SDNode' is incompatible with initializer 'not'<br>
defm NOT : PTX_LOGIC<"not", not>;<br>
         ^<br>
llvm[3]: Building PTX.td subtarget information with tblgen<br>
Included from PTX.td:75:<br>
PTXInstrInfo.td:732:10: error: Value 'PTX_LOGIC::opnode' of type 'SDNode' is incompatible with initializer 'not'<br>
defm NOT : PTX_LOGIC<"not", not>;<br>
         ^<br>
llvm[3]: Building PTX.td assembly writer with tblgen<br>
Included from PTX.td:75:<br>
PTXInstrInfo.td:732:10: error: Value 'PTX_LOGIC::opnode' of type 'SDNode' is incompatible with initializer 'not'<br>
defm NOT : PTX_LOGIC<"not", not>;<br>
         ^<br>
-------------------------------------------------------------------------------<br>
<br>
  How do I fix those errors?<br>
<br>
  I also see that multiclass PTX_LOGIC only handles 3 operand form,<br>
i.e., xor.pred d, a, b;. Should I add something to make PTX_LOGIC<br>
support 2 operand form?<br></blockquote><div><br></div><div>We're been writing multiclasses for each unique type of instruction.  The current PTX_LOGIC version is for 3-operand instructions.  A new multiclass needs to be created for 2-operand logic instructions.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
  Thanks.<br>
<br>
Regards,<br>
chenwj<br>
<br>
--<br>
Wei-Ren Chen (陳韋任)<br>
Computer Systems Lab, Institute of Information Science,<br>
Academia Sinica, Taiwan (R.O.C.)<br>
Tel:886-2-2788-3799 #1667<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div><br>