feat(arch): add the packed FP16 arithmetic to the amd64 extension layer

Assisted-by: GLM 5.3 Flash
This commit is contained in:
petrbalvin committed 2026-10-07 00:07:58 +02:00
1 parent a2301b52de
commit 22055b9bf3
3 files changed
+55 -4

No files matched your search

+4 -2
View File
@@ -33,6 +33,8 @@ func TestAmd64ExtensionRegistry(t *testing.T) {
{"VCVTSH2SS", 1},
{"VCVTSI2SH", 2},
{"VCVTSH2SI", 2},
{"VADDPH", 1},
{"VSQRTPH", 1},
} {
cands, ok := LookupExtension(arch.AMD64, tt.mnem)
if !ok {
@@ -46,8 +48,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) != 39 {
t.Errorf("the amd64 layer registers %d instructions, want 39", len(got))
if got := arch.Extensions(arch.AMD64); len(got) != 46 {
t.Errorf("the amd64 layer registers %d instructions, want 46", len(got))
}
if _, ok := LookupExtension(arch.AMD64, "NOSUCHINSTR"); ok {
t.Error("a non-extended mnemonic resolved")