diff options
author | Noah Gibbs <the.codefolio.guy@gmail.com> | 2022-08-05 15:26:07 +0100 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2022-08-29 08:47:07 -0700 |
commit | d131b410259bef45757e4bec02c9c62c88033fc8 (patch) | |
tree | 2dcbe595a62900f29e7bc67bda5dc3e73c085221 | |
parent | 74527a764d42ebf9e7f780915dc9d73e760ed168 (diff) |
Fix to float guard in jit_guard_known_klass to use the correct output operand. (https://github.com/Shopify/ruby/pull/365)
-rw-r--r-- | yjit/src/codegen.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs index 2862016061..ca5958723e 100644 --- a/yjit/src/codegen.rs +++ b/yjit/src/codegen.rs @@ -3468,8 +3468,8 @@ fn jit_guard_known_klass( // We will guard flonum vs heap float as though they were separate classes asm.comment("guard object is flonum"); - asm.and(obj_opnd, Opnd::UImm(RUBY_FLONUM_MASK as u64)); - asm.cmp(obj_opnd, Opnd::UImm(RUBY_FLONUM_FLAG as u64)); + let flag_bits = asm.and(obj_opnd, Opnd::UImm(RUBY_FLONUM_MASK as u64)); + asm.cmp(flag_bits, Opnd::UImm(RUBY_FLONUM_FLAG as u64)); jit_chain_guard(JCC_JNE, jit, ctx, asm, ocb, max_chain_depth, side_exit); ctx.upgrade_opnd_type(insn_opnd, Type::Flonum); } |