Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/33199 )
Change subject: power: Tidy up isa_traits.hh and delete the VAddr class.
......................................................................
power: Tidy up isa_traits.hh and delete the VAddr class.
The VAddr class wasn't used and was just a copy (with style fixes) of
the Alpha version.
Delete unused constants in isa_traits.hh, and remove unnecessary
includes. Replace MachineBytes with sizeof(uint32_t) in
arch/power/process.cc.
Change-Id: Ia4862448c43b2dd07078b1ebbbbfda4636343730
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33199
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/arch/power/isa_traits.hh
M src/arch/power/pagetable.hh
M src/arch/power/process.cc
3 files changed, 1 insertion(+), 77 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/power/isa_traits.hh b/src/arch/power/isa_traits.hh
index 0c82af2..ba7b2f3 100644
--- a/src/arch/power/isa_traits.hh
+++ b/src/arch/power/isa_traits.hh
@@ -31,28 +31,15 @@
#ifndef __ARCH_POWER_ISA_TRAITS_HH__
#define __ARCH_POWER_ISA_TRAITS_HH__
-#include "arch/power/types.hh"
#include "base/types.hh"
-#include "cpu/static_inst_fwd.hh"
namespace PowerISA
{
const ByteOrder GuestByteOrder = BigEndianByteOrder;
-StaticInstPtr decodeInst(ExtMachInst);
-
const Addr PageShift = 12;
const Addr PageBytes = ULL(1) << PageShift;
-const Addr Page_Mask = ~(PageBytes - 1);
-const Addr PageOffset = PageBytes - 1;
-
-const Addr PteShift = 3;
-const Addr NPtePageShift = PageShift - PteShift;
-const Addr NPtePage = ULL(1) << NPtePageShift;
-const Addr PteMask = NPtePage - 1;
-
-const int MachineBytes = 4;
} // namespace PowerISA
diff --git a/src/arch/power/pagetable.hh b/src/arch/power/pagetable.hh
index 3aecf11..f4ec525 100644
--- a/src/arch/power/pagetable.hh
+++ b/src/arch/power/pagetable.hh
@@ -38,69 +38,6 @@
namespace PowerISA
{
-static inline Addr PteAddr(Addr a) { return (a & PteMask) << PteShift; }
-
-struct VAddr
-{
- static const int ImplBits = 43;
- static const Addr ImplMask = (ULL(1) << ImplBits) - 1;
- static const Addr UnImplMask = ~ImplMask;
-
- Addr addr;
-
- VAddr(Addr a)
- : addr(a)
- {}
-
- operator Addr() const
- {
- return addr;
- }
-
- const VAddr
- &operator=(Addr a)
- {
- addr = a;
- return *this;
- }
-
- Addr
- vpn() const
- {
- return (addr & ImplMask) >> PageShift;
- }
-
- Addr
- page() const
- {
- return addr & Page_Mask;
- }
-
- Addr
- offset() const
- {
- return addr & PageOffset;
- }
-
- Addr
- level3() const
- {
- return PowerISA::PteAddr(addr >> PageShift);
- }
-
- Addr
- level2() const
- {
- return PowerISA::PteAddr(addr >> (NPtePageShift + PageShift));
- }
-
- Addr
- level1() const
- {
- return PowerISA::PteAddr(addr >> (2 * NPtePageShift + PageShift));
- }
-};
-
// ITB/DTB page table entry
struct PTE
{
diff --git a/src/arch/power/process.cc b/src/arch/power/process.cc
index 767c3eb..8168482 100644
--- a/src/arch/power/process.cc
+++ b/src/arch/power/process.cc
@@ -77,7 +77,7 @@
{
Process::initState();
- argsInit(MachineBytes, PageBytes);
+ argsInit(sizeof(uint32_t), PageBytes);
}
void
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33199
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ia4862448c43b2dd07078b1ebbbbfda4636343730
Gerrit-Change-Number: 33199
Gerrit-PatchSet: 4
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Sandipan Das <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s