[libav-bugs] [Bug 507] New: suncc can not compile inline asm

bugzilla-daemon at aruru.libav.org bugzilla-daemon at aruru.libav.org
Tue May 7 15:37:32 CEST 2013


           Summary: suncc can not compile inline asm
           Product: Libav
           Version: git HEAD
          Platform: SPARC
               URL: http://fate.libav.org/sparc-solaris-suncc
        OS/Version: Other
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: general
        AssignedTo: bugzilla at libav.org
        ReportedBy: michael.kostylev at gmail.com

The configure script checks for inline asm support earlier than any
optimizations get enabled:

enabled vis && check_inline_asm vis '"pdist %f0, %f0, %f0"'
check_optflags $optflags

Unfortunately, suncc can compile inline asm only with optimizations enabled:
A workaround is to pass --extra-cflags=-O5 to configure. However, even this
is not enough to make suncc happy, later the compiler complains about some
register variables defined in libavcodec/sparc/vis.h (suncc simply does not
support them on sparc). The usage of register variables comes from another
issue of vis.h - the lack of normal asm mnemonics. According to the authors
comment, this was done for a purpose:

/* You may be asking why I hard-code the instruction opcodes and don't
 * use the normal VIS assembler mnenomics for the VIS instructions.
 * The reason is that Sun, in their infinite wisdom, decided that a binary
 * using a VIS instruction will cause it to be marked (in the ELF headers)
 * as doing so, and this prevents the OS from loading such binaries if the
 * current cpu doesn't have VIS.  There is no way to easily override this
 * behavior of the assembler that I am aware of.

First, there is no run-time vis detection in libav, so the sunos behavior is
perfectly ok. Second, a similar problem is already solved for x86.

Configure bugmail: https://bugzilla.libav.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the libav-bugs mailing list