arch-arm: Fix clasta/b and lasta/b simd&fp instructions
authorJordi Vaquero <jordi.vaquero@metempsy.com>
Thu, 9 Apr 2020 09:52:07 +0000 (11:52 +0200)
committerJordi Vaquero <jordi.vaquero@metempsy.com>
Tue, 28 Apr 2020 12:56:29 +0000 (12:56 +0000)
The simd&fp version of this instructions required zeroing the result
vector except for the first element, that contains the result.

Change-Id: I231ad3c44d89f34acae26d299ab676e2ed09acdc
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28247
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/insts/sve.isa

index 06ff728b62401f8b83b0dbd1c1825ea97ca2f18e..aa4f194eebf327c4d24a6d44a311bd53cd581cf3 100644 (file)
@@ -2432,7 +2432,16 @@ let {{
             elif destType == DstRegType.SimdFpScalar:
                 code += ''' else {
             AA64FpDest_x[0] = AA64FpDestMerge_x[0];
-        }'''
+        }
+        '''
+        if destType == DstRegType.SimdFpScalar:
+            # This section will extend zeros to the simdFP scalar
+            # intructions for lasta/b and Clasta/b
+            code += '''
+                for (int i = 1; i < eCount; ++i) {
+                    AA64FpDest_x[i] = (Element)0x0;
+                }
+                '''
         iop = InstObjParams(name, 'Sve' + Name, 'SveSelectOp',
                             {'code': code, 'op_class': opClass,
                              'isCond': 'true' if isCond else 'false',