feat(arch): add the AVX-VNNI-INT16 dot products to the extension layer
Assisted-by: GLM 5.3 Flash
This commit is contained in:
1 parent
96000dd64d
commit
4632ac1bb9
3 files changed
+118
-4
No files matched your search
@@ -86,6 +86,10 @@ func TestAmd64ExtensionRegistry(t *testing.T) {
|
||||
{"VFCMADDCSH", 1},
|
||||
{"VMINMAXPH", 3},
|
||||
{"VMINMAXSH", 1},
|
||||
{"VPDPWSUD", 2},
|
||||
{"VPDPWSUDS", 2},
|
||||
{"VPDPWUSD", 2},
|
||||
{"VPDPWUSDS", 2},
|
||||
} {
|
||||
cands, ok := LookupExtension(arch.AMD64, tt.mnem)
|
||||
if !ok {
|
||||
@@ -99,8 +103,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) != 183 {
|
||||
t.Errorf("the amd64 layer registers %d instructions, want 183", len(got))
|
||||
if got := arch.Extensions(arch.AMD64); len(got) != 191 {
|
||||
t.Errorf("the amd64 layer registers %d instructions, want 191", len(got))
|
||||
}
|
||||
if _, ok := LookupExtension(arch.AMD64, "NOSUCHINSTR"); ok {
|
||||
t.Error("a non-extended mnemonic resolved")
|
||||
@@ -221,6 +225,15 @@ func TestEncodeExtensionAmd64(t *testing.T) {
|
||||
{"scalar minimum or maximum out of memory", "VMINMAXSH",
|
||||
[]arch.ExtOperand{arch.ExtImmediate(0x88), arch.ExtXmm(28), arch.ExtMemory(9, 0), arch.ExtXmm(29)},
|
||||
"62431c00532988"},
|
||||
{"vnni dot product through the VEX word", "VPDPWSUD",
|
||||
[]arch.ExtOperand{arch.ExtXmm(2), arch.ExtXmm(1), arch.ExtXmm(3)},
|
||||
"c4e26ad2d9"},
|
||||
{"saturating dot product, high registers", "VPDPWUSDS",
|
||||
[]arch.ExtOperand{arch.ExtYmm(10), arch.ExtYmm(15), arch.ExtYmm(8)},
|
||||
"c4422dd3c7"},
|
||||
{"dot product out of memory", "VPDPWSUD",
|
||||
[]arch.ExtOperand{arch.ExtXmm(2), arch.ExtMemory(1, 127), arch.ExtXmm(1)},
|
||||
"c4e26ad2497f"},
|
||||
} {
|
||||
got, err := EncodeExtension(arch.AMD64, tt.mnem, tt.ops...)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user