From 5e2b66d2a4c4c6d534e23108e96654dc4adf4b63 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 29 Nov 2015 15:16:30 -0500 Subject: [PATCH] armstate: Zero out the registers on creation std::array isn't always guaranteed to explicitly zero out it's contents without an initializer list. --- src/core/arm/skyeye_common/armstate.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/core/arm/skyeye_common/armstate.h b/src/core/arm/skyeye_common/armstate.h index 98dad9b1f..d42ff2669 100644 --- a/src/core/arm/skyeye_common/armstate.h +++ b/src/core/arm/skyeye_common/armstate.h @@ -193,23 +193,23 @@ public: return TFlag ? 2 : 4; } - std::array Reg; // The current register file - std::array Reg_usr; - std::array Reg_svc; // R13_SVC R14_SVC - std::array Reg_abort; // R13_ABORT R14_ABORT - std::array Reg_undef; // R13 UNDEF R14 UNDEF - std::array Reg_irq; // R13_IRQ R14_IRQ - std::array Reg_firq; // R8---R14 FIRQ - std::array Spsr; // The exception psr's - std::array CP15; + std::array Reg{}; // The current register file + std::array Reg_usr{}; + std::array Reg_svc{}; // R13_SVC R14_SVC + std::array Reg_abort{}; // R13_ABORT R14_ABORT + std::array Reg_undef{}; // R13 UNDEF R14 UNDEF + std::array Reg_irq{}; // R13_IRQ R14_IRQ + std::array Reg_firq{}; // R8---R14 FIRQ + std::array Spsr{}; // The exception psr's + std::array CP15{}; // FPSID, FPSCR, and FPEXC - std::array VFP; + std::array VFP{}; // VFPv2 and VFPv3-D16 has 16 doubleword registers (D0-D16 or S0-S31). // VFPv3-D32/ASIMD may have up to 32 doubleword registers (D0-D31), // and only 32 singleword registers are accessible (S0-S31). - std::array ExtReg; + std::array ExtReg{}; u32 Emulate; // To start and stop emulation u32 Cpsr; // The current PSR