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 EC52B47934 for ; Wed, 27 Sep 2023 16:25:38 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3882768CAEE; Wed, 27 Sep 2023 19:25:36 +0300 (EEST) Received: from ursule.remlab.net (vps-a2bccee9.vps.ovh.net [51.75.19.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 145BC68CA79 for ; Wed, 27 Sep 2023 19:25:30 +0300 (EEST) Received: from basile.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id 73B45C016E for ; Wed, 27 Sep 2023 19:25:29 +0300 (EEST) From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= To: ffmpeg-devel@ffmpeg.org Date: Wed, 27 Sep 2023 19:25:29 +0300 Message-Id: <20230927162529.74679-1-remi@remlab.net> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] Revert "lavu/timer: remove gratuitous volatile" 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: It does not make much sense to me, but GCC somehow optimises the inline assembler way even when the output are very obviously used. This reverts commit 09731fbfc3a914ec4f6ffad60aa9062db6a8f6aa. --- libavutil/riscv/timer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/riscv/timer.h b/libavutil/riscv/timer.h index df1a730b5e..174b469cbe 100644 --- a/libavutil/riscv/timer.h +++ b/libavutil/riscv/timer.h @@ -29,13 +29,13 @@ static inline uint64_t ff_read_time(void) #if (__riscv_xlen >= 64) uintptr_t cycles; - __asm__ ("rdtime %0" : "=r" (cycles)); + __asm__ volatile ("rdtime %0" : "=r" (cycles)); #else uint64_t cycles; uint32_t hi, lo, check; - __asm__ ( + __asm__ volatile ( "1: rdtimeh %0\n" " rdtime %1\n" " rdtimeh %2\n" -- 2.40.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".