mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Set T_FIXNUM type tags in opt_plus, opt_minus
This commit is contained in:
parent
c61238a276
commit
36232a48a6
2 changed files with 9 additions and 2 deletions
7
ujit.rb
7
ujit.rb
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue