<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - fp128 constants in llvm assembly are not written or parsed as per the language reference"
   href="http://llvm.org/bugs/show_bug.cgi?id=16527">16527</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>fp128 constants in llvm assembly are not written or parsed as per the language reference
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>LLVM assembly language parser
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>flld0@greynode.net
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=10808" name="attach_10808" title="source code to print an fp128 with just a sign bit">attachment 10808</a> <a href="attachment.cgi?id=10808&action=edit" title="source code to print an fp128 with just a sign bit">[details]</a></span>
source code to print an fp128 with just a sign bit

fp128 constants, when printed in llvm assembly, come out in neither big nor
little endian order, but rather with the sign bit in the middle.

According to the language reference, fp128 constants should be represented in
big-endian order: "All hexadecimal formats are big-endian (sign bit at the
left)."

I believe the problem is in the AsmWriter, where printing of long constants is
handled by iterating over the 64-bit words of an APInt in order of increasing
address.

Parsing is consistent with printing, so one's as broken as the other (however
broken you might judge that to be).


Please note: The "component" field of the bug submission form seems to be
somewhat out of data with respect to the current state of the code. This is a
bug in the AsmParser and AsmWriter.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>