qemu-cr16/target/m68k
Laurent Vivier 359076c8a0 m68k: fix CAS2 writeback when Dc1==Dc2
According to Programmer's Reference Manual, if Dc1 and Dc2 specify the
same data register and the comparison fails, memory operand 1 is stored
in the data register.

The current helpers wrote Dc1 then Dc2, leaving operand 2 in the shared
register.

Swap the writeback order for cas2w/cas2l so memory operand 1 wins.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251226213707.331741-1-laurent@vivier.eu>
(cherry picked from commit 11dac41f2e830bcd7ba74969dc50f5740e3ce7e7)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2026-01-16 14:26:44 +03:00
..
cpu-param.h tcg: Remove the TCG_GUEST_DEFAULT_MO definition globally 2025-04-23 15:07:32 -07:00
cpu-qom.h target: Move ArchCPUClass definition to 'cpu.h' 2023-11-07 13:08:48 +01:00
cpu.c add cpu_test_interrupt()/cpu_set_interrupt() helpers and use them tree wide 2025-08-29 12:48:14 +02:00
cpu.h accel/tcg: Hoist cpu_get_tb_cpu_state decl to accl/tcg/cpu-ops.h 2025-04-30 12:45:05 -07:00
fpu_helper.c include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
gdbstub.c target/m68k: Use explicit big-endian LD/ST API 2024-10-07 11:33:20 +02:00
helper.c include: Remove 'exec/exec-all.h' 2025-04-30 12:45:05 -07:00
helper.h target/m68k: Map FPU exceptions to FPSR register 2024-04-09 07:43:31 -10:00
Kconfig target/m68k: Restrict semihosting to TCG 2024-07-22 09:38:08 +01:00
m68k-semi.c target/m68k: Pass semihosting arg to exit 2024-04-24 15:46:00 -07:00
meson.build target/m68k: Add semihosting stub 2024-07-22 09:38:03 +01:00
monitor.c hmp: Pass monitor to mon_get_cpu_env() 2020-11-13 12:45:51 +00:00
op_helper.c m68k: fix CAS2 writeback when Dc1==Dc2 2026-01-16 14:26:44 +03:00
qregs.h.inc target/m68k: Rename qregs.def -> qregs.h.inc 2022-11-05 20:35:45 +01:00
semihosting-stub.c licenses: Remove SPDX tags not being license identifier for Linaro 2025-01-30 13:01:22 +03:00
softfloat.c target/m68k: Avoid using floatx80_infinity global const 2025-02-25 15:32:57 +00:00
softfloat.h softfloat: merge floatx80_mod and floatx80_rem 2020-06-26 09:39:37 -04:00
softfloat_fpsp_tables.h m68k comments break patch submission due to being incorrectly formatted 2019-06-26 17:14:39 +02:00
translate.c target/m68k: Remove pointless @cpu_halted TCGv 2025-10-16 17:07:27 +02:00