From patchwork Sun Sep 17 18:49:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 43760 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:bca2:b0:149:dfde:5c0a with SMTP id fx34csp1529811pzb; Sun, 17 Sep 2023 11:49:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHgIu/W9vSWYvYKu1jv8FEK3Xcx6qQbkxC0fy45X2wCZ4658RGRe9b9L9ZyxSNAWhlPuI0i X-Received: by 2002:aa7:d545:0:b0:523:41e1:705e with SMTP id u5-20020aa7d545000000b0052341e1705emr5616357edr.21.1694976582991; Sun, 17 Sep 2023 11:49:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694976582; cv=none; d=google.com; s=arc-20160816; b=iPLYMuWGMEM1bduXS7H9z5XfNPbCb1ZffYrtDrI6mI5rymEiyA3vOCXUmbvbwdyysB 2fwTx5RzQj3sEnH+xfbEJs2IQ41kncpvZl8Lfhg25DdctxUCFsHYSkcGCikGt8JzSj22 fiBItQOTWZ3UN3RSAtMeou3Bl4qsCIbJJe/wTnrE2JzAq1APVo2aTzjLu/5qpC+suwPP jpDtNLslzdfd/qjQVn55tNPcGDsVvT1V7RSsHLyYCyKNzhUKOFHa2eLyKrFJCAS7UNEq oPHhSiXJznIy5kr5iA3PKDLSXHMg0gyw0u4baph7T2YDxPWtgsQ2u2O67KjS9DiH7mdD Ze4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=v+l2/WcjotHD18BVA5MI5aDY5QhweoyvFUrDHutAGBU=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=mWGj4epz1smAE1ThaNMFRZO0zsx76ezJKwdlgvKZwjKFI+ciEW8hiD7qNdMES3uqbj oRRRZOPV7ygDoouY4SzJbEe6NA/UgRdRPtNgcTvh6JcoesAji1hw+anhCyYyPDZigQf0 rr3N6dGGswMTnemaQvcf6ClZr4KOYuojVFInFl/SE7EXqu+O2FcVoIW25o+okxwxlQJp AvXIsxCf6ZZKd6Zks8pYlbzMaUkgrCi/jFB5kQZF1IS+rHrsjW0ql2v7TXGDi0ajZaFU UAGURqMkPpHyh10w0gxTnP+ZCBa813BfwG9gr2heP503qddGO9R9f6v38J17UcHVn82w JmTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=BXkoAMOk; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id eg36-20020a05640228a400b00530d5a6ad7esi2512089edb.253.2023.09.17.11.49.42; Sun, 17 Sep 2023 11:49:42 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=BXkoAMOk; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4B47D68C809; Sun, 17 Sep 2023 21:49:38 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-oo1-f43.google.com (mail-oo1-f43.google.com [209.85.161.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5AEEB68C63A for ; Sun, 17 Sep 2023 21:49:31 +0300 (EEST) Received: by mail-oo1-f43.google.com with SMTP id 006d021491bc7-5733d431209so2396389eaf.0 for ; Sun, 17 Sep 2023 11:49:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694976568; x=1695581368; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=cIdGB6BmNb/J+8ull8H7uJZmZpJ3nAXWJWFQ0dP/QfY=; b=BXkoAMOkRBUGDWqF0YoSHkPaFDJ35n7zhuOoXzBerVzmergWPA3Hsds3XWzAju1qyw jfciAlKRoRRpHrwvHw9fuRchLb4rxCzUmHJJhU4CJYarJjeM5Vnvwu91D+q3QFvjnJ8M oUMU7aq2l0hPmcLDN9+ofTPMblKhYuU5QNCMtB3v8gAIccTVsa9tn6puQOc1zEsSz10S CeLUIwzFalKG/ckafCFgFBHisGerIb48R5US8FYcUSv5z+lj5UaOCkb+CN0f3enVy5uR DoMXhN74T9sid008eEAy0lBVdihhVtQVDXaz2oO4jbZDpquHgjp6dHNLqMiDTQ/bc52O /ELQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694976568; x=1695581368; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cIdGB6BmNb/J+8ull8H7uJZmZpJ3nAXWJWFQ0dP/QfY=; b=Ih4MVDdkUwawPnxuSntthk1VyupUd47a3jmiCxpp8Uc0toPzEM6DEHkBj128q+O8so 5p2axm7ma/Q2oKKAIMqzHIOIr1NLDwTuTqA3rgffE/VcvonusNG2G/FV53JT5pKc6jUs pPQ/iooXqFBGCVKGt/gYG8Di6W+WzFq3IC2kqxzoelnwMHk3ztXA0jEje775S48AwkDQ XZFqxPlc8WeeGBcqSFPE2MQ1lcIKnDPSZ5SdOorzOazKJaO1qf7Hm/qlf59HXljhQ8ci 9/OSsrdM0MOXdcQzo3g88GZWnRvKg3JhAMsE2BoBtJGVr+7d2y/eHA3Wt2GpOhFPVOGT fwig== X-Gm-Message-State: AOJu0YxdCd4IzBvn1peorqW22NR54iVNiU7mG2lubi9My5+WSq8MD+TP 0JF4QiWdb6ii2vT/UYhsmimtFkM4sSU= X-Received: by 2002:a05:6870:819e:b0:1c8:c313:3e0d with SMTP id k30-20020a056870819e00b001c8c3133e0dmr9696347oae.46.1694976568197; Sun, 17 Sep 2023 11:49:28 -0700 (PDT) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id k20-20020a05687022d400b001cc9bc7b569sm4149956oaf.27.2023.09.17.11.49.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 11:49:27 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sun, 17 Sep 2023 15:49:15 -0300 Message-ID: <20230917184915.16678-1-jamrial@gmail.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] configure: rework parsing --cpu arguments to support all features unless blacklisted 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: p/4CZ9M3FGjP Keeping an ever growing list of CPUs just to pass -march to the compiler and enable fast_cmov is a waste of time. Every CPU we know has limitations is already handled here, so just fallback to enabling everything when a passed in argument is not covered by those. This will enable optimizations for CPU architectures released in the past 7 or so years with supported GCC and clang compilers when using them as argument in configure, instead of silently ignoring them. Signed-off-by: James Almer --- configure | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/configure b/configure index bd7f7697c8..27602c8e14 100755 --- a/configure +++ b/configure @@ -5445,20 +5445,18 @@ elif enabled x86; then cpuflags="-march=$cpu" disable i686 ;; - # targets that do support nopl and conditional mov (cmov) - i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64*|k8*|opteron*|athlon-fx\ - |core*|atom|bonnell|nehalem|westmere|silvermont|sandybridge|ivybridge|haswell|broadwell|skylake*|knl\ - |amdfam10|barcelona|b[dt]ver*|znver*) - cpuflags="-march=$cpu" - enable i686 - enable fast_cmov - ;; # targets that do support conditional mov but on which it's slow pentium4|pentium4m|prescott|nocona) cpuflags="-march=$cpu" enable i686 disable fast_cmov ;; + # everything else should support nopl and conditional mov (cmov) + *) + cpuflags="-march=$cpu" + enable i686 + enable fast_cmov + ;; esac fi