feat(arch): add the FP16 complex fused multiply-add to the extension layer
Assisted-by: GLM 5.3 Flash
This commit is contained in:
1 parent
86cb785e58
commit
03f9ef0ac6
3 files changed
+128
-4
No files matched your search
@@ -80,6 +80,10 @@ func TestAmd64ExtensionRegistry(t *testing.T) {
|
||||
{"VFCMULCPH", 3},
|
||||
{"VFMULCSH", 1},
|
||||
{"VFCMULCSH", 1},
|
||||
{"VFMADDCPH", 3},
|
||||
{"VFCMADDCPH", 3},
|
||||
{"VFMADDCSH", 1},
|
||||
{"VFCMADDCSH", 1},
|
||||
{"VMINMAXPH", 3},
|
||||
} {
|
||||
cands, ok := LookupExtension(arch.AMD64, tt.mnem)
|
||||
@@ -94,8 +98,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) != 174 {
|
||||
t.Errorf("the amd64 layer registers %d instructions, want 174", len(got))
|
||||
if got := arch.Extensions(arch.AMD64); len(got) != 182 {
|
||||
t.Errorf("the amd64 layer registers %d instructions, want 182", len(got))
|
||||
}
|
||||
if _, ok := LookupExtension(arch.AMD64, "NOSUCHINSTR"); ok {
|
||||
t.Error("a non-extended mnemonic resolved")
|
||||
@@ -201,6 +205,15 @@ func TestEncodeExtensionAmd64(t *testing.T) {
|
||||
{"complex multiply, conjugating the first source", "VFCMULCPH",
|
||||
[]arch.ExtOperand{arch.ExtZmm(29), arch.ExtZmm(28), arch.ExtZmm(30)},
|
||||
"62061740d6f4"},
|
||||
{"complex multiply-add, conjugating the second source", "VFMADDCPH",
|
||||
[]arch.ExtOperand{arch.ExtZmm(29), arch.ExtZmm(28), arch.ExtZmm(30)},
|
||||
"6206164056f4"},
|
||||
{"complex multiply-add, conjugated first source, rounded", "VFCMADDCPH",
|
||||
[]arch.ExtOperand{arch.ExtZmm(5), arch.ExtZmm(4), arch.ExtRounded(arch.ExtZmm(6), arch.ExtRoundNearest)},
|
||||
"62f6571856f4"},
|
||||
{"scalar complex multiply-add out of memory", "VFMADDCSH",
|
||||
[]arch.ExtOperand{arch.ExtXmm(29), arch.ExtMemory(9, 0), arch.ExtXmm(30)},
|
||||
"624616005731"},
|
||||
{"minimum or maximum under a control byte", "VMINMAXPH",
|
||||
[]arch.ExtOperand{arch.ExtImmediate(0x88), arch.ExtZmm(29), arch.ExtMemory(9, 0), arch.ExtZmm(30)},
|
||||
"62431440523188"},
|
||||
|
||||
Reference in new issue
Block a user