From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DojfM-00048y-Oa for qemu-devel@nongnu.org; Sat, 02 Jul 2005 11:12:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DojfJ-00047E-DM for qemu-devel@nongnu.org; Sat, 02 Jul 2005 11:12:23 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DojfI-000443-VV for qemu-devel@nongnu.org; Sat, 02 Jul 2005 11:12:21 -0400 Received: from [65.74.133.11] (helo=mail.codesourcery.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1Dojh3-0005nd-3q for qemu-devel@nongnu.org; Sat, 02 Jul 2005 11:14:10 -0400 From: Paul Brook Subject: Re: [Qemu-devel] mini documentation of "info registers" output Date: Sat, 2 Jul 2005 16:08:02 +0100 References: <200507011133.49905.a_mulyadi@softhome.net> <200507011317.43863.paul@codesourcery.com> <200507021112.10750.a_mulyadi@softhome.net> In-Reply-To: <200507021112.10750.a_mulyadi@softhome.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200507021608.04025.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: a_mulyadi@softhome.net Cc: qemu-devel@nongnu.org On Saturday 02 July 2005 05:12, Mulyadi Santosa wrote: > Hello Paul... > > > > CCD : Compiled Code Destination (?) > > > > Condition Code Source. > > Or Condition Code Destination? Yes. > > These 3 are used to implement lazy flag evaluation. Most x86 > > instructions set the condition code flags, but only a relatively > > small subset of instructions actually use these flags. > > hm, i see....BTW, these two lazy flags, CCS and CCD, they are the > representation of EFLAGS? CMIIW. If yes, can I assume that they have > same format as EFLAGS? CC_SRC and CC_DST are the output and one of the inputs to the flag setting instruction. CC_OP tells qemu how to calculate the flags from these. In some cases these will be the actual eflags value, and CC_OP will be set to CC_OP_EFLAGS. Note that qemu updates the eflags when it exits the cpu execution loop. This means the values seen in info registers will be correct. > anyway, it is safe to frequently ignore flags? For example, if MUL > generate overflow and set Zero Flag, Qemu must be aware of it, right? Qemu knows which instructions read/set which flag bits. Qemu does two flags-based optimizations: - Converts flag-setting operations onto non-flag setting operations when the flags are ignored. - Partial evaluation of condition codes when only a subset of flags are used. Paul