From 1c3e41183478d22b988300a6dc374178a666e3ae Mon Sep 17 00:00:00 2001 From: Jason Lowe-Power Date: Thu, 10 Sep 2020 14:58:15 -0700 Subject: [PATCH] arch-arm: Initialize some cases of destReg Some compilers complained that this variable may be uninitialized. This change initializes it to 0. Change-Id: I201d75ba05ce49d13bbaf4d67e1c728ef704fdf0 Signed-off-by: Jason Lowe-Power Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34335 Maintainer: Jason Lowe-Power Reviewed-by: Bobby R. Bruce Reviewed-by: mike upton Tested-by: kokoro --- src/arch/arm/isa/insts/neon.isa | 8 ++++---- src/arch/arm/isa/insts/neon64.isa | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/arch/arm/isa/insts/neon.isa b/src/arch/arm/isa/insts/neon.isa index 1dfefe7c3..c8f8fcd84 100644 --- a/src/arch/arm/isa/insts/neon.isa +++ b/src/arch/arm/isa/insts/neon.isa @@ -1452,7 +1452,7 @@ let {{ rCount = 2 eWalkCode = simdEnabledCheckCode + ''' RegVect srcReg1, srcReg2; - BigRegVect destReg; + BigRegVect destReg = {0}; ''' for reg in range(rCount): eWalkCode += ''' @@ -1654,7 +1654,7 @@ let {{ global header_output, exec_output eWalkCode = simdEnabledCheckCode + ''' RegVect srcReg1; - BigRegVect destReg; + BigRegVect destReg = {0}; ''' for reg in range(2): eWalkCode += ''' @@ -1884,7 +1884,7 @@ let {{ global header_output, exec_output eWalkCode = simdEnabledCheckCode + ''' RegVect srcRegs; - BigRegVect destReg; + BigRegVect destReg = {0}; ''' for reg in range(rCount): eWalkCode += ''' @@ -2010,7 +2010,7 @@ let {{ global header_output, exec_output eWalkCode = simdEnabledCheckCode + ''' RegVect srcReg1; - BigRegVect destReg; + BigRegVect destReg = {0}; ''' for reg in range(2): eWalkCode += ''' diff --git a/src/arch/arm/isa/insts/neon64.isa b/src/arch/arm/isa/insts/neon64.isa index b9729a160..702c128cc 100644 --- a/src/arch/arm/isa/insts/neon64.isa +++ b/src/arch/arm/isa/insts/neon64.isa @@ -351,7 +351,7 @@ let {{ global header_output, exec_output eWalkCode = simd64EnabledCheckCode + ''' RegVect srcReg1; - BigRegVect destReg; + BigRegVect destReg = {0}; ''' destReg = 0 if not hi else 2 for reg in range(2): @@ -632,7 +632,7 @@ let {{ global header_output, exec_output eWalkCode = simd64EnabledCheckCode + ''' RegVect srcRegs; - BigRegVect destReg; + BigRegVect destReg = {0}; ''' for reg in range(rCount): eWalkCode += ''' -- 2.30.2