From: "Rémi Denis-Courmont" <remi@remlab.net> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH] tx_float_neon: Do not access outside stack. Date: Sun, 09 Oct 2022 19:54:46 +0300 Message-ID: <5611009.DvuYhMxLoT@basile.remlab.net> (raw) In-Reply-To: <21E7FD56-797E-49FF-8CC5-7FAEBFAC718F@gmx.de> Le sunnuntaina 9. lokakuuta 2022, 19.36.24 EEST Reimar Döffinger a écrit : > > While this fixes the ABI violation, it introduces multiple data > > dependencies on stack pointer due to write-back. > > That is true in principle, this is not done consistently at all. I have not checked the FFmpeg code base, but this *is* done consistently by compilers and in a number of other assembler-heavy project, notably the Linux kernel (see especially arch/arm64/crypto/*.S). > > The idiomatic way to do this is to allocate the entire needed stack space > > in the first store / last load, and use positive offsets elsewhence. > > Are you sure this is really relevant at all, considering it's so rarely done > in the code? I don't know what you base that statement on. I have rarely seen it not done that way. And even then, it mostly occurs inside loops, where it cannot fully be avoided and where there will be a couple of other instructions that don't suffer the data dependency. > Just to clarify the details, then end result should look like this? > - stp d8, d9, [sp, #-16] > - stp d10, d11, [sp, #-32] > - stp d12, d13, [sp, #-48] > - stp d14, d15, [sp, #-64] > + stp d14, d15, [sp, #-16*4]! > + stp d8, d9, [sp, #16*3] > + stp d10, d11, [sp, #16*2] > + stp d12, d13, [sp, #16] Yes. -- レミ・デニ-クールモン http://www.remlab.net/ _______________________________________________ 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".
prev parent reply other threads:[~2022-10-09 16:54 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-09 13:14 Reimar Döffinger 2022-10-09 14:11 ` Rémi Denis-Courmont 2022-10-09 16:36 ` Reimar Döffinger 2022-10-09 16:54 ` Rémi Denis-Courmont [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=5611009.DvuYhMxLoT@basile.remlab.net \ --to=remi@remlab.net \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git