[Bug 86997] New: non-portable x86/x86_64 inline assembly

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Dec 4 01:18:39 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=86997

            Bug ID: 86997
           Summary: non-portable x86/x86_64 inline assembly
           Product: Spice
           Version: unspecified
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: protocol
          Assignee: spice-bugs at lists.freedesktop.org
          Reporter: timo.teras at iki.fi

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:
http://git.alpinelinux.org/cgit/aports/tree/main/spice/fix-non-x86-build.patch

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-bugs/attachments/20141204/120a1ea0/attachment.html>


More information about the spice-bugs mailing list