diff options
Diffstat (limited to 'src/core/arm/arm_interface.h')
-rw-r--r-- | src/core/arm/arm_interface.h | 43 |
1 files changed, 29 insertions, 14 deletions
diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h index ba528403c..0b3096347 100644 --- a/src/core/arm/arm_interface.h +++ b/src/core/arm/arm_interface.h @@ -5,6 +5,7 @@ #pragma once #include "common/common_types.h" +#include "core/hle/kernel/vm_manager.h" #include "core/arm/skyeye_common/arm_regformat.h" #include "core/arm/skyeye_common/vfp/asm_vfp.h" @@ -14,14 +15,18 @@ public: virtual ~ARM_Interface() {} struct ThreadContext { - u32 cpu_registers[13]; - u32 sp; - u32 lr; - u32 pc; - u32 cpsr; - u32 fpu_registers[64]; - u32 fpscr; - u32 fpexc; + u64 cpu_registers[30]; + u64 lr; + u64 sp; + u64 pc; + u64 cpsr; + u128 fpu_registers[32]; + u64 fpscr; + u64 fpexc; + + + // TODO(bunnei): Fix once we have proper support for tpidrro_el0, etc. in the JIT + VAddr tls_address; }; /** @@ -38,6 +43,8 @@ public: Run(1); } + virtual void MapBackingMemory(VAddr address, size_t size, u8* memory, Kernel::VMAPermission perms) {} + /// Clear all instruction cache virtual void ClearInstructionCache() = 0; @@ -48,27 +55,31 @@ public: * Set the Program Counter to an address * @param addr Address to set PC to */ - virtual void SetPC(u32 addr) = 0; + virtual void SetPC(u64 addr) = 0; /* * Get the current Program Counter * @return Returns current PC */ - virtual u32 GetPC() const = 0; + virtual u64 GetPC() const = 0; /** * Get an ARM register - * @param index Register index (0-15) + * @param index Register index * @return Returns the value in the register */ - virtual u32 GetReg(int index) const = 0; + virtual u64 GetReg(int index) const = 0; /** * Set an ARM register - * @param index Register index (0-15) + * @param index Register index * @param value Value to set register to */ - virtual void SetReg(int index, u32 value) = 0; + virtual void SetReg(int index, u64 value) = 0; + + virtual const u128& GetExtReg(int index) const = 0; + + virtual void SetExtReg(int index, u128& value) = 0; /** * Gets the value of a VFP register @@ -124,6 +135,10 @@ public: */ virtual void SetCP15Register(CP15Register reg, u32 value) = 0; + virtual VAddr GetTlsAddress() const = 0; + + virtual void SetTlsAddress(VAddr address) = 0; + /** * Saves the current CPU context * @param ctx Thread context to save |