From 481eb6ae8018d0478c23fda7c5f9f3fa4db8de89 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Fri, 14 Nov 2014 03:53:51 -0500 Subject: arm: Fixes based on UBSan and static analysis Another churn to clean up undefined behaviour, mostly ARM, but some parts also touching the generic part of the code base. Most of the fixes are simply ensuring that proper intialisation. One of the more subtle changes is the return type of the sign-extension, which is changed to uint64_t. This is to avoid shifting negative values (undefined behaviour) in the ISA code. --- src/cpu/o3/lsq_unit.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/cpu/o3/lsq_unit.hh') diff --git a/src/cpu/o3/lsq_unit.hh b/src/cpu/o3/lsq_unit.hh index f90f72ced..6fe832bf6 100644 --- a/src/cpu/o3/lsq_unit.hh +++ b/src/cpu/o3/lsq_unit.hh @@ -280,8 +280,9 @@ class LSQUnit { public: /** Default constructor. */ LSQSenderState() - : mainPkt(NULL), pendingPacket(NULL), outstanding(1), - noWB(false), isSplit(false), pktToSend(false), cacheBlocked(false) + : mainPkt(NULL), pendingPacket(NULL), idx(0), outstanding(1), + isLoad(false), noWB(false), isSplit(false), + pktToSend(false), cacheBlocked(false) { } /** Instruction who initiated the access to memory. */ -- cgit v1.2.3