From 1a01d365b5cf05a8cce11ffdd0d19a9a3ab0039b Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Wed, 22 May 2013 22:01:34 -0700 Subject: [PATCH] Making code dumps conditional on --log_codegen --- src/xenia/cpu/libjit/libjit_emitter.cc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/xenia/cpu/libjit/libjit_emitter.cc b/src/xenia/cpu/libjit/libjit_emitter.cc index fb42381e3..6dc540976 100644 --- a/src/xenia/cpu/libjit/libjit_emitter.cc +++ b/src/xenia/cpu/libjit/libjit_emitter.cc @@ -212,12 +212,18 @@ int LibjitEmitter::MakeFunction(FunctionSymbol* symbol, jit_function_t fn) { } if (!result_code) { - // TODO(benvanik): flag - // pre - jit_dump_function(stdout, fn_, symbol->name()); + // libjit opcodes. + if (FLAGS_log_codegen) { + jit_dump_function(stdout, fn_, symbol->name()); + } + + // Compile right now. jit_function_compile(fn_); - // post - jit_dump_function(stdout, fn_, symbol->name()); + + // x64 instructions. + if (FLAGS_log_codegen) { + jit_dump_function(stdout, fn_, symbol->name()); + } XELOGE("Compile(%s): compiled to 0x%p - 0x%p (%db)", symbol->name(),