[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 05/10] qemu-tech: document lazy condition code e
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 05/10] qemu-tech: document lazy condition code evaluation in cpu.h |
Date: |
Fri, 7 Oct 2016 10:02:28 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
On 06/10/2016 20:45, Peter Maydell wrote:
> On 6 October 2016 at 16:24, Paolo Bonzini <address@hidden> wrote:
>> Unlike the other sections, they are pretty specific to a particular CPU.
>>
>> Signed-off-by: Paolo Bonzini <address@hidden>
>> ---
>> 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
- [Qemu-devel] [PATCH 00/10] qemu-tech cleanup, Paolo Bonzini, 2016/10/06
- [Qemu-devel] [PATCH 01/10] qemu-tech: drop index, Paolo Bonzini, 2016/10/06
- [Qemu-devel] [PATCH 04/10] qemu-tech: move text from qemu-tech to tcg/README, Paolo Bonzini, 2016/10/06
- [Qemu-devel] [PATCH 03/10] qemu-doc: drop installation and compilation notes, Paolo Bonzini, 2016/10/06
- [Qemu-devel] [PATCH 05/10] qemu-tech: document lazy condition code evaluation in cpu.h, Paolo Bonzini, 2016/10/06
- [Qemu-devel] [PATCH 02/10] qemu-doc: replace introduction with the one from the internals manual, Paolo Bonzini, 2016/10/06
- [Qemu-devel] [PATCH 06/10] qemu-tech: move user mode emulation features from qemu-tech, Paolo Bonzini, 2016/10/06
- [Qemu-devel] [PATCH 08/10] qemu-tech: reorganize content, Paolo Bonzini, 2016/10/06
- [Qemu-devel] [PATCH 07/10] qemu-tech: move TCG test documentation to tests/tcg/README, Paolo Bonzini, 2016/10/06
- [Qemu-devel] [PATCH 10/10] qemu-doc: merge qemu-tech and qemu-doc, Paolo Bonzini, 2016/10/06
- [Qemu-devel] [PATCH 09/10] qemu-tech: rewrite some parts, Paolo Bonzini, 2016/10/06