<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <meta charset="utf-8">
    <p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
      15px; clear: both; color: rgb(36, 39, 41); font-family: Arial,
      "Helvetica Neue", Helvetica, sans-serif; font-style:
      normal; font-variant-ligatures: normal; font-variant-caps: normal;
      font-weight: normal; letter-spacing: normal; orphans: 2;
      text-align: left; text-indent: 0px; text-transform: none;
      white-space: normal; widows: 2; word-spacing: 0px;
      -webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
      255);">I need to get the offset and the exact length of opcode
      corresponding to a particular LLVM IR instruction in x86
      architecture. I believe for this I must hack in backends.</p>
    <p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
      15px; clear: both; color: rgb(36, 39, 41); font-family: Arial,
      "Helvetica Neue", Helvetica, sans-serif; font-style:
      normal; font-variant-ligatures: normal; font-variant-caps: normal;
      font-weight: normal; letter-spacing: normal; orphans: 2;
      text-align: left; text-indent: 0px; text-transform: none;
      white-space: normal; widows: 2; word-spacing: 0px;
      -webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
      255);">I assume there is a way when the opcodes are being
      generated in x86 backend to dump their offsets and sizes. However,
      considering optimizations and translation of one IR instruction to
      multiple operations, I'm not sure whether the relation between a
      single IR instruction and its corresponding opcode is maintainable
      or not.</p>
    <p style="margin: 0px 0px 1em; padding: 0px; border: 0px; font-size:
      15px; clear: both; color: rgb(36, 39, 41); font-family: Arial,
      "Helvetica Neue", Helvetica, sans-serif; font-style:
      normal; font-variant-ligatures: normal; font-variant-caps: normal;
      font-weight: normal; letter-spacing: normal; orphans: 2;
      text-align: left; text-indent: 0px; text-transform: none;
      white-space: normal; widows: 2; word-spacing: 0px;
      -webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
      255);">My questions are:</p>
    <ul style="margin: 0px 0px 1em 30px; padding: 0px; border: 0px;
      font-size: 15px; list-style-type: disc; color: rgb(36, 39, 41);
      font-family: Arial, "Helvetica Neue", Helvetica,
      sans-serif; font-style: normal; font-variant-ligatures: normal;
      font-variant-caps: normal; font-weight: normal; letter-spacing:
      normal; orphans: 2; text-align: left; text-indent: 0px;
      text-transform: none; white-space: normal; widows: 2;
      word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-color: rgb(255, 255, 255);">
      <li style="margin: 0px 0px 0.5em; padding: 0px; border: 0px;
        font-size: 15px; word-wrap: break-word;">Is this in general
        possible?</li>
      <li style="margin: 0px; padding: 0px; border: 0px; font-size:
        15px; word-wrap: break-word;">How to hack the backend to dump
        the required informations? Is there a generic way to do so, or
        do I need to hack all backends?</li>
    </ul>
    <p>Thanks a lot.</p>
    <p>Mohsen<br>
    </p>
  </body>
</html>