diff --git a/Source/RSP/Recompiler Ops.c b/Source/RSP/Recompiler Ops.c index 594f3c925..894839d9f 100644 --- a/Source/RSP/Recompiler Ops.c +++ b/Source/RSP/Recompiler Ops.c @@ -2451,14 +2451,14 @@ void Compile_Vector_VMUDM ( void ) { Push(x86_EBP); sprintf(Reg, "RSP_Vect[%i].HW[0]", RSPOpC.rd); - MoveOffsetToX86reg((DWORD)&RSP_Vect[RSPOpC.rd].HW[0], Reg, x86_EBP); + MoveOffsetToX86reg((size_t)&RSP_Vect[RSPOpC.rd].HW[0], Reg, x86_EBP); if (bWriteToDest) { sprintf(Reg, "RSP_Vect[%i].HW[0]", RSPOpC.sa); - MoveOffsetToX86reg((DWORD)&RSP_Vect[RSPOpC.sa].HW[0], Reg, x86_ECX); + MoveOffsetToX86reg((size_t)&RSP_Vect[RSPOpC.sa].HW[0], Reg, x86_ECX); } else if (!bOptimize) { sprintf(Reg, "RSP_Vect[%i].HW[0]", RSPOpC.rt); - MoveOffsetToX86reg((DWORD)&RSP_Vect[RSPOpC.rt].HW[0], Reg, x86_ECX); + MoveOffsetToX86reg((size_t)&RSP_Vect[RSPOpC.rt].HW[0], Reg, x86_ECX); } for (count = 0; count < 8; count++) { @@ -2575,7 +2575,7 @@ void Compile_Vector_VMUDN ( void ) { Push(x86_EBP); sprintf(Reg, "RSP_Vect[%i].HW[0]", RSPOpC.rd); - MoveOffsetToX86reg((DWORD)&RSP_Vect[RSPOpC.rd].HW[0], Reg, x86_EBP); + MoveOffsetToX86reg((size_t)&RSP_Vect[RSPOpC.rd].HW[0], Reg, x86_EBP); for (count = 0; count < 8; count++) { CPU_Message(" Iteration: %i", count); @@ -2719,7 +2719,7 @@ void Compile_Vector_VMUDH ( void ) { */ sprintf(Reg, "RSP_Vect[%i].HW[0]", RSPOpC.rd); - MoveOffsetToX86reg((DWORD)&RSP_Vect[RSPOpC.rd].HW[0], Reg, x86_EBP); + MoveOffsetToX86reg((size_t)&RSP_Vect[RSPOpC.rd].HW[0], Reg, x86_EBP); MoveSxX86RegPtrDispToX86RegHalf(x86_EBP, 0, x86_EAX); MoveSxX86RegPtrDispToX86RegHalf(x86_EBP, 2, x86_ECX); @@ -2732,7 +2732,7 @@ void Compile_Vector_VMUDH ( void ) { ImulX86RegToX86Reg(x86_ESI, x86_EBX); XorX86RegToX86Reg(x86_EDX, x86_EDX); - MoveOffsetToX86reg((DWORD)&RSP_ACCUM[0].W[0], "RSP_ACCUM[0].W[0]", x86_EBP); + MoveOffsetToX86reg((size_t)&RSP_ACCUM[0].W[0], "RSP_ACCUM[0].W[0]", x86_EBP); MoveX86RegToX86regPointerDisp(x86_EDX, x86_EBP, 0); MoveX86RegToX86regPointerDisp(x86_EAX, x86_EBP, 4); @@ -2748,7 +2748,7 @@ void Compile_Vector_VMUDH ( void ) { */ sprintf(Reg, "RSP_Vect[%i].HW[0]", RSPOpC.rd); - MoveOffsetToX86reg((DWORD)&RSP_Vect[RSPOpC.rd].HW[0], Reg, x86_EBP); + MoveOffsetToX86reg((size_t)&RSP_Vect[RSPOpC.rd].HW[0], Reg, x86_EBP); MoveSxX86RegPtrDispToX86RegHalf(x86_EBP, 8, x86_EAX); MoveSxX86RegPtrDispToX86RegHalf(x86_EBP, 10, x86_ECX); @@ -2761,7 +2761,7 @@ void Compile_Vector_VMUDH ( void ) { ImulX86RegToX86Reg(x86_ESI, x86_EBX); XorX86RegToX86Reg(x86_EDX, x86_EDX); - MoveOffsetToX86reg((DWORD)&RSP_ACCUM[0].W[0], "RSP_ACCUM[0].W[0]", x86_EBP); + MoveOffsetToX86reg((size_t)&RSP_ACCUM[0].W[0], "RSP_ACCUM[0].W[0]", x86_EBP); MoveX86RegToX86regPointerDisp(x86_EDX, x86_EBP, 32); MoveX86RegToX86regPointerDisp(x86_EAX, x86_EBP, 36); @@ -2987,14 +2987,14 @@ void Compile_Vector_VMADM ( void ) { Push(x86_EBP); sprintf(Reg, "RSP_Vect[%i].HW[0]", RSPOpC.rd); - MoveOffsetToX86reg((DWORD)&RSP_Vect[RSPOpC.rd].HW[0], Reg, x86_EBP); + MoveOffsetToX86reg((size_t)&RSP_Vect[RSPOpC.rd].HW[0], Reg, x86_EBP); if (bWriteToDest) { sprintf(Reg, "RSP_Vect[%i].HW[0]", RSPOpC.sa); - MoveOffsetToX86reg((DWORD)&RSP_Vect[RSPOpC.sa].HW[0], Reg, x86_ECX); + MoveOffsetToX86reg((size_t)&RSP_Vect[RSPOpC.sa].HW[0], Reg, x86_ECX); } else if (!bOptimize) { sprintf(Reg, "RSP_Vect[%i].HW[0]", RSPOpC.rt); - MoveOffsetToX86reg((DWORD)&RSP_Vect[RSPOpC.rt].HW[0], Reg, x86_ECX); + MoveOffsetToX86reg((size_t)&RSP_Vect[RSPOpC.rt].HW[0], Reg, x86_ECX); } for (count = 0; count < 8; count++) { @@ -3070,7 +3070,7 @@ void Compile_Vector_VMADN ( void ) { Push(x86_EBP); sprintf(Reg, "RSP_Vect[%i].HW[0]", RSPOpC.rd); - MoveOffsetToX86reg((DWORD)&RSP_Vect[RSPOpC.rd].HW[0], Reg, x86_EBP); + MoveOffsetToX86reg((size_t)&RSP_Vect[RSPOpC.rd].HW[0], Reg, x86_EBP); for (count = 0; count < 8; count++) { CPU_Message(" Iteration: %i", count); @@ -3146,7 +3146,7 @@ void Compile_Vector_VMADH ( void ) { if (bWriteToDest == FALSE && bOptimize == TRUE) { Push(x86_EBP); sprintf(Reg, "RSP_Vect[%i].HW[0]", RSPOpC.rd); - MoveOffsetToX86reg((DWORD)&RSP_Vect[RSPOpC.rd].HW[0], Reg, x86_EBP); + MoveOffsetToX86reg((size_t)&RSP_Vect[RSPOpC.rd].HW[0], Reg, x86_EBP); /* * Pipe lined segment 0 @@ -3196,14 +3196,14 @@ void Compile_Vector_VMADH ( void ) { } else { Push(x86_EBP); sprintf(Reg, "RSP_Vect[%i].HW[0]", RSPOpC.rd); - MoveOffsetToX86reg((DWORD)&RSP_Vect[RSPOpC.rd].HW[0], Reg, x86_EBP); + MoveOffsetToX86reg((size_t)&RSP_Vect[RSPOpC.rd].HW[0], Reg, x86_EBP); if (bWriteToDest) { sprintf(Reg, "RSP_Vect[%i].HW[0]", RSPOpC.sa); - MoveOffsetToX86reg((DWORD)&RSP_Vect[RSPOpC.sa].HW[0], Reg, x86_ECX); + MoveOffsetToX86reg((size_t)&RSP_Vect[RSPOpC.sa].HW[0], Reg, x86_ECX); } else if (!bOptimize) { sprintf(Reg, "RSP_Vect[%i].HW[0]", RSPOpC.rt); - MoveOffsetToX86reg((DWORD)&RSP_Vect[RSPOpC.rt].HW[0], Reg, x86_ECX); + MoveOffsetToX86reg((size_t)&RSP_Vect[RSPOpC.rt].HW[0], Reg, x86_ECX); } for (count = 0; count < 8; count++) { @@ -3686,7 +3686,7 @@ void Compile_Vector_VADDC ( void ) { Push(x86_EBP); sprintf(Reg, "RSP_Vect[%i].HW[0]", RSPOpC.rd); - MoveOffsetToX86reg((DWORD)&RSP_Vect[RSPOpC.rd].HW[0], Reg, x86_EBP); + MoveOffsetToX86reg((size_t)&RSP_Vect[RSPOpC.rd].HW[0], Reg, x86_EBP); for (count = 0; count < 8; count++) { CPU_Message(" Iteration: %i", count); @@ -5251,7 +5251,7 @@ void Compile_Opcode_LDV ( void ) { CPU_Message(" Unaligned:"); x86_SetBranch32b(Jump[0], RecompPos); sprintf(Reg, "RSP_Vect[%i].UB[%i]", RSPOpC.rt, 15 - RSPOpC.del); - MoveOffsetToX86reg((DWORD)&RSP_Vect[RSPOpC.rt].UB[15 - RSPOpC.del], Reg, x86_EDI); + MoveOffsetToX86reg((size_t)&RSP_Vect[RSPOpC.rt].UB[15 - RSPOpC.del], Reg, x86_EDI); length = 8; if (RSPOpC.del == 12){ length = 4; @@ -5993,7 +5993,7 @@ void Compile_Opcode_SDV ( void ) { x86_SetBranch32b((DWORD*)Jump[0], (DWORD*)RecompPos); sprintf(Reg, "RSP_Vect[%i].UB[%i]", RSPOpC.rt, 15 - RSPOpC.del); - MoveOffsetToX86reg((DWORD)&RSP_Vect[RSPOpC.rt].UB[15 - RSPOpC.del], Reg, x86_EDI); + MoveOffsetToX86reg((size_t)&RSP_Vect[RSPOpC.rt].UB[15 - RSPOpC.del], Reg, x86_EDI); MoveConstToX86reg(8, x86_ECX); CPU_Message(" Loop:"); diff --git a/Source/RSP/X86.c b/Source/RSP/X86.c index 3abdf6c0e..b28b9cf48 100644 --- a/Source/RSP/X86.c +++ b/Source/RSP/X86.c @@ -1178,7 +1178,7 @@ void MoveConstToX86reg(DWORD Const, int x86reg) { PUTDST32(RecompPos,Const); } -void MoveOffsetToX86reg(DWORD Const, char * VariableName, int x86reg) { +void MoveOffsetToX86reg(size_t Const, char * VariableName, int x86reg) { CPU_Message(" mov %s, offset %s",x86_Name(x86reg),VariableName); switch (x86reg) { case x86_EAX: PUTDST16(RecompPos,0xC0C7); break; diff --git a/Source/RSP/X86.h b/Source/RSP/X86.h index 6723fe11b..c3e003213 100644 --- a/Source/RSP/X86.h +++ b/Source/RSP/X86.h @@ -114,7 +114,7 @@ void MoveConstToN64Mem ( DWORD Const, int AddrReg ); void MoveConstToN64MemDisp ( DWORD Const, int AddrReg, BYTE Disp ); void MoveConstToVariable ( DWORD Const, void *Variable, char *VariableName ); void MoveConstToX86reg ( DWORD Const, int x86reg ); -void MoveOffsetToX86reg ( DWORD Const, char * VariableName, int x86reg ); +void MoveOffsetToX86reg ( size_t Const, char * VariableName, int x86reg ); void MoveX86regByteToX86regPointer ( int Source, int AddrReg ); void MoveX86regHalfToX86regPointer ( int Source, int AddrReg ); void MoveX86regHalfToX86regPointerDisp ( int Source, int AddrReg, BYTE Disp);