diff --git a/src/arch/arm/isa/formats/sve_2nd_level.isa b/src/arch/arm/isa/formats/sve_2nd_level.isa index f74181a062..3d211bc19b 100644 --- a/src/arch/arm/isa/formats/sve_2nd_level.isa +++ b/src/arch/arm/isa/formats/sve_2nd_level.isa @@ -1145,29 +1145,31 @@ namespace Aarch64 } // decodeSvePermPredicates StaticInstPtr - decodeSvePermIntlv(ExtMachInst machInst) + decodeSvePermIntlv(ExtMachInst machInst, bool f64mm) { RegIndex zd = (RegIndex) (uint8_t) bits(machInst, 4, 0); RegIndex zn = (RegIndex) (uint8_t) bits(machInst, 9, 5); RegIndex zm = (RegIndex) (uint8_t) bits(machInst, 20, 16); - uint8_t size = bits(machInst, 23, 22); + uint8_t size = f64mm ? 4 : (uint8_t)bits(machInst, 23, 22); uint8_t opc = bits(machInst, 12, 10); switch (opc) { case 0x0: - return decodeSveBinUnpredU(size, machInst, zd, zn, zm); + return decodeSveBinUnpredUQ(size, machInst, zd, zn, zm); case 0x1: - return decodeSveBinUnpredU(size, machInst, zd, zn, zm); + return decodeSveBinUnpredUQ(size, machInst, zd, zn, zm); case 0x2: - return decodeSveBinUnpredU(size, machInst, zd, zn, zm); + return decodeSveBinUnpredUQ(size, machInst, zd, zn, zm); case 0x3: - return decodeSveBinUnpredU(size, machInst, zd, zn, zm); + return decodeSveBinUnpredUQ(size, machInst, zd, zn, zm); case 0x4: - return decodeSveBinUnpredU(size, machInst, zd, zn, zm); + case 0x6: + return decodeSveBinUnpredUQ(size, machInst, zd, zn, zm); case 0x5: - return decodeSveBinUnpredU(size, machInst, zd, zn, zm); + case 0x7: + return decodeSveBinUnpredUQ(size, machInst, zd, zn, zm); } return new Unknown64(machInst); } // decodeSvePermIntlv diff --git a/src/arch/arm/isa/formats/sve_top_level.isa b/src/arch/arm/isa/formats/sve_top_level.isa index b0579fba04..61f2f5ca6c 100644 --- a/src/arch/arm/isa/formats/sve_top_level.isa +++ b/src/arch/arm/isa/formats/sve_top_level.isa @@ -57,7 +57,7 @@ namespace Aarch64 StaticInstPtr decodeSvePermExtract(ExtMachInst machInst); StaticInstPtr decodeSvePermUnpred(ExtMachInst machInst); StaticInstPtr decodeSvePermPredicates(ExtMachInst machInst); - StaticInstPtr decodeSvePermIntlv(ExtMachInst machInst); + StaticInstPtr decodeSvePermIntlv(ExtMachInst machInst, bool f64mm); StaticInstPtr decodeSvePermPred(ExtMachInst machInst); StaticInstPtr decodeSveSelVec(ExtMachInst machInst); StaticInstPtr decodeSveIntCmpVec(ExtMachInst machInst); @@ -202,11 +202,18 @@ namespace Aarch64 if (b_13) { return decodeSvePermUnpred(machInst); } else { - return decodeSvePermExtract(machInst); + uint8_t b_23 = bits(machInst, 23); + if (b_23) { + // 128-bit element encodings for Armv8.6 F64MM + return decodeSvePermIntlv(machInst, true); + } else { + return decodeSvePermExtract(machInst); + } } case 0x1: if (b_13) { - return decodeSvePermIntlv(machInst); + // 8,16,32,64-bit element encodings + return decodeSvePermIntlv(machInst, false); } else { return decodeSvePermPredicates(machInst); } diff --git a/src/arch/arm/isa/insts/sve.isa b/src/arch/arm/isa/insts/sve.isa index 74eacb8db7..cbaa2b528a 100644 --- a/src/arch/arm/isa/insts/sve.isa +++ b/src/arch/arm/isa/insts/sve.isa @@ -632,6 +632,29 @@ output header {{ } } + // Decodes binary, constructive, unpredicated SVE instructions. + // Unsigned instructions only, including Quadword variants. + template