feat(arch): scale and exponent-extract the scalar FP16 in the 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 127e52de69
commit 0354a1f4c1
3 files changed
+20 -4

No files matched your search

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