kernel/x86_64: Use VZEROALL to clear XMM/YMM/etc. registers when available.

It comes with AVX, so enable it if we've enabled AVX.

This also adjusts altcodepatch_replace to explicitly set NOPs
for the remainder of the patch area.

Change-Id: Ia07549851d86836ff5428635b580c751b4e5b2a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10867
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
Augustin Cavalier
2026-05-04 00:03:54 +00:00
committed by waddlesplash
parent 009b56e781
commit facff75dd4
5 changed files with 14 additions and 1 deletions
@@ -24,6 +24,7 @@
#define ALTCODEPATCH_TAG_CLAC 2
#define ALTCODEPATCH_TAG_XSAVE 3
#define ALTCODEPATCH_TAG_XRSTOR 4
#define ALTCODEPATCH_TAG_CLEAR_FPU 5
#ifdef _ASSEMBLER