From f1b9e1afce4ba2baba13b1805b40da96dce263c8 Mon Sep 17 00:00:00 2001 From: Triang3l Date: Tue, 13 Aug 2019 00:06:29 +0300 Subject: [PATCH] [CPU] Remove unused access violation handler variables --- src/xenia/cpu/mmio_handler.cc | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/xenia/cpu/mmio_handler.cc b/src/xenia/cpu/mmio_handler.cc index 35f5b3771..8d1482fd0 100644 --- a/src/xenia/cpu/mmio_handler.cc +++ b/src/xenia/cpu/mmio_handler.cc @@ -294,27 +294,14 @@ bool MMIOHandler::ExceptionCallback(Exception* ex) { } } if (!range) { - auto fault_address = reinterpret_cast(ex->fault_address()); - uint32_t guest_address, guest_heap_address; - if (fault_address >= virtual_membase_ && - fault_address < physical_membase_) { - // Faulting on a virtual address. - guest_address = static_cast(ex->fault_address()) & 0x1FFFFFFF; - guest_heap_address = - static_cast(ex->fault_address()) & ~0x1FFFFFFF; - } else { - // Faulting on a physical address. - guest_address = static_cast(ex->fault_address()); - guest_heap_address = 0; - } - // Recheck if the pages are still protected (race condition - another thread // clears the writewatch we just hit). // Do this under the lock so we don't introduce another race condition. auto lock = global_critical_region_.Acquire(); memory::PageAccess cur_access; size_t page_length = memory::page_size(); - memory::QueryProtect((void*)fault_address, page_length, cur_access); + memory::QueryProtect(reinterpret_cast(ex->fault_address()), + page_length, cur_access); if (cur_access != memory::PageAccess::kReadOnly && cur_access != memory::PageAccess::kNoAccess) { // Another thread has cleared this write watch. Abort.