<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    (Sorry Florian, I forgot to "reply to list"!)<br>
    <br>
    Hi Florian!<br>
    <br>
    Forget Cminusminus.org, in my experience it seems to have diverged
    from the GHC version of Cminusminus.<br>
    <br>
    I would recommend these resources<br>
    <br>
    <ol>
      <li>See the top of <a class="moz-txt-link-freetext"
          href="https://github.com/ghc/ghc/blob/master/compiler/cmm/CmmParse.y">https://github.com/ghc/ghc/blob/master/compiler/cmm/CmmParse.y</a><br>
      </li>
      <li>Be ready to occasionally look into <a
          class="moz-txt-link-freetext"
          href="https://github.com/ghc/ghc/blob/master/includes/Cmm.h">https://github.com/ghc/ghc/blob/master/includes/Cmm.h</a></li>
      <li>Edward Yang's blog post is a must-read <a
          class="moz-txt-link-freetext"
          href="http://blog.ezyang.com/2013/07/no-grammar-no-problem/">http://blog.ezyang.com/2013/07/no-grammar-no-problem/</a>
        (less than a year old)</li>
      <li>You can also get the big picture of Cmm from David Terei's
        bachelor thesis: <a class="moz-txt-link-freetext"
href="https://davidterei.com/downloads/papers/terei:2009:honours_thesis.pdf">https://davidterei.com/downloads/papers/terei:2009:honours_thesis.pdf</a></li>
      <li>2 years ago, Simon Marlow extended the classical Cmm syntax to
        make it much nicer:
        <a class="moz-txt-link-freetext"
href="https://github.com/ghc/ghc/commit/a7c0387d20c1c9994d1100b14fbb8fb4e28a259e">https://github.com/ghc/ghc/commit/a7c0387d20c1c9994d1100b14fbb8fb4e28a259e</a></li>
      <li>The commentary (it is kinda outdated in my experience, but
        worth taking a look :)), <a class="moz-txt-link-freetext"
          href="https://ghc.haskell.org/trac/ghc/wiki/Commentary/Rts/Cmm">https://ghc.haskell.org/trac/ghc/wiki/Commentary/Rts/Cmm</a>
        <b>and</b>
        <a class="moz-txt-link-freetext"
          href="https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/CmmType">https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/CmmType</a><br>
      </li>
      <li>Read the code! There's a lot of Cmm files and after looking at
        various parts of it for a while parts start to make sense :)</li>
      <li>Shameless plug: You might find sections 4.2 and 4.2.1 from my
        master thesis helpful to understand the difference between
        arguments and fields. <a class="moz-txt-link-freetext"
          href="http://arashrouhani.com/papers/master-thesis.pdf">http://arashrouhani.com/papers/master-thesis.pdf</a><br>
      </li>
    </ol>
    And it will take time to learn Cmm. The most unintuitive thing for
    me that took me a while to understand is that there are no function
    calls in "classical" cmm code. The newer syntax allows function
    calls but you should know that they are kind of magical. Hope this
    helps! :)<br>
    <br>
    (Sorry for giving so many reading references :p)<br>
    <br>
    Cheers,<br>
    Arash<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 2014-05-03 12:05, Florian Weimer
      wrote:<br>
    </div>
    <blockquote cite="mid:87iopntbx4.fsf@mid.deneb.enyo.de" type="cite">
      <pre wrap="">I'm looking for a specification of C--.  I can't find it on the
cminuscminus.org web site, and it's also not included in the release
tarball.  Does anybody know where to get it?
_______________________________________________
ghc-devs mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a>
<a class="moz-txt-link-freetext" href="http://www.haskell.org/mailman/listinfo/ghc-devs">http://www.haskell.org/mailman/listinfo/ghc-devs</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>