Some code disabled

This commit is contained in:
Nekotekina 2015-04-22 00:18:34 +03:00
commit 743421881e

View file

@ -38,11 +38,11 @@ void SPURecompilerCore::Decode(const u32 code) // decode instruction and run wit
void SPURecompilerCore::Compile(u16 pos) void SPURecompilerCore::Compile(u16 pos)
{ {
const u64 stamp0 = get_system_time(); //const u64 stamp0 = get_system_time();
u64 time0 = 0; //u64 time0 = 0;
SPUDisAsm dis_asm(CPUDisAsm_InterpreterMode); //SPUDisAsm dis_asm(CPUDisAsm_InterpreterMode);
dis_asm.offset = vm::get_ptr<u8>(CPU.offset); //dis_asm.offset = vm::get_ptr<u8>(CPU.offset);
//StringLogger stringLogger; //StringLogger stringLogger;
//stringLogger.setOption(kLoggerOptionBinaryForm, true); //stringLogger.setOption(kLoggerOptionBinaryForm, true);
@ -53,7 +53,7 @@ void SPURecompilerCore::Compile(u16 pos)
compiler.addFunc(kFuncConvHost, FuncBuilder4<u32, void*, void*, void*, u32>()); compiler.addFunc(kFuncConvHost, FuncBuilder4<u32, void*, void*, void*, u32>());
const u16 start = pos; const u16 start = pos;
u32 excess = 0; //u32 excess = 0;
entry[start].count = 0; entry[start].count = 0;
X86GpVar cpu_var(compiler, kVarTypeIntPtr, "cpu"); X86GpVar cpu_var(compiler, kVarTypeIntPtr, "cpu");
@ -100,11 +100,11 @@ void SPURecompilerCore::Compile(u16 pos)
m_enc->do_finalize = false; m_enc->do_finalize = false;
if (opcode) if (opcode)
{ {
const u64 stamp1 = get_system_time(); //const u64 stamp1 = get_system_time();
// disasm for logging: // disasm for logging:
dis_asm.dump_pc = pos * 4; //dis_asm.dump_pc = pos * 4;
(*SPU_instr::rrr_list)(&dis_asm, opcode); //(*SPU_instr::rrr_list)(&dis_asm, opcode);
compiler.addComment(fmt::Format("SPU data: PC=0x%05x %s", pos * 4, dis_asm.last_opcode.c_str()).c_str()); //compiler.addComment(fmt::Format("SPU data: PC=0x%05x %s", pos * 4, dis_asm.last_opcode.c_str()).c_str());
// compile single opcode: // compile single opcode:
(*SPU_instr::rrr_list)(m_enc, opcode); (*SPU_instr::rrr_list)(m_enc, opcode);
// force finalization between every slice using absolute alignment // force finalization between every slice using absolute alignment
@ -114,17 +114,17 @@ void SPURecompilerCore::Compile(u16 pos)
m_enc->do_finalize = true; m_enc->do_finalize = true;
}*/ }*/
entry[start].count++; entry[start].count++;
time0 += get_system_time() - stamp1; //time0 += get_system_time() - stamp1;
} }
else else
{ {
m_enc->do_finalize = true; m_enc->do_finalize = true;
} }
bool fin = m_enc->do_finalize; bool fin = m_enc->do_finalize;
if (entry[pos].valid == re32(opcode)) //if (entry[pos].valid == re32(opcode))
{ //{
excess++; // excess++;
} //}
entry[pos].valid = re32(opcode); entry[pos].valid = re32(opcode);
if (fin) break; if (fin) break;
@ -141,7 +141,7 @@ void SPURecompilerCore::Compile(u16 pos)
m_enc->xmm_var[i].data = nullptr; m_enc->xmm_var[i].data = nullptr;
} }
const u64 stamp1 = get_system_time(); //const u64 stamp1 = get_system_time();
compiler.ret(pos_var); compiler.ret(pos_var);
compiler.endFunc(); compiler.endFunc();
entry[start].pointer = compiler.make(); entry[start].pointer = compiler.make();