Switching tracing order to prevent skipping traces of branch instructions.

This commit is contained in:
Ben Vanik
2013-09-06 23:21:08 -07:00
parent 1a3fed942d
commit d5b8a2091a
3 changed files with 25 additions and 25 deletions

View File

@@ -624,6 +624,7 @@ void X64Emitter::GenerateBasicBlock(FunctionBlock* block) {
typedef int (*InstrEmitter)(X64Emitter& g, X86Compiler& c, InstrData& i);
InstrEmitter emit = (InstrEmitter)i.type->emit;
TraceInstruction(i);
if (!i.type->emit || emit(*this, compiler_, i)) {
// This printf is handy for sort/uniquify to find instructions.
printf("unimplinstr %s\n", i.type->name);
@@ -633,9 +634,6 @@ void X64Emitter::GenerateBasicBlock(FunctionBlock* block) {
TraceInvalidInstruction(i);
}
TraceInstruction(i);
}
// If we fall through, create the branch.
if (block->outgoing_type == FunctionBlock::kTargetNone) {
// BasicBlock* next_bb = GetNextBasicBlock();