feat(arch): the SVE multiple-structure loads and stores

Assisted-by: GLM 5.3 Flash
This commit is contained in:
petrbalvin committed 2026-10-07 20:35:41 +02:00
1 parent 82dbf087a8
commit cdc3a75c88
5 files changed
+244 -5

No files matched your search

+15
View File
@@ -822,6 +822,17 @@ func TestArm64AssembleExtensionStage4Golden(t *testing.T) {
{"ZBFMUL Z7.H, Z6.H, Z23.H", 0x650708d7},
{"ZBFSUB Z23.H, Z13.H, P1.M, Z13.H", 0x650186ed},
{"ZBFSUB Z7.H, Z6.H, Z23.H", 0x650704d7},
// The multiple-structure loads and stores.
{"ZLD2B (R6)(R14), P4.Z, [Z13.B, Z14.B]", 0xa426d1cd},
{"ZLD2H (R6<<1)(R14), P4.Z, [Z13.H, Z14.H]", 0xa4a6d1cd},
{"ZLD2Q (R6<<4)(R14), P4.Z, [Z13.Q, Z14.Q]", 0xa4a691cd},
{"ZLD3W (R6<<2)(R14), P4.Z, [Z13.S, Z14.S, Z15.S]", 0xa546d1cd},
{"ZLD4B (R6)(R14), P4.Z, [Z13.B, Z14.B, Z15.B, Z16.B]", 0xa466d1cd},
{"ZLD4D (R6<<3)(R14), P4.Z, [Z13.D, Z14.D, Z15.D, Z16.D]", 0xa5e6d1cd},
{"ZST2B [Z8.B, Z9.B], P3, (R6)(RSP)", 0xe4266fe8},
{"ZST2Q [Z8.Q, Z9.Q], P3, (R6<<4)(RSP)", 0xe4660fe8},
{"ZST3D [Z8.D, Z9.D, Z10.D], P3, (R6<<3)(RSP)", 0xe5c66fe8},
{"ZST4Q [Z8.Q, Z9.Q, Z10.Q, Z11.Q], P3, (R6<<4)(RSP)", 0xe4e60fe8},
}
for _, tt := range tests {
words := assembleArm64Words(t, arm64ExtProbeHead+"\t"+tt.stmt+"\n\tRET\n")
@@ -858,6 +869,10 @@ func TestArm64AssembleExtensionStage4Refusals(t *testing.T) {
{"ZADDQV Z25.S, P3/M, V5.S4", "takes no qualifier"},
{"ZADDQV Z25.S, P3, V5", "no quadword suffix"},
{"ZADDQV Z25.S, P3, V5.D2", "carries arrangement .D, want .S"},
// The multiple-structure lists.
{"ZLD3B (R6)(R14), P4.Z, [Z13.B, Z14.B]", "is not an extended-layer operand"},
{"ZLD2B (R6)(R14), P4.Z, [Z13.B, Z15.B]", "is not an extended-layer operand"},
{"ZLD2B (R6)(R14), P4.Z, [Z13.B, Z14.S]", "is not an extended-layer operand"},
}
for _, tt := range tests {
got := assembleArm64SrcError(t, arm64ExtProbeHead+"\t"+tt.stmt+"\n\tRET\n")