cpu: make PcCountPair use 64 bit unsigned int for count

In PcCountPair param, change the type for "count" from 32 bit int to
64 bit unsigned int.

Change-Id: I2dc1bb2692914f06eaaae9bd5bbfb061bcbbfb8b
This commit is contained in:
studyztp
2024-10-30 18:26:45 -07:00
committed by Bobby R. Bruce
parent 6a9db637ae
commit 4ce0f20436
4 changed files with 9 additions and 9 deletions

View File

@@ -170,12 +170,12 @@ init_pc(py::module_ &m_native)
py::module_ m = m_native.def_submodule("pc");
py::class_<PcCountPair>(m, "PcCountPair")
.def(py::init<>())
.def(py::init<Addr, int>())
.def(py::init<Addr, uint64_t>())
.def("__eq__", [](const PcCountPair& self, py::object other) {
py::int_ pyPC = other.attr("get_pc")();
py::int_ pyCount = other.attr("get_count")();
uint64_t cPC = pyPC.cast<uint64_t>();
int cCount = pyCount.cast<int>();
uint64_t cCount = pyCount.cast<uint64_t>();
return (self.getPC() == cPC && self.getCount() == cCount);
})
.def("__hash__", [](const PcCountPair& self){