mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix bug in putobject found by @tenderlove
This commit is contained in:
parent
2eac297f9f
commit
05d36f31ca
1 changed files with 13 additions and 1 deletions
|
@ -292,7 +292,19 @@ gen_putobject(jitstate_t* jit, ctx_t* ctx)
|
|||
{
|
||||
// Keep track of the fixnum type tag
|
||||
x86opnd_t stack_top = ctx_stack_push(ctx, T_FIXNUM);
|
||||
mov(cb, stack_top, imm_opnd((int64_t)arg));
|
||||
|
||||
x86opnd_t imm = imm_opnd((int64_t)arg);
|
||||
|
||||
// 64-bit immediates can't be directly written to memory
|
||||
if (imm.num_bits <= 32)
|
||||
{
|
||||
mov(cb, stack_top, imm);
|
||||
}
|
||||
else
|
||||
{
|
||||
mov(cb, REG0, imm);
|
||||
mov(cb, stack_top, REG0);
|
||||
}
|
||||
}
|
||||
else if (arg == Qtrue || arg == Qfalse)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue