Here's the patch I almost wrote in the email, followed by a cleanup that allows cmpm to be written "nicely".
I can test this to some extent with the coldfire kernel, but of course coldfire can't excersise any of the tricky edge cases that m68000 can. I'm particularly interested in edge cases like mov.b a0@+, a0@+ movea a0@+, a0 movea a0, a0@- The first two are not really useful and likely not show up in normal code. The third may well do so; I think our current code gets it wrong, but this will get it right. r~ Laurent Vivier (1): target-m68k: add cmpm Richard Henderson (3): target-m68k: Delay autoinc writeback target-m68k: Split gen_lea and gen_ea target-m68k: Use gen_ea_mode in cmpm target-m68k/translate.c | 207 +++++++++++++++++++++++++++++++----------------- 1 file changed, 136 insertions(+), 71 deletions(-) -- 2.7.4