Merge pull request #632 from cxd4/bad

`if` is not a function.
This commit is contained in:
zilmar 2015-09-30 10:55:28 +10:00
commit 83cffca119
1 changed files with 16 additions and 16 deletions

View File

@ -451,7 +451,7 @@ void Compile_ADDI ( void ) {
if (RSPOpC.rt == 0) return; if (RSPOpC.rt == 0) return;
if (RSPOpC.rt == RSPOpC.rs) { if (RSPOpC.rt == RSPOpC.rs) {
if(Immediate != 0) { if (Immediate != 0) {
AddConstToVariable(Immediate, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt)); AddConstToVariable(Immediate, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt));
} }
} else if (RSPOpC.rs == 0) { } else if (RSPOpC.rs == 0) {
@ -479,14 +479,14 @@ void Compile_ADDIU ( void ) {
if (RSPOpC.rt == 0) return; if (RSPOpC.rt == 0) return;
if (RSPOpC.rt == RSPOpC.rs) { if (RSPOpC.rt == RSPOpC.rs) {
if(Immediate != 0) { if (Immediate != 0) {
AddConstToVariable(Immediate, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt)); AddConstToVariable(Immediate, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt));
} }
} else if (RSPOpC.rs == 0) { } else if (RSPOpC.rs == 0) {
MoveConstToVariable(Immediate, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt)); MoveConstToVariable(Immediate, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt));
} else { } else {
MoveVariableToX86reg(&RSP_GPR[RSPOpC.rs].UW, GPR_Name(RSPOpC.rs), x86_EAX); MoveVariableToX86reg(&RSP_GPR[RSPOpC.rs].UW, GPR_Name(RSPOpC.rs), x86_EAX);
if(Immediate != 0) { if (Immediate != 0) {
AddConstToX86Reg(x86_EAX, Immediate); AddConstToX86Reg(x86_EAX, Immediate);
} }
MoveX86regToVariable(x86_EAX, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt)); MoveX86regToVariable(x86_EAX, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt));
@ -621,8 +621,8 @@ void Compile_COP2 (void) {
void Compile_LB ( void ) { void Compile_LB ( void ) {
int Offset = (short)RSPOpC.offset; int Offset = (short)RSPOpC.offset;
if(RSPOpC.rt == 0) return; if (RSPOpC.rt == 0)
return;
#ifndef Compile_GPRLoads #ifndef Compile_GPRLoads
Cheat_r4300iOpcode(RSP_Opcode_LB,"RSP_Opcode_LB"); return; Cheat_r4300iOpcode(RSP_Opcode_LB,"RSP_Opcode_LB"); return;
#endif #endif
@ -653,8 +653,8 @@ void Compile_LH ( void ) {
int Offset = (short)RSPOpC.offset; int Offset = (short)RSPOpC.offset;
BYTE * Jump[2]; BYTE * Jump[2];
if(RSPOpC.rt == 0) return; if (RSPOpC.rt == 0)
return;
#ifndef Compile_GPRLoads #ifndef Compile_GPRLoads
Cheat_r4300iOpcode(RSP_Opcode_LH,"RSP_Opcode_LH"); return; Cheat_r4300iOpcode(RSP_Opcode_LH,"RSP_Opcode_LH"); return;
#endif #endif
@ -717,8 +717,8 @@ void Compile_LW ( void ) {
int Offset = (short)RSPOpC.offset; int Offset = (short)RSPOpC.offset;
BYTE * Jump[2]; BYTE * Jump[2];
if(RSPOpC.rt == 0) return; if (RSPOpC.rt == 0)
return;
#ifndef Compile_GPRLoads #ifndef Compile_GPRLoads
Cheat_r4300iOpcode(RSP_Opcode_LW,"RSP_Opcode_LW"); return; Cheat_r4300iOpcode(RSP_Opcode_LW,"RSP_Opcode_LW"); return;
#endif #endif
@ -794,8 +794,8 @@ void Compile_LW ( void ) {
void Compile_LBU ( void ) { void Compile_LBU ( void ) {
int Offset = (short)RSPOpC.offset; int Offset = (short)RSPOpC.offset;
if(RSPOpC.rt == 0) return; if (RSPOpC.rt == 0)
return;
#ifndef Compile_GPRLoads #ifndef Compile_GPRLoads
Cheat_r4300iOpcode(RSP_Opcode_LBU,"RSP_Opcode_LBU"); return; Cheat_r4300iOpcode(RSP_Opcode_LBU,"RSP_Opcode_LBU"); return;
#endif #endif
@ -828,8 +828,8 @@ void Compile_LHU ( void ) {
int Offset = (short)RSPOpC.offset; int Offset = (short)RSPOpC.offset;
BYTE * Jump[2]; BYTE * Jump[2];
if(RSPOpC.rt == 0) return; if (RSPOpC.rt == 0)
return;
#ifndef Compile_GPRLoads #ifndef Compile_GPRLoads
Cheat_r4300iOpcode(RSP_Opcode_LHU,"RSP_Opcode_LHU"); return; Cheat_r4300iOpcode(RSP_Opcode_LHU,"RSP_Opcode_LHU"); return;
#endif #endif
@ -4911,7 +4911,7 @@ void Compile_Opcode_LDV ( void ) {
sprintf(Reg, "RSP_Vect[%i].B[%i]", RSPOpC.rt, 16 - RSPOpC.del - 4); sprintf(Reg, "RSP_Vect[%i].B[%i]", RSPOpC.rt, 16 - RSPOpC.del - 4);
MoveX86regToVariable(x86_EAX, &RSP_Vect[RSPOpC.rt].B[16 - RSPOpC.del - 4], Reg); MoveX86regToVariable(x86_EAX, &RSP_Vect[RSPOpC.rt].B[16 - RSPOpC.del - 4], Reg);
if(RSPOpC.del != 12){ if (RSPOpC.del != 12){
sprintf(Reg, "RSP_Vect[%i].B[%i]", RSPOpC.rt, 16 - RSPOpC.del - 8); sprintf(Reg, "RSP_Vect[%i].B[%i]", RSPOpC.rt, 16 - RSPOpC.del - 8);
MoveX86regToVariable(x86_ECX, &RSP_Vect[RSPOpC.rt].B[16 - RSPOpC.del - 8], Reg); MoveX86regToVariable(x86_ECX, &RSP_Vect[RSPOpC.rt].B[16 - RSPOpC.del - 8], Reg);
} }
@ -4933,7 +4933,7 @@ void Compile_Opcode_LDV ( void ) {
sprintf(Reg, "RSP_Vect[%i].UB[%i]", RSPOpC.rt, 15 - RSPOpC.del); 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((DWORD)&RSP_Vect[RSPOpC.rt].UB[15 - RSPOpC.del], Reg, x86_EDI);
length = 8; length = 8;
if(RSPOpC.del == 12){ if (RSPOpC.del == 12){
length = 4; length = 4;
} }
MoveConstToX86reg(length, x86_ECX); MoveConstToX86reg(length, x86_ECX);
@ -4969,7 +4969,7 @@ void Compile_Opcode_LDV ( void ) {
/* Because of byte swapping this swizzle works nicely */ /* Because of byte swapping this swizzle works nicely */
sprintf(Reg, "RSP_Vect[%i].B[%i]", RSPOpC.rt, 16 - RSPOpC.del - 4); sprintf(Reg, "RSP_Vect[%i].B[%i]", RSPOpC.rt, 16 - RSPOpC.del - 4);
MoveX86regToVariable(x86_EAX, &RSP_Vect[RSPOpC.rt].B[16 - RSPOpC.del - 4], Reg); MoveX86regToVariable(x86_EAX, &RSP_Vect[RSPOpC.rt].B[16 - RSPOpC.del - 4], Reg);
if(RSPOpC.del != 12){ if (RSPOpC.del != 12){
sprintf(Reg, "RSP_Vect[%i].B[%i]", RSPOpC.rt, 16 - RSPOpC.del - 8); sprintf(Reg, "RSP_Vect[%i].B[%i]", RSPOpC.rt, 16 - RSPOpC.del - 8);
MoveX86regToVariable(x86_ECX, &RSP_Vect[RSPOpC.rt].B[16 - RSPOpC.del - 8], Reg); MoveX86regToVariable(x86_ECX, &RSP_Vect[RSPOpC.rt].B[16 - RSPOpC.del - 8], Reg);
} }