Skip to content

Commit

Permalink
Merge pull request #256 from qwe661234/fix_remove_ir
Browse files Browse the repository at this point in the history
Fix the inaccuracy in the number of IR elements to be removed
  • Loading branch information
jserv authored Nov 5, 2023
2 parents 6294955 + 03ec122 commit 289d6aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,13 +770,13 @@ static bool libc_substitute(riscv_t *rv, block_t *block)
if (IF_imm(next_ir, 20) && detect_memset(rv, 1)) {
ir->opcode = rv_insn_fuse5;
ir->impl = dispatch_table[ir->opcode];
remove_next_nth_ir(rv, ir, block, 2);
remove_next_nth_ir(rv, ir, block, 1);
return true;
}
if (IF_imm(next_ir, 28) && detect_memcpy(rv, 1)) {
ir->opcode = rv_insn_fuse6;
ir->impl = dispatch_table[ir->opcode];
remove_next_nth_ir(rv, ir, block, 2);
remove_next_nth_ir(rv, ir, block, 1);
return true;
};
}
Expand Down

0 comments on commit 289d6aa

Please sign in to comment.