Re: [PATCH v2] x86/lib: Use REP MOVSB for large memcpy() on ERMS CPUs without FSRM

From: Linus Torvalds

Date: Tue Nov 10 2026 - 14:59:11 EST


On Wed, 4 Nov 2026 at 14:28, Usama Arif <usama.arif@xxxxxxxxx> wrote:
>
> + ALTERNATIVE __stringify(cmpq $0x20, %rcx; jb .Lhandle_tail), \
> + __stringify(rep movsb; RET), X86_FEATURE_FSRM

Let's not do that.

Putting magic things like RET in alternatives is just a bad bad idea.

Linus