Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Martin Storsjö via ffmpeg-devel" <ffmpeg-devel@ffmpeg.org>
To: "Rémi Denis-Courmont" <remi@remlab.net>
Cc: "FFmpeg development discussions and patches"
	<ffmpeg-devel@ffmpeg.org>,
	harish.rajaselvan@multicorewareinc.com,
	"Martin Storsjö" <martin@martin.st>
Subject: [FFmpeg-devel] Re: [DISCUSSION] Adding ARM64EC support to FFmpeg
Date: Fri, 3 Oct 2025 18:11:55 +0300 (EEST)
Message-ID: <69f14534-71f-3bc3-f82a-8865f79bab78@martin.st> (raw)
In-Reply-To: <FB2707BE-DF44-4401-8BB2-5133F0DE1C98@remlab.net>

On Fri, 3 Oct 2025, Rémi Denis-Courmont wrote:

> Le 3 octobre 2025 15:44:56 GMT+03:00, "Martin Storsjö via ffmpeg-devel" <ffmpeg-devel@ffmpeg.org> a écrit :
>> First off, calling a C function, which turns out to be in x86_64 mode, 
>> will clobber those registers.
>
> Will it? I thought code JITed from x86_64 to AArch64 could *not* access 
> the reserved registers, and that was why they were forbidden (which 
> barely makes sense to me).

The JITed code itself probably doesn't don't use those registers, no, and 
probably not the JIT compiler itself either. I'm not entirely sure about 
which case actually would clobber them - but I'm told this is a case that 
can do it. Perhaps there's some serialization to/from CONTEXT in some of 
the transitions (perhaps when invoking the JIT compiler?).

> But again, the use case seems very unclear.

Requesting us to provide premade builds for this mode seems very unclear, 
yes - that sounds unreasonable to me.

Wanting to use the libav* libraries in a hybrid x86_64/arm64ec process 
seems like something quite plausible though. Not something I'd go out of 
my way to complicate other things to accomplish, but reasonable build 
system tweaks to allow such builds sound tolerable to me.

> I'm sure some people are using x86 FFmpeg on Arm, but how do you 
> credibly end up with an AArch64 FFmpeg inside an Arm64EC process?

I don't quite understand what you mean here. Do you mean how one does to 
end up with the aarch64 assembly touching all registers, in an arm64ec 
process? Or how one does to retrofit an aarch64 ffmpeg DLL into an arm64ec 
process?

For the former - it works just fine to build and assemble our current 
aarch64 assembly, unmodified, with both MSVC and LLVM build tools. Both of 
them complain loudly about code touching the unavailable registers, but it 
still builds fine, and runs fine in practice.

// Martin
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

  reply	other threads:[~2025-10-03 15:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-22 10:04 [FFmpeg-devel] " harish.rajaselvan--- via ffmpeg-devel
2025-09-22 11:48 ` [FFmpeg-devel] " Martin Storsjö via ffmpeg-devel
2025-09-23 13:03   ` Harish Raja Selvan via ffmpeg-devel
2025-09-24 12:15     ` Martin Storsjö via ffmpeg-devel
2025-09-30  4:58       ` Harish Raja Selvan via ffmpeg-devel
2025-10-03 12:27         ` Martin Storsjö via ffmpeg-devel
2025-09-27  9:00 ` Rémi Denis-Courmont via ffmpeg-devel
2025-10-03 12:44   ` Martin Storsjö via ffmpeg-devel
2025-10-03 14:32     ` Rémi Denis-Courmont via ffmpeg-devel
2025-10-03 15:11       ` Martin Storsjö via ffmpeg-devel [this message]
2025-10-03 16:39         ` Rémi Denis-Courmont via ffmpeg-devel
2025-10-03 20:49           ` Stephen Hutchinson via ffmpeg-devel
2025-10-04  8:43             ` Rémi Denis-Courmont via ffmpeg-devel

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=69f14534-71f-3bc3-f82a-8865f79bab78@martin.st \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=harish.rajaselvan@multicorewareinc.com \
    --cc=martin@martin.st \
    --cc=remi@remlab.net \
    /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 http://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/ http://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