Created attachment 165773 [details]
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 :
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
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".
Created attachment 167165 [details]
Upgrade emulators/mednafen to 0.9.38.7
After upgrading the port to the currently-latest version 0.9.38.7 I was able to build it using clang38 without having to patch the assembly-code.
Not sure, if this really obsoletes Dimitry's patch...
emulators/mednafen was updated to 0.9.38.7. Thanks!