]> git.unchartedbackwaters.co.uk Git - francis/libjit.git/commitdiff
amend debug info in compile_block()
authorAleksey Demakov <ademakov@gmail.com>
Fri, 1 Jul 2011 20:00:31 +0000 (03:00 +0700)
committerAleksey Demakov <ademakov@gmail.com>
Fri, 1 Jul 2011 20:00:31 +0000 (03:00 +0700)
ChangeLog
jit/jit-compile.c

index a1440c73a56e41664b732e4e8817b049cad2703e..2d085f6dabe77c04b7a51c3a294c495a2d98eef3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-07-02  Aleksey Demakov  <ademakov@gmail.com>
+
+       * jit/jit-compile.c (compile_block): amend debug info
+
 2010-11-28  Klaus Treichel  <ktreichel@web.de>
 
        * config/jit-opcodes.ops: Set the destination value type for the
index 891091292bd42d61782983fb4207f708d9ed880e..9246172931e601a96d631b64f91564dfa4e04b3b 100644 (file)
@@ -26,6 +26,7 @@
 #include "jit-reg-alloc.h"
 #include "jit-setjmp.h"
 #ifdef _JIT_COMPILE_DEBUG
+# include <jit/jit-dump.h>
 # include <stdio.h>
 #endif
 
@@ -161,7 +162,7 @@ compile_block(jit_gencode_t gen, jit_function_t func, jit_block_t block)
        jit_insn_t insn;
 
 #ifdef _JIT_COMPILE_DEBUG
-       printf("Block #%d: %d\n", func->builder->block_count++, block->label);
+       printf("Block #%d: %d\n\n", func->builder->block_count++, block->label);
 #endif
 
        /* Iterate over all blocks in the function */
@@ -171,8 +172,9 @@ compile_block(jit_gencode_t gen, jit_function_t func, jit_block_t block)
 #ifdef _JIT_COMPILE_DEBUG
                unsigned char *p1, *p2;
                p1 = gen->posn.ptr;
-               printf("Insn: %5d, Opcode: 0x%04x\n", func->builder->insn_count++, insn->opcode);
-               printf("Start of binary code: 0x%08x\n", p1);
+               printf("Insn #%d: ", func->builder->insn_count++);
+               jit_dump_insn(stdout, func, insn);
+               printf("\nStart of binary code: 0x%08x\n", p1);
 #endif
 
                switch(insn->opcode)