From: Paul Brook <paul@codesourcery.com>
To: a_mulyadi@softhome.net
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] mini documentation of "info registers" output
Date: Sat, 2 Jul 2005 16:08:02 +0100 [thread overview]
Message-ID: <200507021608.04025.paul@codesourcery.com> (raw)
In-Reply-To: <200507021112.10750.a_mulyadi@softhome.net>
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
prev parent reply other threads:[~2005-07-02 15:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-01 4:33 [Qemu-devel] mini documentation of "info registers" output Mulyadi Santosa
2005-07-01 12:17 ` Paul Brook
2005-07-02 4:12 ` Mulyadi Santosa
2005-07-02 7:18 ` Gwenole Beauchesne
2005-07-02 15:08 ` Paul Brook [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200507021608.04025.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=a_mulyadi@softhome.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).