arch-arm: Fix Sve Fcmla indexed instruction
authorJordi Vaquero <jordi.vaquero@metempsy.com>
Tue, 7 Apr 2020 10:23:03 +0000 (12:23 +0200)
committerJordi Vaquero <jordi.vaquero@metempsy.com>
Mon, 27 Apr 2020 13:36:15 +0000 (13:36 +0000)
Sve implementation of FCMLA indexed instruction was
incorrectly typed. This instruction is design to be used for
half-precision and single precision.

Change-Id: Ie529e21140ce5b26a8e72ac869a5422d32eba864
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28227
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/arm/isa/formats/sve_2nd_level.isa
src/arch/arm/isa/insts/sve.isa

index b6f8340383ce6b039657db29fb38d919e3730fcd..53fd80d07dabbb3917911158f5dbd7caae93a26b 100644 (file)
@@ -2799,12 +2799,12 @@ namespace Aarch64
             case 2:
                 zm = (IntRegIndex) (uint8_t) bits(machInst, 18, 16);
                 imm = bits(machInst, 20, 19);
-                return new SveFcmlai<uint32_t>(machInst,
+                return new SveFcmlai<uint16_t>(machInst,
                         zda, zn, zm, rot, imm);
             case 3:
                 zm = (IntRegIndex) (uint8_t) bits(machInst, 19, 16);
                 imm = bits(machInst, 20);
-                return new SveFcmlai<uint64_t>(machInst,
+                return new SveFcmlai<uint32_t>(machInst,
                         zda, zn, zm, rot, imm);
         }
         return new Unknown64(machInst);
index deb12bca42aafc645ba357a7ef8dac2c435a1d48..06ff728b62401f8b83b0dbd1c1825ea97ca2f18e 100644 (file)
@@ -3558,7 +3558,7 @@ let {{
     sveCmpInst('fcmuo', 'Fcmuo', 'SimdFloatCmpOp', fpTypes, fcmuoCode)
     # FCMLA (indexed)
     sveComplexMulAddInst('fcmla', 'Fcmlai', 'SimdFloatMultAccOp',
-            fpTypes[1:], predType = PredType.NONE)
+            fpTypes[:2], predType = PredType.NONE)
     # FCMLA (vectors)
     sveComplexMulAddInst('fcmla', 'Fcmlav', 'SimdFloatMultAccOp',
             fpTypes, predType = PredType.MERGE)