<html>
    <head>
      <base href="https://bugs.freedesktop.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 - non-portable x86/x86_64 inline assembly"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=86997">86997</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>non-portable x86/x86_64 inline assembly
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Spice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

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

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

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>protocol
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>spice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>timo.teras@iki.fi
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Both the protocol part (and the now removed client part) seem to have some
x86/x86_64 specific inline assembly in it making the code unportable. After
removing the client issue spice compiles, but e.g. qemu with spice enable still
fails to compile due to protocol.

For reference the client patch I used is to just remove the debug breakpoint:
<a href="http://git.alpinelinux.org/cgit/aports/tree/main/spice/fix-non-x86-build.patch">http://git.alpinelinux.org/cgit/aports/tree/main/spice/fix-non-x86-build.patch</a>

The inline assembly protocol part is in
spice-common/spice-protocol/spice/barrier.h.

Qemu build on ARM fails with:

  CC    hw/display/qxl.o
  CC    hw/display/qxl-logger.o
  CC    hw/display/qxl-render.o
{standard input}: Assembler messages:
{standard input}:1593: Error: bad instruction `lock'
{standard input}:1593: Error: bad instruction `addl $0,0(%rsp)'
{standard input}:1740: Error: bad instruction `lock'
{standard input}:1740: Error: bad instruction `addl $0,0(%rsp)'
{standard input}:3882: Error: bad instruction `lock'
{standard input}:3882: Error: bad instruction `addl $0,0(%rsp)'
  CC    hw/dma/puv3_dma.o
{standard input}:6349: Error: bad instruction `lock'
{standard input}:6349: Error: bad instruction `addl $0,0(%rsp)'
  CC    hw/dma/rc4030.o
{standard input}:9162: Error: bad instruction `lock'
{standard input}:9162: Error: bad instruction `addl $0,0(%rsp)'
{standard input}:10359: Error: bad instruction `lock'
{standard input}:10359: Error: bad instruction `addl $0,0(%rsp)'
{standard input}:10674: Error: bad instruction `lock'
{standard input}:10674: Error: bad instruction `addl $0,0(%rsp)'
/home/buildozer/aports/main/qemu/src/qemu-2.1.2/rules.mak:31: recipe for target
'hw/display/qxl.o' failed
make: *** [hw/display/qxl.o] Error 1

The bad instructions come from spice's barrier.h.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>