Implement COP1_S_ROUND_L in cpu interpreter

This commit is contained in:
LegendOfDragoon 2016-05-22 23:20:49 -07:00
parent f447e81248
commit b2b10969c9
3 changed files with 9 additions and 2 deletions

View File

@ -481,7 +481,7 @@ R4300iOp::Func * R4300iOp::BuildInterpreter()
Jump_CoP1_S[5] = COP1_S_ABS;
Jump_CoP1_S[6] = COP1_S_MOV;
Jump_CoP1_S[7] = COP1_S_NEG;
Jump_CoP1_S[8] = UnknownOpcode;
Jump_CoP1_S[8] = COP1_S_ROUND_L;
Jump_CoP1_S[9] = COP1_S_TRUNC_L;
Jump_CoP1_S[10] = COP1_S_CEIL_L; //added by Witten
Jump_CoP1_S[11] = COP1_S_FLOOR_L; //added by Witten
@ -2461,6 +2461,12 @@ void R4300iOp::COP1_S_NEG()
*(float *)_FPR_S[m_Opcode.fd] = (*(float *)_FPR_S[m_Opcode.fs] * -1.0f);
}
void R4300iOp::COP1_S_ROUND_L()
{
TEST_COP1_USABLE_EXCEPTION();
Float_RoundToInteger64(&*(int64_t *)_FPR_D[m_Opcode.fd], &*(float *)_FPR_S[m_Opcode.fs], FE_TONEAREST);
}
void R4300iOp::COP1_S_TRUNC_L()
{
TEST_COP1_USABLE_EXCEPTION();

View File

@ -160,6 +160,7 @@ public:
static void COP1_S_ABS();
static void COP1_S_MOV();
static void COP1_S_NEG();
static void COP1_S_ROUND_L();
static void COP1_S_TRUNC_L();
static void COP1_S_CEIL_L(); //added by Witten
static void COP1_S_FLOOR_L(); //added by Witten

View File

@ -376,7 +376,7 @@ R4300iOp32::Func * R4300iOp32::BuildInterpreter()
Jump_CoP1_S[5] = R4300iOp::COP1_S_ABS;
Jump_CoP1_S[6] = R4300iOp::COP1_S_MOV;
Jump_CoP1_S[7] = R4300iOp::COP1_S_NEG;
Jump_CoP1_S[8] = R4300iOp::UnknownOpcode;
Jump_CoP1_S[8] = R4300iOp::COP1_S_ROUND_L;
Jump_CoP1_S[9] = R4300iOp::COP1_S_TRUNC_L;
Jump_CoP1_S[10] = R4300iOp::COP1_S_CEIL_L; //added by Witten
Jump_CoP1_S[11] = R4300iOp::COP1_S_FLOOR_L; //added by Witten