#include "arch/arm/tracers/tarmac_record.hh"
+#include <memory>
+
#include "arch/arm/insts/static_inst.hh"
#include "tarmac_tracer.hh"
// Generate an instruction entry in the record and
// add it to the Instruction Queue
queue.push_back(
- m5::make_unique<TraceInstEntry>(tarmCtx, predicate)
+ std::make_unique<TraceInstEntry>(tarmCtx, predicate)
);
}
// Memory Queue
if (getMemValid()) {
queue.push_back(
- m5::make_unique<TraceMemEntry>(tarmCtx,
- static_cast<uint8_t>(getSize()),
- getAddr(), getIntData())
+ std::make_unique<TraceMemEntry>(tarmCtx,
+ static_cast<uint8_t>(getSize()),
+ getAddr(), getIntData())
);
}
}
// Copying the entry and adding it to the "list"
// of entries to be dumped to trace.
- queue.push_back(
- m5::make_unique<TraceRegEntry>(single_reg)
- );
+ queue.push_back(std::make_unique<TraceRegEntry>(single_reg));
}
// Gem5 is treating CPSR flags as separate registers (CC registers),
#ifndef __ARCH_ARM_TRACERS_TARMAC_RECORD_HH__
#define __ARCH_ARM_TRACERS_TARMAC_RECORD_HH__
+#include <memory>
+
#include "arch/arm/tracers/tarmac_base.hh"
#include "base/printable.hh"
#include "config/the_isa.hh"
if (cpsr_it == queue.end()) {
RegId reg(MiscRegClass, ArmISA::MISCREG_CPSR);
queue.push_back(
- m5::make_unique<RegEntry>(
+ std::make_unique<RegEntry>(
genRegister<RegEntry>(tarmCtx, reg))
);
}
#include "arch/arm/tracers/tarmac_record_v8.hh"
+#include <memory>
+
#include "arch/arm/insts/static_inst.hh"
#include "arch/arm/tlb.hh"
#include "arch/arm/tracers/tarmac_tracer.hh"
// Generate an instruction entry in the record and
// add it to the Instruction Queue
queue.push_back(
- m5::make_unique<TraceInstEntryV8>(tarmCtx, predicate)
+ std::make_unique<TraceInstEntryV8>(tarmCtx, predicate)
);
}
// Memory Queue
if (getMemValid()) {
queue.push_back(
- m5::make_unique<TraceMemEntryV8>(tarmCtx,
- static_cast<uint8_t>(getSize()),
- getAddr(), getIntData())
+ std::make_unique<TraceMemEntryV8>(tarmCtx,
+ static_cast<uint8_t>(getSize()),
+ getAddr(), getIntData())
);
}
}
// Copying the entry and adding it to the "list"
// of entries to be dumped to trace.
- queue.push_back(
- m5::make_unique<TraceRegEntryV8>(single_reg)
- );
+ queue.push_back(std::make_unique<TraceRegEntryV8>(single_reg));
}
// Gem5 is treating CPSR flags as separate registers (CC registers),
#define M5_NODISCARD
#endif
-// std::make_unique redefined for C++11 compilers
-namespace m5
-{
-
-#if __cplusplus >= 201402L // C++14
-
-using std::make_unique;
-
-#else // C++11
-
-/** Defining custom version of make_unique: m5::make_unique<>() */
-template<typename T, typename... Args>
-std::unique_ptr<T>
-make_unique( Args&&... constructor_args )
-{
- return std::unique_ptr<T>(
- new T( std::forward<Args>(constructor_args)... )
- );
-}
-
-#endif // __cplusplus >= 201402L
-
-} //namespace m5
-
#endif // __BASE_COMPILER_HH__
#define __GPU_DYN_INST_HH__
#include <cstdint>
+#include <memory>
#include <string>
#include "base/amo.hh"
makeAtomicOpFunctor(c0 *reg0, c0 *reg1)
{
if (isAtomicAnd()) {
- return m5::make_unique<AtomicOpAnd<c0>>(*reg0);
+ return std::make_unique<AtomicOpAnd<c0>>(*reg0);
} else if (isAtomicOr()) {
- return m5::make_unique<AtomicOpOr<c0>>(*reg0);
+ return std::make_unique<AtomicOpOr<c0>>(*reg0);
} else if (isAtomicXor()) {
- return m5::make_unique<AtomicOpXor<c0>>(*reg0);
+ return std::make_unique<AtomicOpXor<c0>>(*reg0);
} else if (isAtomicCAS()) {
- return m5::make_unique<AtomicOpCAS<c0>>(*reg0, *reg1, cu);
+ return std::make_unique<AtomicOpCAS<c0>>(*reg0, *reg1, cu);
} else if (isAtomicExch()) {
- return m5::make_unique<AtomicOpExch<c0>>(*reg0);
+ return std::make_unique<AtomicOpExch<c0>>(*reg0);
} else if (isAtomicAdd()) {
- return m5::make_unique<AtomicOpAdd<c0>>(*reg0);
+ return std::make_unique<AtomicOpAdd<c0>>(*reg0);
} else if (isAtomicSub()) {
- return m5::make_unique<AtomicOpSub<c0>>(*reg0);
+ return std::make_unique<AtomicOpSub<c0>>(*reg0);
} else if (isAtomicInc()) {
- return m5::make_unique<AtomicOpInc<c0>>();
+ return std::make_unique<AtomicOpInc<c0>>();
} else if (isAtomicDec()) {
- return m5::make_unique<AtomicOpDec<c0>>();
+ return std::make_unique<AtomicOpDec<c0>>();
} else if (isAtomicMax()) {
- return m5::make_unique<AtomicOpMax<c0>>(*reg0);
+ return std::make_unique<AtomicOpMax<c0>>(*reg0);
} else if (isAtomicMin()) {
- return m5::make_unique<AtomicOpMin<c0>>(*reg0);
+ return std::make_unique<AtomicOpMin<c0>>(*reg0);
} else {
fatal("Unrecognized atomic operation");
}