cpu: Fix issue identified by UBSan
This commit is contained in:
parent
aafa5c3f86
commit
85a44e24dc
2 changed files with 5 additions and 2 deletions
|
@ -42,6 +42,8 @@ using namespace std;
|
||||||
//
|
//
|
||||||
FuncUnit::FuncUnit()
|
FuncUnit::FuncUnit()
|
||||||
{
|
{
|
||||||
|
opLatencies.fill(0);
|
||||||
|
pipelined.fill(false);
|
||||||
capabilityList.reset();
|
capabilityList.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#ifndef __CPU_FUNC_UNIT_HH__
|
#ifndef __CPU_FUNC_UNIT_HH__
|
||||||
#define __CPU_FUNC_UNIT_HH__
|
#define __CPU_FUNC_UNIT_HH__
|
||||||
|
|
||||||
|
#include <array>
|
||||||
#include <bitset>
|
#include <bitset>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -84,8 +85,8 @@ typedef std::vector<FUDesc *>::const_iterator FUDDiterator;
|
||||||
class FuncUnit
|
class FuncUnit
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
unsigned opLatencies[Num_OpClasses];
|
std::array<unsigned, Num_OpClasses> opLatencies;
|
||||||
bool pipelined[Num_OpClasses];
|
std::array<bool, Num_OpClasses> pipelined;
|
||||||
std::bitset<Num_OpClasses> capabilityList;
|
std::bitset<Num_OpClasses> capabilityList;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in a new issue