feat(arch): add the AVX512-FP16 FMA families to the extension layer

Assisted-by: GLM 5.3 Flash
This commit is contained in:
petrbalvin committed 2026-10-07 18:58:49 +02:00
1 parent 87493d9391
commit 8080e0acef
3 files changed
+406 -10

No files matched your search

+20 -2
View File
@@ -58,6 +58,24 @@ func TestAmd64ExtensionRegistry(t *testing.T) {
{"VRNDSCALEPH", 3},
{"VREDUCEPH", 3},
{"VGETMANTPH", 3},
{"VFMADD132PH", 3},
{"VFMADD213PH", 3},
{"VFMADD231PH", 3},
{"VFMSUB132PH", 3},
{"VFMSUB213PH", 3},
{"VFMSUB231PH", 3},
{"VFMADDSUB132PH", 3},
{"VFMADDSUB213PH", 3},
{"VFMADDSUB231PH", 3},
{"VFMSUBADD132PH", 3},
{"VFMSUBADD213PH", 3},
{"VFMSUBADD231PH", 3},
{"VFMADD132SH", 1},
{"VFMADD213SH", 1},
{"VFMADD231SH", 1},
{"VFMSUB132SH", 1},
{"VFMSUB213SH", 1},
{"VFMSUB231SH", 1},
} {
cands, ok := LookupExtension(arch.AMD64, tt.mnem)
if !ok {
@@ -71,8 +89,8 @@ func TestAmd64ExtensionRegistry(t *testing.T) {
t.Errorf("the %s lookup is not case-insensitive", tt.mnem)
}
}
if got := arch.Extensions(arch.AMD64); len(got) != 121 {
t.Errorf("the amd64 layer registers %d instructions, want 121", len(got))
if got := arch.Extensions(arch.AMD64); len(got) != 163 {
t.Errorf("the amd64 layer registers %d instructions, want 163", len(got))
}
if _, ok := LookupExtension(arch.AMD64, "NOSUCHINSTR"); ok {
t.Error("a non-extended mnemonic resolved")