arch,base,cpu: Add some default constructors/operators explicitly.

Having them implicitly is apparently deprecated and throws a warning
in gcc 9, breaking the build.

Change-Id: Id4e3074966d1ffc6dd1aed9397de5eea84400027
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24926
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2020-01-29 23:49:32 -08:00
parent f5e95d16e2
commit 5d3f1bfc48
5 changed files with 21 additions and 0 deletions

View File

@@ -45,6 +45,7 @@ struct VAddr
Addr addr;
VAddr(const VAddr &) = default;
VAddr(Addr a) : addr(a) {}
operator Addr() const { return addr; }
const VAddr &operator=(Addr a) { addr = a; return *this; }
@@ -63,6 +64,7 @@ struct VAddr
struct PageTableEntry
{
PageTableEntry(const PageTableEntry &) = default;
PageTableEntry(uint64_t e) : entry(e) {}
uint64_t entry;
operator uint64_t() const { return entry; }
@@ -103,6 +105,8 @@ struct TlbEntry : public Serializable
bool valid; // valid page table entry
TlbEntry(const TlbEntry &) = default;
//Construct an entry that maps to physical address addr.
TlbEntry(Addr _asn, Addr _vaddr, Addr _paddr,
bool uncacheable, bool read_only)

View File

@@ -248,6 +248,7 @@ class VecPredRegContainer
public:
VecPredRegContainer() {}
VecPredRegContainer(const VecPredRegContainer &) = default;
MyClass&
operator=(const MyClass& that)

View File

@@ -284,6 +284,7 @@ class VecRegContainer
public:
VecRegContainer() {}
VecRegContainer(const VecRegContainer &) = default;
/* This is required for de-serialisation. */
VecRegContainer(const std::vector<uint8_t>& that)
{

View File

@@ -86,6 +86,9 @@ class BitfieldTypeImpl : public Base
Type getter(const Storage &storage) const = delete;
void setter(Storage &storage, Type val) = delete;
BitfieldTypeImpl() = default;
BitfieldTypeImpl(const BitfieldTypeImpl &) = default;
Storage __storage;
operator Type () const
@@ -116,6 +119,9 @@ class BitfieldType : public BitfieldTypeImpl<Base>
using typename Impl::Type;
public:
BitfieldType() = default;
BitfieldType(const BitfieldType &) = default;
operator Type () const { return Impl::operator Type(); }
Type operator=(const Type val) { return Impl::operator=(val); }
Type
@@ -133,6 +139,9 @@ class BitfieldROType : public BitfieldTypeImpl<Base>
using Impl = BitfieldTypeImpl<Base>;
using typename Impl::Type;
BitfieldROType() = default;
BitfieldROType(const BitfieldROType &) = default;
Type operator=(BitfieldROType<Base> const &other) = delete;
operator Type () const { return Impl::operator Type(); }
};
@@ -146,6 +155,9 @@ class BitfieldWOType : public BitfieldTypeImpl<Base>
using typename Impl::Type;
public:
BitfieldWOType() = default;
BitfieldWOType(const BitfieldWOType &) = default;
Type operator=(const Type val) { return Impl::operator=(val); }
Type
operator=(BitfieldWOType<Base> const & other)
@@ -244,6 +256,8 @@ namespace BitfieldBackend
Base::__storage = val;
}
BitUnionOperators(const BitUnionOperators &) = default;
BitUnionOperators() {}
operator const typename Base::__StorageType () const

View File

@@ -75,6 +75,7 @@ class InstResult {
public:
/** Default constructor creates an invalid result. */
InstResult() : type(ResultType::Invalid) { }
InstResult(const InstResult &) = default;
/** Scalar result from scalar. */
template<typename T>
explicit InstResult(T i, const ResultType& t) : type(t) {