mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Check only symbol flag bits (#6301)
* Check only symbol flag bits * Check all 4 bits
This commit is contained in:
parent
737402e938
commit
ddca3482ef
Notes:
git
2022-08-30 10:05:38 +09:00
Merged-By: maximecb <maximecb@ruby-lang.org>
1 changed files with 2 additions and 1 deletions
|
@ -3454,7 +3454,8 @@ fn jit_guard_known_klass(
|
||||||
|
|
||||||
asm.comment("guard object is static symbol");
|
asm.comment("guard object is static symbol");
|
||||||
assert!(RUBY_SPECIAL_SHIFT == 8);
|
assert!(RUBY_SPECIAL_SHIFT == 8);
|
||||||
asm.cmp(obj_opnd, Opnd::UImm(RUBY_SYMBOL_FLAG as u64));
|
let flag_bits = asm.and(obj_opnd, Opnd::UImm(0xf));
|
||||||
|
asm.cmp(flag_bits, Opnd::UImm(RUBY_SYMBOL_FLAG as u64));
|
||||||
jit_chain_guard(JCC_JNE, jit, ctx, asm, ocb, max_chain_depth, side_exit);
|
jit_chain_guard(JCC_JNE, jit, ctx, asm, ocb, max_chain_depth, side_exit);
|
||||||
ctx.upgrade_opnd_type(insn_opnd, Type::ImmSymbol);
|
ctx.upgrade_opnd_type(insn_opnd, Type::ImmSymbol);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue