feat(arch): the SVE2.1 Z-alias permutations and copies

Assisted-by: GLM 5.3 Flash
This commit is contained in:
petrbalvin committed 2026-10-07 02:27:35 +02:00
1 parent 8231302bca
commit 6c4932c4ec
4 files changed
+1142 -10

No files matched your search

+54 -2
View File
@@ -221,12 +221,64 @@ func TestExtensionNamesARM64(t *testing.T) {
"PRDFFR", "PRDFFRS", "PWRFFR", "PREV", "SETFFR",
"PWHILEGE", "PWHILEGT", "PWHILEHI", "PWHILEHS",
"PWHILELE", "PWHILELO", "PWHILELS", "PWHILELT", "PWHILERW", "PWHILEWR",
// The SVE2.1 Z-alias families, in first-occurrence order.
"ZABS",
"ZREVB",
"ZREVH",
"ZSXTB",
"ZSXTH",
"ZUXTB",
"ZUXTH",
"ZADD",
"ZAND",
"ZBIC",
"ZCLS",
"ZCLZ",
"ZCNT",
"ZCOMPACT",
"ZDUP",
"ZEOR",
"ZEXPAND",
"ZINSR",
"ZLASTA",
"ZLASTB",
"ZMOVPRFX",
"ZREVD",
"ZREVW",
"ZSXTW",
"ZUXTW",
"ZNEG",
"ZNOT",
"ZORR",
"ZRBIT",
"ZREV",
"ZSEL",
"ZSQABS",
"ZSQNEG",
"ZSUB",
"ZSUBR",
"ZSUNPKHI",
"ZSUNPKLO",
"ZTBX",
"ZTBXQ",
"ZTRN1",
"ZTRN2",
"ZUUNPKHI",
"ZUUNPKLO",
"ZUZP1",
"ZUZP2",
"ZUZPQ1",
"ZUZPQ2",
"ZZIP1",
"ZZIP2",
"ZZIPQ1",
"ZZIPQ2",
}
got := ExtensionNames(arch.ARM64)
if strings.Join(got, ",") != strings.Join(want, ",") {
t.Errorf("ExtensionNames(ARM64) = %v, want %v", got, want)
}
if n := len(arch.Extensions(arch.ARM64)); n != 77 {
t.Errorf("the family registers %d instructions, want 77", n)
if n := len(arch.Extensions(arch.ARM64)); n != 167 {
t.Errorf("the family registers %d instructions, want 164", n)
}
}