On 06/10/2016 20:45, Peter Maydell wrote: > On 6 October 2016 at 16:24, Paolo Bonzini <pbonz...@redhat.com> wrote: >> Unlike the other sections, they are pretty specific to a particular CPU. >> >> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> >> --- >> qemu-tech.texi | 25 ------------------------- >> target-cris/cpu.h | 7 +++++++ >> target-i386/cpu.h | 7 +++++++ >> target-m68k/cpu.h | 8 ++++++++ >> target-sparc/cpu.h | 5 +++++ >> 5 files changed, 27 insertions(+), 25 deletions(-) > > target-s390x/ also seems to have the CC optimization...
Indeed: diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h index 4fb34b5..4e58cde 100644 --- a/target-s390x/cpu.h +++ b/target-s390x/cpu.h @@ -671,6 +671,13 @@ ObjectClass *s390_cpu_class_by_name(const char *name); /* CC optimization */ +/* Instead of computing the condition codes after each x86 instruction, + * QEMU just stores the result (called CC_DST), the type of operation + * (called CC_OP) and whatever operands are needed (CC_SRC and possibly + * CC_VR). 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 { CC_OP_CONST0 = 0, /* CC is 0 */ CC_OP_CONST1, /* CC is 1 */ Paolo