[Bug 206376] Fix emulators/mednafen build with clang 3.8.0 (or recent versions of gcc)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Jan 18 18:54:09 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206376

            Bug ID: 206376
           Summary: Fix emulators/mednafen build with clang 3.8.0 (or
                    recent versions of gcc)
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: acm at FreeBSD.org
          Reporter: dim at FreeBSD.org
          Assignee: acm at FreeBSD.org
             Flags: maintainer-feedback?(acm at FreeBSD.org)

Created attachment 165773
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=165773&action=edit
Use local asm labels to prevent problems with unrolling

During the exp-run in bug 206074, it was found that emulators/mednafen gives
errors with a recent clang 3.8.0 snapshot [1]:

    OwlResampler.cpp:447:39: error: invalid symbol redefinition
    "movups  0(%%" X86_REGC "di), %%xmm0\n\t"
                                      ^
    <inline asm>:7:2: note: instantiated into assembly here
            SSE_Loop:
            ^

This is because a named asm label should not be used in an inline function.  If
the function is used while unrolling a loop, as in this case, it will lead to
duplicated asm labels.  Note that gcc 4.7 and higher also complain similarly,
when used with optimization.

The fix is to use a local label, "1:", and jump to it using "jnz 1b".

[1]
http://package18.nyi.freebsd.org/data/headamd64PR206074-default/2016-01-15_15h26m58s/logs/errors/libxul-38.5.2.log

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list