Skip to content

Commit

Permalink
Don't read an operand that doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jun 20, 2018
1 parent 6fb5277 commit c14094a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jit/x64/emit.dasc
Expand Up @@ -2517,11 +2517,11 @@ void MVM_jit_emit_guard(MVMThreadContext *tc, MVMJitCompiler *compiler, MVMJitGr
MVMJitGuard *guard) {
MVMint16 op = guard->ins->info->opcode;
MVMint16 obj = guard->ins->operands[0].reg.orig;
MVMint16 spesh_idx = guard->ins->operands[1].lit_i16;
MVM_jit_log(tc, "emit guard <%s>\n", guard->ins->info->name);
/* load object and spesh slot value, except for those that don't need it */
| mov TMP1, WORK[obj];
if (op != MVM_OP_sp_guardjustconc && op != MVM_OP_sp_guardjusttype) {
MVMint16 spesh_idx = guard->ins->operands[1].lit_i16;
| get_spesh_slot TMP2, spesh_idx;
}
if (op == MVM_OP_sp_guard) {
Expand Down

0 comments on commit c14094a

Please sign in to comment.