diff options
-rw-r--r-- | ujit.rb | 7 | ||||
-rw-r--r-- | ujit_codegen.c | 4 |
2 files changed, 9 insertions, 2 deletions
@@ -28,6 +28,13 @@ module UJIT ) end end + + block_sizes = blocks.map { |block| block.code.length } + total_bytes = block_sizes.reduce(0, :+) + str << "\n" + str << "Total code size: #{total_bytes} bytes" + str << "\n" + str end if defined?(Disasm) end diff --git a/ujit_codegen.c b/ujit_codegen.c index c3e7f912d0..7c7866f403 100644 --- a/ujit_codegen.c +++ b/ujit_codegen.c @@ -611,7 +611,7 @@ gen_opt_minus(jitstate_t* jit, ctx_t* ctx) add(cb, REG0, imm_opnd(1)); // Push the output on the stack - x86opnd_t dst = ctx_stack_push(ctx, T_NONE); + x86opnd_t dst = ctx_stack_push(ctx, T_FIXNUM); mov(cb, dst, REG0); return true; @@ -657,7 +657,7 @@ gen_opt_plus(jitstate_t* jit, ctx_t* ctx) jo_ptr(cb, side_exit); // Push the output on the stack - x86opnd_t dst = ctx_stack_push(ctx, T_NONE); + x86opnd_t dst = ctx_stack_push(ctx, T_FIXNUM); mov(cb, dst, REG0); return true; |