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 D91264793D for ; Wed, 27 Sep 2023 17:03:42 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E842F68CB10; Wed, 27 Sep 2023 20:03:40 +0300 (EEST) Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 73C1168CAED for ; Wed, 27 Sep 2023 20:03:33 +0300 (EEST) Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 38RH3Wnl026243-38RH3Wnm026243 for ; Wed, 27 Sep 2023 20:03:32 +0300 Received: from foo.martin.st (host-97-144.parnet.fi [77.234.97.144]) by mail9.parnet.fi (Postfix) with ESMTPS id 4DCA1A1448 for ; Wed, 27 Sep 2023 20:03:32 +0300 (EEST) Date: Wed, 27 Sep 2023 20:03:31 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: FFmpeg development discussions and patches In-Reply-To: <20230927162529.74679-1-remi@remlab.net> Message-ID: <93fe4b6d-daf-8ee0-6381-5a374d52d5@martin.st> References: <20230927162529.74679-1-remi@remlab.net> MIME-Version: 1.0 X-FE-Policy-ID: 3:14:2:SYSTEM X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [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-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-15"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Wed, 27 Sep 2023, R=E9mi Denis-Courmont wrote: > 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 >=3D 64) > uintptr_t cycles; > > - __asm__ ("rdtime %0" : "=3Dr" (cycles)); > + __asm__ volatile ("rdtime %0" : "=3Dr" (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 LGTM // Martin _______________________________________________ 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".