From 25e2125a632e3284b1d122488657713736206707 Mon Sep 17 00:00:00 2001 From: zilmar Date: Sat, 1 Oct 2016 10:35:31 +1000 Subject: [PATCH] [Android[ Add StoreArmRegToArmRegPointer --- .../Project64-core/N64System/Recompiler/Arm/ArmOps.cpp | 10 ++++++++++ .../Project64-core/N64System/Recompiler/Arm/ArmOps.h | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.cpp b/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.cpp index 92fa2e9e1..fb5471b0b 100644 --- a/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.cpp +++ b/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.cpp @@ -728,6 +728,16 @@ void CArmOps::StoreArmRegToArmRegPointer(ArmReg Reg, ArmReg RegPointer, uint8_t } } +void CArmOps::StoreFloatingPointControlReg(ArmReg SourceReg) +{ + CPU_Message(" vmsr\tfpscr, %s", ArmRegName(SourceReg)); + Arm32Opcode op = {0}; + op.fpscr.opcode2 = 0xA10; + op.fpscr.rt = SourceReg; + op.fpscr.opcode = 0xEEE1; + AddCode32(op.Hex); +} + void CArmOps::StoreFloatRegToArmRegPointer(ArmFpuSingle Reg, ArmReg RegPointer, uint8_t Offset) { if (Offset != 0) diff --git a/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.h b/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.h index c1bd01b99..355ffc690 100644 --- a/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.h +++ b/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.h @@ -167,7 +167,8 @@ protected: static void ShiftRightUnsignImmed(ArmReg DestReg, ArmReg SourceReg, uint32_t shift); static void ShiftLeftImmed(ArmReg DestReg, ArmReg SourceReg, uint32_t shift); static void SignExtendByte(ArmReg Reg); - static void StoreArmRegToArmRegPointer(ArmReg Reg, ArmReg RegPointer, uint8_t offset); + static void StoreArmRegToArmRegPointer(ArmReg Reg, ArmReg RegPointer, uint8_t Offset); + static void StoreFloatingPointControlReg(ArmReg SourceReg); static void StoreFloatRegToArmRegPointer(ArmFpuSingle Reg, ArmReg RegPointer, uint8_t Offset); static void SubConstFromArmReg(ArmReg Reg, uint32_t Const); static void SubConstFromVariable(uint32_t Const, void * Variable, const char * VariableName);