summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Subv2017-09-26 17:29:06 -0500
committerGravatar Subv2017-09-26 17:29:06 -0500
commitc102e3ae282ae849667ae91f5f0213a80adf474f (patch)
tree5e75e55abf0d90e600a2dfda63466c278a1a5860
parentMemory: Allow IsValidVirtualAddress to be called with a specific process para... (diff)
downloadyuzu-c102e3ae282ae849667ae91f5f0213a80adf474f.tar.gz
yuzu-c102e3ae282ae849667ae91f5f0213a80adf474f.tar.xz
yuzu-c102e3ae282ae849667ae91f5f0213a80adf474f.zip
Tests: Fixed ARM VFP tests
-rw-r--r--src/tests/core/arm/arm_test_common.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/tests/core/arm/arm_test_common.cpp b/src/tests/core/arm/arm_test_common.cpp
index cfe0d503a..484713a92 100644
--- a/src/tests/core/arm/arm_test_common.cpp
+++ b/src/tests/core/arm/arm_test_common.cpp
@@ -3,30 +3,34 @@
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include "core/core.h" 5#include "core/core.h"
6#include "core/hle/kernel/process.h"
6#include "core/memory.h" 7#include "core/memory.h"
7#include "core/memory_setup.h" 8#include "core/memory_setup.h"
8#include "tests/core/arm/arm_test_common.h" 9#include "tests/core/arm/arm_test_common.h"
9 10
10namespace ArmTests { 11namespace ArmTests {
11 12
12static Memory::PageTable page_table; 13static Memory::PageTable* page_table = nullptr;
13 14
14TestEnvironment::TestEnvironment(bool mutable_memory_) 15TestEnvironment::TestEnvironment(bool mutable_memory_)
15 : mutable_memory(mutable_memory_), test_memory(std::make_shared<TestMemory>(this)) { 16 : mutable_memory(mutable_memory_), test_memory(std::make_shared<TestMemory>(this)) {
16 17
17 page_table.pointers.fill(nullptr); 18 Kernel::g_current_process = Kernel::Process::Create(Kernel::CodeSet::Create("", 0));
18 page_table.attributes.fill(Memory::PageType::Unmapped); 19 page_table = &Kernel::g_current_process->vm_manager.page_table;
19 page_table.cached_res_count.fill(0);
20 20
21 Memory::MapIoRegion(page_table, 0x00000000, 0x80000000, test_memory); 21 page_table->pointers.fill(nullptr);
22 Memory::MapIoRegion(page_table, 0x80000000, 0x80000000, test_memory); 22 page_table->attributes.fill(Memory::PageType::Unmapped);
23 page_table->cached_res_count.fill(0);
23 24
24 Memory::SetCurrentPageTable(&page_table); 25 Memory::MapIoRegion(*page_table, 0x00000000, 0x80000000, test_memory);
26 Memory::MapIoRegion(*page_table, 0x80000000, 0x80000000, test_memory);
27
28 Memory::SetCurrentPageTable(page_table);
25} 29}
26 30
27TestEnvironment::~TestEnvironment() { 31TestEnvironment::~TestEnvironment() {
28 Memory::UnmapRegion(page_table, 0x80000000, 0x80000000); 32 Memory::UnmapRegion(*page_table, 0x80000000, 0x80000000);
29 Memory::UnmapRegion(page_table, 0x00000000, 0x80000000); 33 Memory::UnmapRegion(*page_table, 0x00000000, 0x80000000);
30} 34}
31 35
32void TestEnvironment::SetMemory64(VAddr vaddr, u64 value) { 36void TestEnvironment::SetMemory64(VAddr vaddr, u64 value) {