diff options
| author | 2018-01-02 22:24:12 -0500 | |
|---|---|---|
| committer | 2018-01-02 22:24:12 -0500 | |
| commit | b172f0d770486d4367fbea22906a5e908ef621e8 (patch) | |
| tree | 6a564c23ed8f52c16c50942803f4a69fd0047f6c /src/core/arm/dynarmic | |
| parent | vm_manager: Use a more reasonable MAX_ADDRESS size. (diff) | |
| download | yuzu-b172f0d770486d4367fbea22906a5e908ef621e8.tar.gz yuzu-b172f0d770486d4367fbea22906a5e908ef621e8.tar.xz yuzu-b172f0d770486d4367fbea22906a5e908ef621e8.zip | |
arm: Remove SkyEye/Dyncom code that is ARMv6-only.
Diffstat (limited to 'src/core/arm/dynarmic')
| -rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic.cpp | 26 | ||||
| -rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic.h | 7 | ||||
| -rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic_cp15.cpp | 88 | ||||
| -rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic_cp15.h | 32 |
4 files changed, 6 insertions, 147 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic.cpp b/src/core/arm/dynarmic/arm_dynarmic.cpp index 6dcab5bab..89754da17 100644 --- a/src/core/arm/dynarmic/arm_dynarmic.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic.cpp | |||
| @@ -7,11 +7,9 @@ | |||
| 7 | #include "common/assert.h" | 7 | #include "common/assert.h" |
| 8 | #include "common/microprofile.h" | 8 | #include "common/microprofile.h" |
| 9 | #include "core/arm/dynarmic/arm_dynarmic.h" | 9 | #include "core/arm/dynarmic/arm_dynarmic.h" |
| 10 | #include "core/arm/dynarmic/arm_dynarmic_cp15.h" | ||
| 11 | #include "core/arm/dyncom/arm_dyncom_interpreter.h" | ||
| 12 | #include "core/core.h" | 10 | #include "core/core.h" |
| 13 | #include "core/core_timing.h" | 11 | #include "core/core_timing.h" |
| 14 | #include "core/hle/svc.h" | 12 | #include "core/hle/kernel/svc.h" |
| 15 | #include "core/memory.h" | 13 | #include "core/memory.h" |
| 16 | 14 | ||
| 17 | static void InterpreterFallback(u64 pc, Dynarmic::Jit* jit, void* user_arg) { | 15 | static void InterpreterFallback(u64 pc, Dynarmic::Jit* jit, void* user_arg) { |
| @@ -55,11 +53,11 @@ void MemoryWrite64(const u64 addr, const u64 data) { | |||
| 55 | Memory::Write64(static_cast<VAddr>(addr), data); | 53 | Memory::Write64(static_cast<VAddr>(addr), data); |
| 56 | } | 54 | } |
| 57 | 55 | ||
| 58 | static Dynarmic::UserCallbacks GetUserCallbacks(ARM_Dynarmic* this_) { | 56 | static Dynarmic::UserCallbacks GetUserCallbacks(ARM_Interface* interpreter_fallback) { |
| 59 | Dynarmic::UserCallbacks user_callbacks{}; | 57 | Dynarmic::UserCallbacks user_callbacks{}; |
| 60 | user_callbacks.InterpreterFallback = &InterpreterFallback; | 58 | user_callbacks.InterpreterFallback = &InterpreterFallback; |
| 61 | user_callbacks.user_arg = static_cast<void*>(this_); | 59 | user_callbacks.user_arg = static_cast<void*>(interpreter_fallback); |
| 62 | user_callbacks.CallSVC = &SVC::CallSVC; | 60 | user_callbacks.CallSVC = &Kernel::CallSVC; |
| 63 | user_callbacks.memory.IsReadOnlyMemory = &IsReadOnlyMemory; | 61 | user_callbacks.memory.IsReadOnlyMemory = &IsReadOnlyMemory; |
| 64 | user_callbacks.memory.ReadCode = &MemoryRead32; | 62 | user_callbacks.memory.ReadCode = &MemoryRead32; |
| 65 | user_callbacks.memory.Read8 = &MemoryRead8; | 63 | user_callbacks.memory.Read8 = &MemoryRead8; |
| @@ -74,7 +72,7 @@ static Dynarmic::UserCallbacks GetUserCallbacks(ARM_Dynarmic* this_) { | |||
| 74 | return user_callbacks; | 72 | return user_callbacks; |
| 75 | } | 73 | } |
| 76 | 74 | ||
| 77 | ARM_Dynarmic::ARM_Dynarmic(PrivilegeMode initial_mode) { | 75 | ARM_Dynarmic::ARM_Dynarmic() { |
| 78 | } | 76 | } |
| 79 | 77 | ||
| 80 | void ARM_Dynarmic::MapBackingMemory(VAddr address, size_t size, u8* memory, Kernel::VMAPermission perms) { | 78 | void ARM_Dynarmic::MapBackingMemory(VAddr address, size_t size, u8* memory, Kernel::VMAPermission perms) { |
| @@ -111,13 +109,6 @@ u32 ARM_Dynarmic::GetVFPReg(int index) const { | |||
| 111 | void ARM_Dynarmic::SetVFPReg(int index, u32 value) { | 109 | void ARM_Dynarmic::SetVFPReg(int index, u32 value) { |
| 112 | } | 110 | } |
| 113 | 111 | ||
| 114 | u32 ARM_Dynarmic::GetVFPSystemReg(VFPSystemRegister reg) const { | ||
| 115 | return {}; | ||
| 116 | } | ||
| 117 | |||
| 118 | void ARM_Dynarmic::SetVFPSystemReg(VFPSystemRegister reg, u32 value) { | ||
| 119 | } | ||
| 120 | |||
| 121 | u32 ARM_Dynarmic::GetCPSR() const { | 112 | u32 ARM_Dynarmic::GetCPSR() const { |
| 122 | return jit->Cpsr(); | 113 | return jit->Cpsr(); |
| 123 | } | 114 | } |
| @@ -126,13 +117,6 @@ void ARM_Dynarmic::SetCPSR(u32 cpsr) { | |||
| 126 | jit->Cpsr() = cpsr; | 117 | jit->Cpsr() = cpsr; |
| 127 | } | 118 | } |
| 128 | 119 | ||
| 129 | u32 ARM_Dynarmic::GetCP15Register(CP15Register reg) { | ||
| 130 | return {}; | ||
| 131 | } | ||
| 132 | |||
| 133 | void ARM_Dynarmic::SetCP15Register(CP15Register reg, u32 value) { | ||
| 134 | } | ||
| 135 | |||
| 136 | VAddr ARM_Dynarmic::GetTlsAddress() const { | 120 | VAddr ARM_Dynarmic::GetTlsAddress() const { |
| 137 | return jit->TlsAddr(); | 121 | return jit->TlsAddr(); |
| 138 | } | 122 | } |
diff --git a/src/core/arm/dynarmic/arm_dynarmic.h b/src/core/arm/dynarmic/arm_dynarmic.h index 6567359b0..5c7f516d8 100644 --- a/src/core/arm/dynarmic/arm_dynarmic.h +++ b/src/core/arm/dynarmic/arm_dynarmic.h | |||
| @@ -9,7 +9,6 @@ | |||
| 9 | #include <dynarmic/dynarmic.h> | 9 | #include <dynarmic/dynarmic.h> |
| 10 | #include "common/common_types.h" | 10 | #include "common/common_types.h" |
| 11 | #include "core/arm/arm_interface.h" | 11 | #include "core/arm/arm_interface.h" |
| 12 | #include "core/arm/skyeye_common/armstate.h" | ||
| 13 | 12 | ||
| 14 | namespace Memory { | 13 | namespace Memory { |
| 15 | struct PageTable; | 14 | struct PageTable; |
| @@ -17,7 +16,7 @@ struct PageTable; | |||
| 17 | 16 | ||
| 18 | class ARM_Dynarmic final : public ARM_Interface { | 17 | class ARM_Dynarmic final : public ARM_Interface { |
| 19 | public: | 18 | public: |
| 20 | ARM_Dynarmic(PrivilegeMode initial_mode); | 19 | ARM_Dynarmic(); |
| 21 | 20 | ||
| 22 | void MapBackingMemory(VAddr address, size_t size, u8* memory, Kernel::VMAPermission perms) override; | 21 | void MapBackingMemory(VAddr address, size_t size, u8* memory, Kernel::VMAPermission perms) override; |
| 23 | 22 | ||
| @@ -29,12 +28,8 @@ public: | |||
| 29 | void SetExtReg(int index, u128& value) override; | 28 | void SetExtReg(int index, u128& value) override; |
| 30 | u32 GetVFPReg(int index) const override; | 29 | u32 GetVFPReg(int index) const override; |
| 31 | void SetVFPReg(int index, u32 value) override; | 30 | void SetVFPReg(int index, u32 value) override; |
| 32 | u32 GetVFPSystemReg(VFPSystemRegister reg) const override; | ||
| 33 | void SetVFPSystemReg(VFPSystemRegister reg, u32 value) override; | ||
| 34 | u32 GetCPSR() const override; | 31 | u32 GetCPSR() const override; |
| 35 | void SetCPSR(u32 cpsr) override; | 32 | void SetCPSR(u32 cpsr) override; |
| 36 | u32 GetCP15Register(CP15Register reg) override; | ||
| 37 | void SetCP15Register(CP15Register reg, u32 value) override; | ||
| 38 | VAddr GetTlsAddress() const override; | 33 | VAddr GetTlsAddress() const override; |
| 39 | void SetTlsAddress(VAddr address) override; | 34 | void SetTlsAddress(VAddr address) override; |
| 40 | 35 | ||
diff --git a/src/core/arm/dynarmic/arm_dynarmic_cp15.cpp b/src/core/arm/dynarmic/arm_dynarmic_cp15.cpp deleted file mode 100644 index b1fdce096..000000000 --- a/src/core/arm/dynarmic/arm_dynarmic_cp15.cpp +++ /dev/null | |||
| @@ -1,88 +0,0 @@ | |||
| 1 | // Copyright 2017 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "core/arm/dynarmic/arm_dynarmic_cp15.h" | ||
| 6 | #include "core/arm/skyeye_common/arm_regformat.h" | ||
| 7 | #include "core/arm/skyeye_common/armstate.h" | ||
| 8 | |||
| 9 | using Callback = Dynarmic::Coprocessor::Callback; | ||
| 10 | using CallbackOrAccessOneWord = Dynarmic::Coprocessor::CallbackOrAccessOneWord; | ||
| 11 | using CallbackOrAccessTwoWords = Dynarmic::Coprocessor::CallbackOrAccessTwoWords; | ||
| 12 | |||
| 13 | DynarmicCP15::DynarmicCP15(const std::shared_ptr<ARMul_State>& state) : interpreter_state(state) {} | ||
| 14 | |||
| 15 | DynarmicCP15::~DynarmicCP15() = default; | ||
| 16 | |||
| 17 | boost::optional<Callback> DynarmicCP15::CompileInternalOperation(bool two, unsigned opc1, | ||
| 18 | CoprocReg CRd, CoprocReg CRn, | ||
| 19 | CoprocReg CRm, unsigned opc2) { | ||
| 20 | return boost::none; | ||
| 21 | } | ||
| 22 | |||
| 23 | CallbackOrAccessOneWord DynarmicCP15::CompileSendOneWord(bool two, unsigned opc1, CoprocReg CRn, | ||
| 24 | CoprocReg CRm, unsigned opc2) { | ||
| 25 | // TODO(merry): Privileged CP15 registers | ||
| 26 | |||
| 27 | if (!two && CRn == CoprocReg::C7 && opc1 == 0 && CRm == CoprocReg::C5 && opc2 == 4) { | ||
| 28 | // This is a dummy write, we ignore the value written here. | ||
| 29 | return &interpreter_state->CP15[CP15_FLUSH_PREFETCH_BUFFER]; | ||
| 30 | } | ||
| 31 | |||
| 32 | if (!two && CRn == CoprocReg::C7 && opc1 == 0 && CRm == CoprocReg::C10) { | ||
| 33 | switch (opc2) { | ||
| 34 | case 4: | ||
| 35 | // This is a dummy write, we ignore the value written here. | ||
| 36 | return &interpreter_state->CP15[CP15_DATA_SYNC_BARRIER]; | ||
| 37 | case 5: | ||
| 38 | // This is a dummy write, we ignore the value written here. | ||
| 39 | return &interpreter_state->CP15[CP15_DATA_MEMORY_BARRIER]; | ||
| 40 | default: | ||
| 41 | return boost::blank{}; | ||
| 42 | } | ||
| 43 | } | ||
| 44 | |||
| 45 | if (!two && CRn == CoprocReg::C13 && opc1 == 0 && CRm == CoprocReg::C0 && opc2 == 2) { | ||
| 46 | return &interpreter_state->CP15[CP15_THREAD_UPRW]; | ||
| 47 | } | ||
| 48 | |||
| 49 | return boost::blank{}; | ||
| 50 | } | ||
| 51 | |||
| 52 | CallbackOrAccessTwoWords DynarmicCP15::CompileSendTwoWords(bool two, unsigned opc, CoprocReg CRm) { | ||
| 53 | return boost::blank{}; | ||
| 54 | } | ||
| 55 | |||
| 56 | CallbackOrAccessOneWord DynarmicCP15::CompileGetOneWord(bool two, unsigned opc1, CoprocReg CRn, | ||
| 57 | CoprocReg CRm, unsigned opc2) { | ||
| 58 | // TODO(merry): Privileged CP15 registers | ||
| 59 | |||
| 60 | if (!two && CRn == CoprocReg::C13 && opc1 == 0 && CRm == CoprocReg::C0) { | ||
| 61 | switch (opc2) { | ||
| 62 | case 2: | ||
| 63 | return &interpreter_state->CP15[CP15_THREAD_UPRW]; | ||
| 64 | case 3: | ||
| 65 | return &interpreter_state->CP15[CP15_THREAD_URO]; | ||
| 66 | default: | ||
| 67 | return boost::blank{}; | ||
| 68 | } | ||
| 69 | } | ||
| 70 | |||
| 71 | return boost::blank{}; | ||
| 72 | } | ||
| 73 | |||
| 74 | CallbackOrAccessTwoWords DynarmicCP15::CompileGetTwoWords(bool two, unsigned opc, CoprocReg CRm) { | ||
| 75 | return boost::blank{}; | ||
| 76 | } | ||
| 77 | |||
| 78 | boost::optional<Callback> DynarmicCP15::CompileLoadWords(bool two, bool long_transfer, | ||
| 79 | CoprocReg CRd, | ||
| 80 | boost::optional<u8> option) { | ||
| 81 | return boost::none; | ||
| 82 | } | ||
| 83 | |||
| 84 | boost::optional<Callback> DynarmicCP15::CompileStoreWords(bool two, bool long_transfer, | ||
| 85 | CoprocReg CRd, | ||
| 86 | boost::optional<u8> option) { | ||
| 87 | return boost::none; | ||
| 88 | } | ||
diff --git a/src/core/arm/dynarmic/arm_dynarmic_cp15.h b/src/core/arm/dynarmic/arm_dynarmic_cp15.h deleted file mode 100644 index 7fa54e14c..000000000 --- a/src/core/arm/dynarmic/arm_dynarmic_cp15.h +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | // Copyright 2017 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include <memory> | ||
| 6 | #include <dynarmic/coprocessor.h> | ||
| 7 | #include "common/common_types.h" | ||
| 8 | |||
| 9 | struct ARMul_State; | ||
| 10 | |||
| 11 | class DynarmicCP15 final : public Dynarmic::Coprocessor { | ||
| 12 | public: | ||
| 13 | explicit DynarmicCP15(const std::shared_ptr<ARMul_State>&); | ||
| 14 | ~DynarmicCP15() override; | ||
| 15 | |||
| 16 | boost::optional<Callback> CompileInternalOperation(bool two, unsigned opc1, CoprocReg CRd, | ||
| 17 | CoprocReg CRn, CoprocReg CRm, | ||
| 18 | unsigned opc2) override; | ||
| 19 | CallbackOrAccessOneWord CompileSendOneWord(bool two, unsigned opc1, CoprocReg CRn, | ||
| 20 | CoprocReg CRm, unsigned opc2) override; | ||
| 21 | CallbackOrAccessTwoWords CompileSendTwoWords(bool two, unsigned opc, CoprocReg CRm) override; | ||
| 22 | CallbackOrAccessOneWord CompileGetOneWord(bool two, unsigned opc1, CoprocReg CRn, CoprocReg CRm, | ||
| 23 | unsigned opc2) override; | ||
| 24 | CallbackOrAccessTwoWords CompileGetTwoWords(bool two, unsigned opc, CoprocReg CRm) override; | ||
| 25 | boost::optional<Callback> CompileLoadWords(bool two, bool long_transfer, CoprocReg CRd, | ||
| 26 | boost::optional<u8> option) override; | ||
| 27 | boost::optional<Callback> CompileStoreWords(bool two, bool long_transfer, CoprocReg CRd, | ||
| 28 | boost::optional<u8> option) override; | ||
| 29 | |||
| 30 | private: | ||
| 31 | std::shared_ptr<ARMul_State> interpreter_state; | ||
| 32 | }; | ||