libavcodec/x86/ac3dsp_init.c:149:9: error: ran out of registers during register allocation MIX5(IF0, IF1); ^ libavcodec/x86/ac3dsp_init.c:66:9: note: expanded from macro 'MIX5' "movss 0(%1), %%xmm5 \n" \ ^ libavcodec/x86/ac3dsp_init.c:153:9: error: ran out of registers during register allocation MIX5(IF1, IF0); ^ libavcodec/x86/ac3dsp_init.c:66:9: note: expanded from macro 'MIX5' "movss 0(%1), %%xmm5 \n" \ ^ How-To-Repeat: Try to compile MPlayer with a recent version of Clang (eg., r186084).
Based on a discussion on #llvm at irc.oftc.net: - The assembly core of Clang is inherently different from that of GCC. One would have to fully reimplement the GCC assembly core to yield matching behaviors in all cases. This is obviously not going to happen. - The -fomit-frame-pointer option would free up 1 needed register. - Someone said that the inline assembly version of the code should be just dropped, because the C version is faster. The attached patch simply cancels the attempted use of 7 registers if the compiler is Clang.
Responsible Changed From-To: freebsd-ports-bugs->miwi miwi@ wants this submitter's PRs (via the GNATS Auto Assign Tool)
Maintainer of multimedia/mplayer, Please note that PR ports/180564 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/180564 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Responsible Changed From-To: miwi->freebsd-ports-bugs back to pool
If I am not mistaken, this problem only occurs on i386 if you are forcing clang on it. (The port does not declare clang support on i386 as of now.) It's therefore not terribly urgent, right? If you concur, I would include the patch for the clang build problem bundled with a bigger patch in a couple of weeks. Best regards Riggs
Thomas Zander wrote: > this problem only occurs on i386 if you are forcing clang on it. I am not "forcing" Clang. I have 2 compilers installed: Clang (at some fancy, non-base path) and GCC 4.6 (from the ports). The CC environment variable is set to /path/to/clang (CXX and CPP are set appropriately), but the MPlayer port would be free to use GCC 4.6.
Okay, approved. Can be committed. Thank you and best regards Riggs
State Changed From-To: feedback->open Maintainer approved.
Author: tijl Date: Fri Oct 18 07:45:48 2013 New Revision: 330729 URL: http://svnweb.freebsd.org/changeset/ports/330729 Log: Fix build on i386 with clang. Some inline asm requires 7 registers but only 6 are available because clang assumes the stack is 4-byte aligned and there's a local variable that requires 16-byte alignment so the stack has to be realigned which requires one register to be used as frame pointer. PR: ports/180564 Submitted by: dt71@gmx.com Approved by: Thomas Zander <thomas.e.zander@googlemail.com> (maintainer) Added: head/multimedia/mplayer/files/patch-libavcodec-x86-ac3dsp_init.c (contents, props changed) Modified: head/multimedia/mplayer/Makefile.options Modified: head/multimedia/mplayer/Makefile.options ============================================================================== --- head/multimedia/mplayer/Makefile.options Fri Oct 18 07:44:30 2013 (r330728) +++ head/multimedia/mplayer/Makefile.options Fri Oct 18 07:45:48 2013 (r330729) @@ -50,7 +50,7 @@ CFLAGS+= -O -fomit-frame-pointer .endif #DEBUG #Supported architectures for clang -.if ${ARCH} == "amd64" +.if ${ARCH} == "amd64" || ${ARCH} == "i386" MPLAYER_CLANG_SUPPORTED_ARCH= yes .endif Added: head/multimedia/mplayer/files/patch-libavcodec-x86-ac3dsp_init.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/mplayer/files/patch-libavcodec-x86-ac3dsp_init.c Fri Oct 18 07:45:48 2013 (r330729) @@ -0,0 +1,11 @@ +--- ffmpeg/libavcodec/x86/ac3dsp_init.c 2013-07-03 21:34:20.000000000 +0200 ++++ ffmpeg/libavcodec/x86/ac3dsp_init.c 2013-07-03 21:34:45.000000000 +0200 +@@ -51,7 +51,7 @@ + extern void ff_ac3_extract_exponents_sse2 (uint8_t *exp, int32_t *coef, int nb_coefs); + extern void ff_ac3_extract_exponents_ssse3(uint8_t *exp, int32_t *coef, int nb_coefs); + +-#if ARCH_X86_32 && defined(__INTEL_COMPILER) ++#if ARCH_X86_32 && (defined(__INTEL_COMPILER) || defined(__clang__)) + # undef HAVE_7REGS + # define HAVE_7REGS 0 + #endif _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Committed in r330729.
Responsible Changed From-To: freebsd-ports-bugs->tijl Committed in r330729.