From 8e5217123d1d9375e04a25b7ce9a0073ca48622c Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Mon, 9 Dec 2019 13:59:23 +0000 Subject: arch-arm: Always initialize SVE memData Some compilers will produce a warning when using an uninitialized memData. JIRA: https://gem5.atlassian.net/browse/GEM5-196 Change-Id: I19e197b15729a03da546a0188917a9b3e7bf31b7 Signed-off-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23525 Reviewed-by: Jason Lowe-Power Tested-by: kokoro --- src/arch/arm/isa/templates/sve_mem.isa | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/arch/arm') diff --git a/src/arch/arm/isa/templates/sve_mem.isa b/src/arch/arm/isa/templates/sve_mem.isa index 933a78494..346f47c54 100644 --- a/src/arch/arm/isa/templates/sve_mem.isa +++ b/src/arch/arm/isa/templates/sve_mem.isa @@ -314,7 +314,7 @@ def template SveLoadAndReplExecute {{ %(op_rd)s; %(ea_code)s; - MemElemType memData; + MemElemType memData = 0; if (fault == NoFault) { fault = readMemAtomicLE(xc, traceData, EA, memData, @@ -344,7 +344,7 @@ def template SveLoadAndReplInitiateAcc {{ %(ea_code)s; - MemElemType memData; + MemElemType memData = 0; if (fault == NoFault) { fault = initiateMemRead(xc, traceData, EA, memData, @@ -368,7 +368,7 @@ def template SveLoadAndReplCompleteAcc {{ %(op_decl)s; %(op_rd)s; - MemElemType memData; + MemElemType memData = 0; getMemLE(pkt, memData, traceData); if (fault == NoFault) { @@ -597,7 +597,7 @@ def template SveGatherLoadMicroopInitiateAcc {{ %(op_rd)s; %(ea_code)s; - MemElemType memData; + MemElemType memData = 0; int index = elemIndex; if (%(pred_check_code)s) { @@ -663,7 +663,7 @@ def template SveScatterStoreMicroopExecute {{ %(op_rd)s; %(ea_code)s; - MemElemType memData; + MemElemType memData = 0; %(memacc_code)s; int index = elemIndex; @@ -693,7 +693,7 @@ def template SveScatterStoreMicroopInitiateAcc {{ %(op_rd)s; %(ea_code)s; - MemElemType memData; + MemElemType memData = 0; %(memacc_code)s; int index = elemIndex; -- cgit v1.2.3