summaryrefslogtreecommitdiffstats
path: root/src/core/arm
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-08-14 00:13:25 +0200
committerbunnei <bunneidev@gmail.com>2015-08-14 00:13:25 +0200
commitcebf245504b75469f19d3cc0a6f2f66aefa66947 (patch)
tree4026f74849517f02575bb34a8d4d35d50daaccfc /src/core/arm
parentMerge pull request #1030 from archshift/force-inline (diff)
parentregisters: Support viewing VFP registers (diff)
downloadyuzu-cebf245504b75469f19d3cc0a6f2f66aefa66947.tar
yuzu-cebf245504b75469f19d3cc0a6f2f66aefa66947.tar.gz
yuzu-cebf245504b75469f19d3cc0a6f2f66aefa66947.tar.bz2
yuzu-cebf245504b75469f19d3cc0a6f2f66aefa66947.tar.lz
yuzu-cebf245504b75469f19d3cc0a6f2f66aefa66947.tar.xz
yuzu-cebf245504b75469f19d3cc0a6f2f66aefa66947.tar.zst
yuzu-cebf245504b75469f19d3cc0a6f2f66aefa66947.zip
Diffstat (limited to 'src/core/arm')
-rw-r--r--src/core/arm/arm_interface.h28
-rw-r--r--src/core/arm/dyncom/arm_dyncom.cpp16
-rw-r--r--src/core/arm/dyncom/arm_dyncom.h4
-rw-r--r--src/core/arm/skyeye_common/arm_regformat.h2
4 files changed, 49 insertions, 1 deletions
diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h
index 85ed2c698..5cffe513c 100644
--- a/src/core/arm/arm_interface.h
+++ b/src/core/arm/arm_interface.h
@@ -62,6 +62,34 @@ public:
virtual void SetReg(int index, u32 value) = 0;
/**
+ * Gets the value of a VFP register
+ * @param index Register index (0-31)
+ * @return Returns the value in the register
+ */
+ virtual u32 GetVFPReg(int index) const = 0;
+
+ /**
+ * Sets a VFP register to the given value
+ * @param index Register index (0-31)
+ * @param value Value to set register to
+ */
+ virtual void SetVFPReg(int index, u32 value) = 0;
+
+ /**
+ * Gets the current value within a given VFP system register
+ * @param reg The VFP system register
+ * @return The value within the VFP system register
+ */
+ virtual u32 GetVFPSystemReg(VFPSystemRegister reg) const = 0;
+
+ /**
+ * Sets the VFP system register to the given value
+ * @param reg The VFP system register
+ * @param value Value to set the VFP system register to
+ */
+ virtual void SetVFPSystemReg(VFPSystemRegister reg, u32 value) = 0;
+
+ /**
* Get the current CPSR register
* @return Returns the value of the CPSR register
*/
diff --git a/src/core/arm/dyncom/arm_dyncom.cpp b/src/core/arm/dyncom/arm_dyncom.cpp
index c665f706f..f3be2c857 100644
--- a/src/core/arm/dyncom/arm_dyncom.cpp
+++ b/src/core/arm/dyncom/arm_dyncom.cpp
@@ -40,6 +40,22 @@ void ARM_DynCom::SetReg(int index, u32 value) {
state->Reg[index] = value;
}
+u32 ARM_DynCom::GetVFPReg(int index) const {
+ return state->ExtReg[index];
+}
+
+void ARM_DynCom::SetVFPReg(int index, u32 value) {
+ state->ExtReg[index] = value;
+}
+
+u32 ARM_DynCom::GetVFPSystemReg(VFPSystemRegister reg) const {
+ return state->VFP[reg];
+}
+
+void ARM_DynCom::SetVFPSystemReg(VFPSystemRegister reg, u32 value) {
+ state->VFP[reg] = value;
+}
+
u32 ARM_DynCom::GetCPSR() const {
return state->Cpsr;
}
diff --git a/src/core/arm/dyncom/arm_dyncom.h b/src/core/arm/dyncom/arm_dyncom.h
index 87ab6908a..3664fd728 100644
--- a/src/core/arm/dyncom/arm_dyncom.h
+++ b/src/core/arm/dyncom/arm_dyncom.h
@@ -25,6 +25,10 @@ public:
u32 GetPC() const override;
u32 GetReg(int index) const override;
void SetReg(int index, u32 value) override;
+ u32 GetVFPReg(int index) const override;
+ void SetVFPReg(int index, u32 value) override;
+ u32 GetVFPSystemReg(VFPSystemRegister reg) const override;
+ void SetVFPSystemReg(VFPSystemRegister reg, u32 value) override;
u32 GetCPSR() const override;
void SetCPSR(u32 cpsr) override;
u32 GetCP15Register(CP15Register reg) override;
diff --git a/src/core/arm/skyeye_common/arm_regformat.h b/src/core/arm/skyeye_common/arm_regformat.h
index d1c721809..38fa97ab9 100644
--- a/src/core/arm/skyeye_common/arm_regformat.h
+++ b/src/core/arm/skyeye_common/arm_regformat.h
@@ -55,7 +55,7 @@ enum {
};
// VFP system registers
-enum {
+enum VFPSystemRegister {
VFP_FPSID,
VFP_FPSCR,
VFP_FPEXC,