<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - AVR llvm-mc tests fail on big-endian (s390x) hosts"
   href="https://bugs.llvm.org/show_bug.cgi?id=43384">43384</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>AVR llvm-mc tests fail on big-endian (s390x) hosts
          </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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Backend: AVR
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>me@dylanmckay.io
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>tstellar@redhat.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, sguelton@redhat.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The AVR llvm-mc tests are failing on s390x, because the encoding information
for the instructions are missing.  The root cause is the byte swapping that the
AVRMCCodeEmitter::emitInstruction() function does.

Why is it necessary to swap the bytes like this?

Here is an example failure:

********************
FAIL: LLVM :: MC/AVR/syntax-reg-pair.s (22490 of 32518)
******************** TEST 'LLVM :: MC/AVR/syntax-reg-pair.s' FAILED
********************
Script:
--
: 'RUN: at line 1';   /root/llvm-project/llvm-build/bin/llvm-mc -triple avr
-mattr=addsubiw -show-encoding <
/root/llvm-project/llvm/test/MC/AVR/syntax-reg-pair.s |
/root/llvm-project/llvm-build/bin/FileCheck
/root/llvm-project/llvm/test/MC/AVR/syntax-reg-pair.s
--
Exit Code: 1

Command Output (stderr):
--
/root/llvm-project/llvm/test/MC/AVR/syntax-reg-pair.s:10:10: error: CHECK:
expected string not found in input
; CHECK: sbiw r24, 1 ; encoding: [0x01,0x97]
         ^
<stdin>:1:2: note: scanning from here
 .text
 ^
<stdin>:5:2: note: possible intended match here
 sbiw r24, 1 ; encoding: [0x00,0x00]
 ^

--</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>