Message ID | 20220912155333.59843-3-remi@remlab.net |
---|---|
State | New |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b1c:b0:96:9ee8:5cfd with SMTP id c28csp163021pzh; Mon, 12 Sep 2022 08:54:04 -0700 (PDT) X-Google-Smtp-Source: AA6agR7rRT1ARtbRbhfoapXQVPSXv9g/rTUCb+PrDQXYwlQijMAMXwHpRGQHNtlvGhXIWRFRaWvd X-Received: by 2002:aa7:cc8a:0:b0:446:7668:2969 with SMTP id p10-20020aa7cc8a000000b0044676682969mr6507393edt.206.1662998044242; Mon, 12 Sep 2022 08:54:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662998044; cv=none; d=google.com; s=arc-20160816; b=AFSUWaPkR9c6IF5elcpH09vKP71eX9l91nL5TrIveLuVmrGYG3y34Ma1qnDgsylziI Or43I/jlQR6+bRr3ySOl3mMZ1s2/Tm6/v8rqaMrLyD2rwsD5SMslf64HB/grv/gxryQJ 9HLIZP4keTF1vp5aN3e6n21DLBb3pInntaSISEfSAwuUD2BXQzWykbvniJW8ss7BPSUe 4rg6wpMtaK1CAUl7u4Kzccv6R3YqDZd08NKSVBcJLxytjqhW/vrtZdv8SsFkF869r7TI KDYwWGnP+m3buO3f78GAyb2ScPiwkfTM53nrpiPgR0Wll3SzVR/rVr2B+7QOx7gZJwoC ydUg== 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:references:in-reply-to:message-id :date:to:from:delivered-to; bh=ONZBQHtoJvrfNV/QO568SnsxRZmyZnJQQeRezT+R7iE=; b=EqZezQw24PBeK5pa2937qN4G4yrPgoc788fEx4bd4UVOmywO3b/ywaSuSJXaqkUghe ZQHp5BjTWu5+2nDktilDqAXJsEg+pvgrbYnCgvhqze98VfJ3lLfMkpkAbNjSLas5ww37 OGzk4H1JNR1T3hN+zgd/sHmfJ9FaJkoZ7LVKmY5jrTmMITlBOIBRFRJEmAScMzcdbq5u T9nEijeU/v2hc+c6Mdp2YNAAxMA6Ah6couVnUPEvvwUKcJuANs/UYZrLZ1hDRxKUQeIh nsR2aS4UAOXXRuO16dpckdv9i1XMIFHZJEmAXQdbxOAHtRPkSfiKZqQ41btMIVVtRQED 2k0A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id dt12-20020a170907728c00b0076f0a1c1501si3902490ejc.698.2022.09.12.08.54.03; Mon, 12 Sep 2022 08:54:04 -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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B190F68BB4C; Mon, 12 Sep 2022 18:53:43 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from ursule.remlab.net (vps-a2bccee9.vps.ovh.net [51.75.19.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C217A68BB38 for <ffmpeg-devel@ffmpeg.org>; Mon, 12 Sep 2022 18:53:34 +0300 (EEST) Received: from basile.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id 74580C00AF for <ffmpeg-devel@ffmpeg.org>; Mon, 12 Sep 2022 18:53:34 +0300 (EEST) From: remi@remlab.net To: ffmpeg-devel@ffmpeg.org Date: Mon, 12 Sep 2022 18:53:18 +0300 Message-Id: <20220912155333.59843-3-remi@remlab.net> X-Mailer: git-send-email 2.37.2 In-Reply-To: <2652141.mvXUDI8C0e@basile.remlab.net> References: <2652141.mvXUDI8C0e@basile.remlab.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 03/18] configure/riscv: detect fast CLZ X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> X-TUID: kVXV1hJT7sfP |
Series |
[FFmpeg-devel,01/18] doc: reference the RISC-V specification
|
expand
|
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/configure b/configure index 9e51abd0d3..b7dc1d8656 100755 --- a/configure +++ b/configure @@ -5334,6 +5334,12 @@ elif enabled ppc; then ;; esac +elif enabled riscv; then + + if test_cpp_condition stddef.h "__riscv_zbb"; then + enable fast_clz + fi + elif enabled sparc; then case $cpu in
From: Rémi Denis-Courmont <remi@remlab.net> RISC-V defines the CLZ instruction as part of the ratified Zbb subset of the (not yet ratified) bit mapulation extension (B). We can detect it from the __riscv_zbb predefined constant. At least GCC 12 already supports this correctly. Note that the macro will be non-zero if supported, zero if enabled in the compiler flags (e.g. -march=rv64gzbb) but not known to the compiler, and undefined otherwise. --- configure | 6 ++++++ 1 file changed, 6 insertions(+)