<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Anitha,<br>
    <br>
    memri is just describing that the address contains two components,
    an immediate and a register, and how to handle them in the
    instruction printer. The STWU expects a memri operand, and that is
    what is passed from the Pat.<br>
    <br>
    Hope that helps,<br>
    Sam<br>
    <br>
    <div class="moz-cite-prefix">On 07/04/2013 10:19, Anitha B Gollamudi
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAMHf9jLCCWcKBc_sv1OLg7-OA6UbW4yy9ZoOD=LO8SFdwDv5Sg@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <div dir="ltr">
        <div>Hi,<br>
          <br>
          <br>
        </div>
        How do "Pat" operands get matched? I am trying to follow the
        example given in <a moz-do-not-send="true"
          href="http://llvm.org/docs/CodeGenerator.html#selectiondag-process">http://llvm.org/docs/CodeGenerator.html#selectiondag-process</a><br
          clear="all">
        <div>
          <div><br>
          </div>
          <div>In the latest trunk of <a moz-do-not-send="true"
              href="http://ppcintrinfo.td">ppcintrinfo.td</a> following
            pattern is defined:<br>
            <br>
            def : Pat<(pre_store i32:$rS, iPTR:$ptrreg,
            iaddroff:$ptroff),<br>
                          (STWU $rS, iaddroff:$ptroff, $ptrreg)>;<br>
            <br>
          </div>
          <div>I understand that input operand list i.e. ins of stwu
            should get matched with the given pre_store. But I am
            confused as to how  "ptroff" and "ptrreg" get matched with
            "memri" used in STWU?<br>
            <br>
            <br>
          </div>
          <div>For reference[1] memri is defined as:<br>
            <br>
            <table cellpadding="0" cellspacing="0">
              <tbody>
                <tr class="" id="l386">
                  <td class="">def memri :Operand<iPTR> {
                  </td>
                </tr>
                <tr class="" id="l387">
                  <td class=""><br>
                  </td>
                  <td class="">let PrintMethod = "printMemRegImm";
                  </td>
                </tr>
                <tr class="" id="l388">
                  <td class=""><br>
                  </td>
                  <td class=""> let MIOperandInfo = (ops dispRI:$imm, 
                    ptr_rc_nor0:$reg);
                  </td>
                </tr>
                <tr class="" id="l389">
                  <td class=""><br>
                  </td>
                  <td class=""> let EncoderMethod = "getMemRIEncoding";</td>
                </tr>
              </tbody>
            </table>
            }<br>
          </div>
          <div><br>
          </div>
          <div>[1] <a moz-do-not-send="true"
href="https://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td?view=markup">https://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td?view=markup</a><br>
          </div>
          <div>-- <br>
            <i style="font-family:times new roman,serif"><b> Anitha</b></i><br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>