mem: Merge the virtual Request constructors.
The only difference was whether the the atomic op functor was accepted as an argument. If it wasn't, setVirt would be called without an op functor argument where it will default to nullptr. This change deletes the constructor which doesn't take an atomic op functor and in the other defaults the functor to nullptr. Functionally nothing changes, but the code is now simpler. Change-Id: Iff06543b1046594df297344e16961ee9d0f0a373 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26231 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Gabe Black <gabeblack@google.com>
This commit is contained in:
@@ -388,16 +388,9 @@ class Request
|
||||
privateFlags.set(VALID_PADDR|VALID_SIZE);
|
||||
}
|
||||
|
||||
Request(uint64_t asid, Addr vaddr, unsigned size, Flags flags,
|
||||
MasterID mid, Addr pc, ContextID cid)
|
||||
{
|
||||
setVirt(asid, vaddr, size, flags, mid, pc);
|
||||
setContext(cid);
|
||||
}
|
||||
|
||||
Request(uint64_t asid, Addr vaddr, unsigned size, Flags flags,
|
||||
MasterID mid, Addr pc, ContextID cid,
|
||||
AtomicOpFunctorPtr atomic_op)
|
||||
AtomicOpFunctorPtr atomic_op=nullptr)
|
||||
{
|
||||
setVirt(asid, vaddr, size, flags, mid, pc, std::move(atomic_op));
|
||||
setContext(cid);
|
||||
@@ -455,7 +448,7 @@ class Request
|
||||
*/
|
||||
void
|
||||
setVirt(uint64_t asid, Addr vaddr, unsigned size, Flags flags,
|
||||
MasterID mid, Addr pc, AtomicOpFunctorPtr amo_op = nullptr)
|
||||
MasterID mid, Addr pc, AtomicOpFunctorPtr amo_op=nullptr)
|
||||
{
|
||||
_asid = asid;
|
||||
_vaddr = vaddr;
|
||||
|
||||
Reference in New Issue
Block a user