Apply code from memory-test branch

This commit is contained in:
Alex
2022-12-05 23:20:06 +02:00
parent 0116fd3b38
commit 1bb97f19fd
9 changed files with 403 additions and 263 deletions

View File

@ -7,21 +7,21 @@ namespace Memory
#if defined(__amd64__)
uint64_t Address = VirtualAddress;
Address >>= 12;
this->PIndex = Address & 0x1FF;
this->PTEIndex = Address & 0x1FF;
Address >>= 9;
this->PTIndex = Address & 0x1FF;
this->PDEIndex = Address & 0x1FF;
Address >>= 9;
this->PDIndex = Address & 0x1FF;
this->PDPTEIndex = Address & 0x1FF;
Address >>= 9;
this->PDPIndex = Address & 0x1FF;
this->PMLIndex = Address & 0x1FF;
#elif defined(__i386__)
uint64_t Address = VirtualAddress;
Address >>= 12;
this->PIndex = Address & 0x3FF;
this->PTEIndex = Address & 0x3FF;
Address >>= 10;
this->PTIndex = Address & 0x3FF;
this->PDEIndex = Address & 0x3FF;
Address >>= 10;
this->PDIndex = Address & 0x3FF;
this->PDPTEIndex = Address & 0x3FF;
#elif defined(__aarch64__)
#endif
}