<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>I think carter has it still right that it happens in the
      backends.</p>
    <p>If a new backend doesn't support these we could move this up into
      Cmm though without much issue I think.<br>
    </p>
    <div class="moz-cite-prefix">Am 28/10/2021 um 23:12 schrieb Carter
      Schonwald:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAHYVw0ymoYp_F8z0zjJ7rfeypDzt_R+J-ohwMQ3N8cWvBvON2g@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">I think thats done on a per backend basis (though
        theres been a lot of changes since i last looked at some of the
        relevent pieces). (i'm actually based in Cambridge MA for the
        next 1-2 years if you wanna brain storm IRL sometime)<br>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Thu, Oct 28, 2021 at 4:59
          PM Norman Ramsey <<a href="mailto:nr@cs.tufts.edu"
            moz-do-not-send="true" class="moz-txt-link-freetext">nr@cs.tufts.edu</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On
          x86, GHC can translate 8-bit and 16-bit operations directly<br>
          into the 8-bit and 16-bit machine instructions that the
          hardware<br>
          supports.  But there are other platforms on which the smallest<br>
          unit of arithmetic may be 32 or even 64 bits.  Is there a
          central<br>
          module in GHC that can take care of rewriting 8-bit and 16-bit
          operations<br>
          into 32-bit or 64-bit operations?  Or is each back end on its
          own<br>
          for this?<br>
          <br>
          (One of my students did some nice work on implementing this
          transformation<br>
          with a minimal set of sign-extension and zero-extension
          operations:<br>
          <a href="https://www.cs.tufts.edu/~nr/pubs/widen.pdf"
            rel="noreferrer" target="_blank" moz-do-not-send="true"
            class="moz-txt-link-freetext">https://www.cs.tufts.edu/~nr/pubs/widen.pdf</a>.)<br>
          <br>
          <br>
          Norman<br>
          _______________________________________________<br>
          ghc-devs mailing list<br>
          <a href="mailto:ghc-devs@haskell.org" target="_blank"
            moz-do-not-send="true" class="moz-txt-link-freetext">ghc-devs@haskell.org</a><br>
          <a
            href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs"
            rel="noreferrer" target="_blank" moz-do-not-send="true"
            class="moz-txt-link-freetext">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
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://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a>
</pre>
    </blockquote>
  </body>
</html>