As promised a couple of days ago, with the addition of CC_OP_CMP, which wasn't in the text of my proposal the other day. From the looks of the generated code, I believe this is ideal.
The following is based on Laurent's 8/30 Update cpu flags management. FWIW, there's something in the last patch here that breaks the coldfire kernel I've been testing (it may even be a bug in tcg; the problem only appears well into the boot process). But I'm about to go away for the weekend and still wanted to include it to show what can be done. For convenience, the complete tree pushed to git://github.com/rth7680/qemu.git tgt-m68k r~ Richard Henderson (11): target-m68k: Print flags properly target-m68k: Some fixes to SR and flags management target-m68k: Remove incorrect clearing of cc_x target-m68k: Replace helper_xflag_lt with setcond target-m68k: Reorg flags handling target-m68k: Introduce DisasCompare target-m68k: Use setcond for scc target-m68k: Optimize some comparisons target-m68k: Optimize gen_flush_flags target-m68k: Inline shifts target-m68k: Inline addx, subx, negx target-m68k/cpu.c | 2 +- target-m68k/cpu.h | 48 +-- target-m68k/helper.c | 399 +++++++++---------------- target-m68k/helper.h | 12 +- target-m68k/op_helper.c | 35 +-- target-m68k/qregs.def | 6 +- target-m68k/translate.c | 769 +++++++++++++++++++++++++++++++----------------- 7 files changed, 674 insertions(+), 597 deletions(-) -- 2.4.3