From c3ce5a235741cb027b1328288ddec06470254813 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 6 Oct 2016 15:10:57 +0200 Subject: qemu-tech: document lazy condition code evaluation in cpu.h Unlike the other sections, they are pretty specific to a particular CPU. Reviewed-by: Emilio G. Cota Signed-off-by: Paolo Bonzini --- target-m68k/cpu.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'target-m68k') diff --git a/target-m68k/cpu.h b/target-m68k/cpu.h index c2d40cb..471f490 100644 --- a/target-m68k/cpu.h +++ b/target-m68k/cpu.h @@ -154,6 +154,14 @@ int cpu_m68k_signal_handler(int host_signum, void *pinfo, void *puc); void cpu_m68k_flush_flags(CPUM68KState *, int); + +/* Instead of computing the condition codes after each m68k instruction, + * QEMU just stores one operand (called CC_SRC), the result + * (called CC_DEST) and the type of operation (called CC_OP). When the + * condition codes are needed, the condition codes can be calculated + * using this information. Condition codes are not generated if they + * are only needed for conditional branches. + */ enum { CC_OP_DYNAMIC, /* Use env->cc_op */ CC_OP_FLAGS, /* CC_DEST = CVZN, CC_SRC = unused */ -- cgit v1.1