From 793f0e5cc45d734baa7b70409f6e03855071c92b Mon Sep 17 00:00:00 2001 From: zilmar Date: Sat, 1 Oct 2016 08:38:56 +1000 Subject: [PATCH] [Android] Add LoadFloatingPointControlReg --- .../Project64-core/N64System/Recompiler/Arm/ArmOps.cpp | 10 ++++++++++ .../Project64-core/N64System/Recompiler/Arm/ArmOps.h | 1 + 2 files changed, 11 insertions(+) diff --git a/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.cpp b/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.cpp index da2c1aaea..18b19e90d 100644 --- a/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.cpp +++ b/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.cpp @@ -422,6 +422,16 @@ void CArmOps::MoveArmRegArmReg(ArmReg DestReg, ArmReg SourceReg) g_Notify->BreakPoint(__FILE__,__LINE__); } +void CArmOps::LoadFloatingPointControlReg(ArmReg DestReg) +{ + CPU_Message(" vmrs\t%s, fpscr", ArmRegName(DestReg)); + Arm32Opcode op = {0}; + op.fpscr.opcode2 = 0xA10; + op.fpscr.rt = DestReg; + op.fpscr.opcode = 0xEEF1; + AddCode32(op.Hex); +} + void CArmOps::MoveConstToArmReg(ArmReg DestReg, uint32_t Const, const char * comment) { MoveConstToArmReg(DestReg,(uint16_t)(Const & 0xFFFF),comment); diff --git a/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.h b/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.h index 7bffe2726..489410a69 100644 --- a/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.h +++ b/Source/Project64-core/N64System/Recompiler/Arm/ArmOps.h @@ -150,6 +150,7 @@ protected: static void LoadArmRegPointerToArmReg(ArmReg DestReg, ArmReg RegPointer, uint8_t Offset); static void LoadArmRegPointerToArmReg(ArmReg DestReg, ArmReg RegPointer, ArmReg RegPointer2, uint8_t shift); static void LoadArmRegPointerToFloatReg(ArmReg RegPointer, ArmFpuSingle Reg, uint8_t Offset); + static void LoadFloatingPointControlReg(ArmReg DestReg); static void MoveArmRegArmReg(ArmReg DestReg, ArmReg SourceReg); static void MoveConstToArmReg(ArmReg DestReg, uint16_t Const, const char * comment = NULL); static void MoveConstToArmRegTop(ArmReg DestReg, uint16_t Const, const char * comment = NULL);