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 DADDC44103 for ; Fri, 26 Aug 2022 08:35:02 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 70A4468BA2E; Fri, 26 Aug 2022 11:34:58 +0300 (EEST) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 49BD468B4E4 for ; Fri, 26 Aug 2022 11:34:52 +0300 (EEST) Received: by mail-lf1-f48.google.com with SMTP id l1so1087163lfk.8 for ; Fri, 26 Aug 2022 01:34:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc; bh=YVs+5CNI+ZmwH7HUEP1z2oW1B7aH5QhipPPT9wF4VN4=; b=BYvifcv6QctJ+t4bU4gRc/UdZCplFUp1Y5vcm8/t7K+0OlcHSAVS67wzLpyIPFQoQI IkdmPQ+6VfjrDANR+loFbHfbYF3YkefrDsDGAIXmcfpbHIM3R2taOhi2crXvjmtlq95f 3G4Ak/X+RHogsPb2oGkZ60cvQ0Sj6tWyKxQhriG5qwECrxFDkj2181BMj8CifdC0Vv35 oHnxMRd/Hh1o3svU1auWhUbXhp6Pm4UW9sYzjkQRg6B8ghoMBf5/oF58wELB8xQLfo7J PkhqDMy1fyzqJQnR1NNtfsdwFiTHax6FFNf4vFCqG8mhDRe+NXZAZ937idW+08SYekc1 0EzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc; bh=YVs+5CNI+ZmwH7HUEP1z2oW1B7aH5QhipPPT9wF4VN4=; b=yS3Cq3wsQ7+4RPzT/c4XdumXzIuY2tVTMODpoMRkaaMW2g/U8/PMBtQ0peemjyyg9K M/k9YcrqI0OezSMhmBUjudZ2GijngDTtjpWGYRNxQZXrWsLDGrkMWCJmaai3M/XlbRaU HholOvpfWn7yXKJcuixVhEcWTH+J6z9ZyyK12beS4S8FJnEQLg7Wbj6PtcnYsyt3C6Kt LlBVuG4IzFmjpVEfhvkFrcKtpIMqgZOFAG4q4hFyJy08wa63YDtXAGPvaD7DuzBWEzD2 pGnvkhgOMvCpFD+AD4IfDEqFbO4vW8IcFVhrTZip1wl52V894wV3zyjaRs5w2F39bysf pZLA== X-Gm-Message-State: ACgBeo3jDR3bqY6Enl9anZpSxDfasmWnEOAb0UjrVfQeDflNZUbuAKmX uH8dYG+hVjou67J67X/hB+jFPvAwFRoYZJ2e X-Google-Smtp-Source: AA6agR44gaBO8bY0mKelct2+UsUExhxdxCvTWpsLDrVsQ+tfscKSPBl+udCxQeOZd7FC/wumaph+Lg== X-Received: by 2002:a19:6402:0:b0:492:967c:1758 with SMTP id y2-20020a196402000000b00492967c1758mr2078196lfb.92.1661502891444; Fri, 26 Aug 2022 01:34:51 -0700 (PDT) Received: from localhost.localdomain (dsl-tkubng21-58c01c-243.dhcp.inet.fi. [88.192.28.243]) by smtp.gmail.com with ESMTPSA id m10-20020a056512358a00b0048b279fa9a7sm295577lfr.231.2022.08.26.01.34.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Aug 2022 01:34:50 -0700 (PDT) From: =?UTF-8?q?Martin=20Storsj=C3=B6?= To: ffmpeg-devel@ffmpeg.org Date: Fri, 26 Aug 2022 11:34:49 +0300 Message-Id: <20220826083450.2867072-1-martin@martin.st> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] arm: Skip certain inline assembly functions if built without optimizations 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: These inline assembly functions rely on being inlined into the caller, so that the parameter "int p" can be a known assembly time constant, instead of a variable parameter. __OPTIMIZE__ is a built-in define which is set by both GCC and Clang (the two main compilers supporting our inline assembly) when optimizations are enabled. This fixes building for arm targets with optimizations disabled. --- With older GCC versions, the inline assembly in libavcodec/arm/aac.h also might need to be disabled, but it does build successfully with optimizations disabled with modern LLVM and GCC, so not touching it immediately as part of this patch. --- libavutil/arm/intmath.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavutil/arm/intmath.h b/libavutil/arm/intmath.h index 5311a7d52b..67a8e72dc0 100644 --- a/libavutil/arm/intmath.h +++ b/libavutil/arm/intmath.h @@ -62,6 +62,7 @@ static av_always_inline av_const int av_clip_int16_arm(int a) return x; } +#ifdef __OPTIMIZE__ #define av_clip_intp2 av_clip_intp2_arm static av_always_inline av_const int av_clip_intp2_arm(int a, int p) { @@ -77,6 +78,7 @@ static av_always_inline av_const unsigned av_clip_uintp2_arm(int a, int p) __asm__ ("usat %0, %2, %1" : "=r"(x) : "r"(a), "i"(p)); return x; } +#endif #define av_sat_add32 av_sat_add32_arm static av_always_inline int av_sat_add32_arm(int a, int b) -- 2.25.1 _______________________________________________ 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".