diff options
author | Alan Wu <[email protected]> | 2021-06-18 19:05:02 -0400 |
---|---|---|
committer | Alan Wu <[email protected]> | 2021-10-20 18:19:36 -0400 |
commit | da20ff1644a274aff4d5ad22c649c85d83e7e311 (patch) | |
tree | b591726cb5ebc3818b861e493edb6888347d4a0d /yjit_codegen.c | |
parent | 7d252186fe803aa5e1fa37c953609266a2d8ba1d (diff) |
Fix bug in generic case for gen_checktype
When checking for T_HASH, which is Qnil and when the type check succeeds
we were outputting to the stack a Qnil instead of a Qtrue.
Diffstat (limited to 'yjit_codegen.c')
-rw-r--r-- | yjit_codegen.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/yjit_codegen.c b/yjit_codegen.c index 60d2338115..282231ae44 100644 --- a/yjit_codegen.c +++ b/yjit_codegen.c @@ -1421,6 +1421,7 @@ gen_checktype(jitstate_t* jit, ctx_t* ctx) mov(cb, REG0, mem_opnd(64, REG0, offsetof(struct RBasic, flags))); and(cb, REG0, imm_opnd(RUBY_T_MASK)); cmp(cb, REG0, imm_opnd(type_val)); + mov(cb, REG0, imm_opnd(Qtrue)); mov(cb, REG1, imm_opnd(Qfalse)); cmovne(cb, REG0, REG1); |