From patchwork Sat May 23 18:29:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Storsj=C3=B6?= X-Patchwork-Id: 19818 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 88BBE44BA0E for ; Sat, 23 May 2020 21:35:25 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5EBD668A7E1; Sat, 23 May 2020 21:35:25 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F1E3A6880BC for ; Sat, 23 May 2020 21:35:18 +0300 (EEST) Received: by mail-lj1-f195.google.com with SMTP id z13so6850254ljn.7 for ; Sat, 23 May 2020 11:35:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=Ot8I+3NcF5LmwzRwSnqCh6gPRIT6lfYhe88tBuKmSZg=; b=LqFVbtjiktxV0PhcSto/aEYneIY0V8wHc70mm78twc4pqiG2OlEoivnFe0f1Jye/CR kqxc/xjn5tbo2ANKK3I3lLWAieUnivf0hfRDi8h1YfGDjbJJ4Mi7xN9sC29TxJ9exFqV gYHdWyfshf/NYTIdiNpkIYFBn9F6hBr2pcJnQhJAiQk63/MezRce+Xhv5RJ88O/NBvPm KCi5B0ZP+KWRA34csorpnd1LZ3DM+CE5e2GhW12yt9ieyUNDPmaSWJrFHB9syfNIuLsu FIni7jfb1zIVHR3bwMrkCa3gMqDIPNjLUENz1IE1bbfomPlNRQogPodOl2//htbxrzGO 9o+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=Ot8I+3NcF5LmwzRwSnqCh6gPRIT6lfYhe88tBuKmSZg=; b=lVjVkiheTOjx5g4NG7REcyAkxcxJdrMmNcgXJlB7cNyyifpCt9Qcjr0ZxMdF0dZ9UR 0TGtwLiGFj0FsYhzaDtj2PsqUoxXepl2MenLwqyeMfOVh6j9Felxv5NPsg1TbaSriFrX J3aaOxC0mADHkv6IOBjlvlO9iW/d6xR4BO+unWmaUOckJXH3R0cIJi1m8gEYOTvSc0wh LxfwOgNwUZq17cV1CkH8heCOPgIujS0wQuczOIob2rxFadEwAg8AUk17PyWOxtkLEah+ 7sGgYRzFUTigxNk9/a5XAPccxa/eVL2O30zA7cMb+cwhu2bjDLyZrMg4ntbhf3Phy8jU 3kWw== X-Gm-Message-State: AOAM532iiUhttkI5B7vYFLgmUX+Iwi6VsXEOImoPeSi81e7jogaRbqmO vyxiW53ZkiXfYiqng6jD/El2tNakgX0= X-Google-Smtp-Source: ABdhPJzVqjEla9NcwJWPtk3D6ym1nT1sXAPQ3vUqk8AnoLEHWMAHL5h4WtxYpMQ6j5eyA0zjZ9+pnw== X-Received: by 2002:a2e:780a:: with SMTP id t10mr9892491ljc.247.1590258558734; Sat, 23 May 2020 11:29:18 -0700 (PDT) Received: from localhost.localdomain (dsl-tkubng21-58c01c-243.dhcp.inet.fi. [88.192.28.243]) by smtp.gmail.com with ESMTPSA id v126sm3260846lfa.50.2020.05.23.11.29.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 May 2020 11:29:18 -0700 (PDT) From: =?utf-8?q?Martin_Storsj=C3=B6?= To: ffmpeg-devel@ffmpeg.org Date: Sat, 23 May 2020 21:29:17 +0300 Message-Id: <20200523182917.11853-1-martin@martin.st> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH] x86: cabac: Disable the inline asm on clang on windows on i386 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The cabac inline assembly is very brittle to assemble properly on i386 windows with clang; libavcodec/hevc_cabac.c fails to build in the default mode (which is -march=pentium4), it only works if ffmpeg is configured with --cpu=i686 (translating to -march=i686), and likewise, the inline assembly fails to assemble in libavcodec/h264_cabac.c if building with optimizations disabled. Instead of trying to step around the problem (and end up bit by it occasionally), just disable the inline assembly for this configuration. --- 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 cfd3b759c9..5f1b97cec0 100644 --- a/libavcodec/x86/cabac.h +++ b/libavcodec/x86/cabac.h @@ -27,7 +27,7 @@ #include "libavutil/x86/asm.h" #include "config.h" -#if (defined(__i386) && defined(__clang__) && (__clang_major__<2 || (__clang_major__==2 && __clang_minor__<10)))\ +#if (defined(__i386) && defined(__clang__) && (__clang_major__<2 || (__clang_major__==2 && __clang_minor__<10)) || defined(_WIN32))\ || ( !defined(__clang__) && defined(__llvm__) && __GNUC__==4 && __GNUC_MINOR__==2 && __GNUC_PATCHLEVEL__<=1)\ || (defined(__INTEL_COMPILER) && defined(_MSC_VER)) # define BROKEN_COMPILER 1