mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-25 02:48:25 +00:00
68c9ab9b77
V flag for subtraction is: v = (res ^ src1) & (src1 ^ src2) (see COMPUTE_CCR() in target/m68k/helper.c) But gen_flush_flags() uses: v = (res ^ src2) & (src1 ^ src2) The problem has been found with the following program: .global _start _start: move.l #-2147483648,%d0 subq.l #1,%d0 jvc 1f move.l #1,%d1 move.l #1,%d0 trap #0 1: move.l #0,%d1 move.l #1,%d0 trap #0 It works fine (exit(1)) on real hardware, and with "-singlestep". "-singlestep" uses gen_helper_flush_flags(), whereas without "-singlestep", V flag is computed directly in gen_flush_flags(). This patch updates gen_flush_flags() to have the same result as with gen_helper_flush_flags(). Backports commit 043b936ef6fe53396b3c6b8f5562ea3e238a071d from qemu |
||
---|---|---|
.. | ||
cpu-qom.h | ||
cpu.c | ||
cpu.h | ||
helper.c | ||
helper.h | ||
Makefile.objs | ||
op_helper.c | ||
qregs.def | ||
translate.c | ||
unicorn.c | ||
unicorn.h |