qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]