fix wrong PGMASK usage

This commit is contained in:
Eyck Jentzsch 2021-10-11 10:40:01 +02:00
parent ee6e1d4092
commit 1d13c8196e
2 changed files with 1 additions and 2 deletions

View File

@ -243,7 +243,7 @@ private:
return pc; return pc;
} }
static constexpr typename traits::addr_t upper_bits = ~traits::PGMASK; //static constexpr typename traits::addr_t upper_bits = ~traits::PGMASK;
iss::status fetch_ins(virt_addr_t pc, uint8_t * data){ iss::status fetch_ins(virt_addr_t pc, uint8_t * data){
auto phys_pc = this->core.v2p(pc); auto phys_pc = this->core.v2p(pc);
//if ((pc.val & upper_bits) != ((pc.val + 2) & upper_bits)) { // we may cross a page boundary //if ((pc.val & upper_bits) != ((pc.val + 2) & upper_bits)) { // we may cross a page boundary

View File

@ -4098,7 +4098,6 @@ private:
return pc; return pc;
} }
static constexpr typename traits::addr_t upper_bits = ~traits::PGMASK;
iss::status fetch_ins(virt_addr_t pc, uint8_t * data){ iss::status fetch_ins(virt_addr_t pc, uint8_t * data){
auto phys_pc = this->core.v2p(pc); auto phys_pc = this->core.v2p(pc);
//if ((pc.val & upper_bits) != ((pc.val + 2) & upper_bits)) { // we may cross a page boundary //if ((pc.val & upper_bits) != ((pc.val + 2) & upper_bits)) { // we may cross a page boundary