From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 6B593458D8 for ; Mon, 27 Mar 2023 11:35:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0B3D168C912; Mon, 27 Mar 2023 14:35:02 +0300 (EEST) Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B1AEA68C2BA for ; Mon, 27 Mar 2023 14:34:55 +0300 (EEST) Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 32RBYsbW005767-32RBYsbX005767; Mon, 27 Mar 2023 14:34:54 +0300 Received: from foo.martin.st (host-97-187.parnet.fi [77.234.97.187]) by mail9.parnet.fi (Postfix) with ESMTPS id 029F2A1542; Mon, 27 Mar 2023 14:34:53 +0300 (EEST) Date: Mon, 27 Mar 2023 14:34:52 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: FFmpeg development discussions and patches In-Reply-To: <20230102230128.972907-1-ccom@randomderp.com> Message-ID: References: <20230102230128.972907-1-ccom@randomderp.com> MIME-Version: 1.0 X-FE-Policy-ID: 3:14:2:SYSTEM Subject: Re: [FFmpeg-devel] [PATCH] get_cabac_inline_x86: Don't inline if 32-bit Windows X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Christopher Degawa Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Mon, 2 Jan 2023, Christopher Degawa wrote: > previouslly, it only was an issue with 32-bit clang from msys2's > mingw32 repo, however, at some point with an update to gcc 12.2.0, > the same issue popped up. Tested with a clean clone of ffmpeg, and even > tested with n5.0, but the issue persists, so I presume it's a compiler > issue. > > Related: https://trac.ffmpeg.org/ticket/8903 > > Signed-off-by: Christopher Degawa > --- > libavcodec/x86/cabac.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/x86/cabac.h b/libavcodec/x86/cabac.h > index b046a56a6b..70f990db8d 100644 > --- a/libavcodec/x86/cabac.h > +++ b/libavcodec/x86/cabac.h > @@ -178,7 +178,7 @@ > #if HAVE_7REGS && !BROKEN_COMPILER > #define get_cabac_inline get_cabac_inline_x86 > static > -#if defined(_WIN32) && !defined(_WIN64) && defined(__clang__) > +#if defined(_WIN32) && !defined(_WIN64) > av_noinline > #else > av_always_inline > -- > 2.39.0 I'm ok with this change (although I'd reword the commit message a bit); the inline assembly here is brittle and it's easy to trigger this failure. It's very hard to say whether this is a compiler bug, or just our assembly crossing the line for what we can demand that the compiler accommodates, in combination with deep inlineing - the patch avoids inlineing the function which makes it much more possible to handle the inline assembly constraints. I and Hendrik discussed the issue on irc; I reproduced the issue with MSYS2's 32 bit GCC, and Hendrik also separately reproduced it with a separate build of GCC, by adding the options "-march=pentium4 -mtune=generic", which are MSYS2's current defaults, which trigger the failure (at least in mingw builds, with GCC 12.2.0). So if there's no reasonable opposition, I'd go ahead and push this patch with a slightly reworded commit message. // Martin _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".