dev: Fix register bank unit test in .debug

The lack of definition of this static variable was throwing
and undefined reference error when running

  scons build/X86/unittests.opt.

For more info, check

  https://stackoverflow.com/questions/
    8016780/undefined-reference-to-static-constexpr-char

Change-Id: Id736dc42a82aea871da6a53c06d89fd399d3559a
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40836
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Daniel R. Carvalho
2021-02-07 00:14:58 -03:00
committed by Daniel Carvalho
parent b75ff8fcff
commit 0a63e9ff0a

View File

@@ -82,6 +82,8 @@ class RegisterRazTest : public testing::Test
buf.fill(0xff);
}
};
// Needed by C++14 and lower
constexpr size_t RegisterRazTest::RazSize;
TEST_F(RegisterRazTest, Name)
{
@@ -166,6 +168,8 @@ class RegisterRaoTest : public testing::Test
buf.fill(0x00);
}
};
// Needed by C++14 and lower
constexpr size_t RegisterRaoTest::RaoSize;
TEST_F(RegisterRaoTest, Name)
{
@@ -252,6 +256,8 @@ class RegisterBufTest : public testing::Test
0x70, 0x80, 0x90, 0xa0, 0xb0, 0xc0}
{}
};
// Needed by C++14 and lower
constexpr size_t RegisterBufTest::RegSize;
TEST_F(RegisterBufTest, Name)
{
@@ -456,6 +462,8 @@ class TypedRegisterTest : public testing::Test
buf{0x1, 0x2, 0x3, 0x4, 0x5, 0x6}
{}
};
// Needed by C++14 and lower
constexpr size_t TypedRegisterTest::RegSize;
TEST_F(TypedRegisterTest, DefaultConstructor)
{