aboutsummaryrefslogtreecommitdiff
path: root/target-s390x/cpu.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-10-06 15:10:57 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2016-10-07 10:05:22 +0200
commitc3ce5a235741cb027b1328288ddec06470254813 (patch)
tree18b91ded381a74e17158c282dea2047b0ae3c3e6 /target-s390x/cpu.h
parentbf28a69eeb53e9e45166fbdda032454e7b1e3f29 (diff)
downloadqemu-c3ce5a235741cb027b1328288ddec06470254813.zip
qemu-c3ce5a235741cb027b1328288ddec06470254813.tar.gz
qemu-c3ce5a235741cb027b1328288ddec06470254813.tar.bz2
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 <cota@braap.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target-s390x/cpu.h')
-rw-r--r--target-s390x/cpu.h7
1 files changed, 7 insertions, 0 deletions
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 */