* [Qemu-devel] mini documentation of "info registers" output
@ 2005-07-01 4:33 Mulyadi Santosa
2005-07-01 12:17 ` Paul Brook
0 siblings, 1 reply; 5+ messages in thread
From: Mulyadi Santosa @ 2005-07-01 4:33 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 321 bytes --]
Dear list
Here is a little cheat sheet for you to better understand what "info
registers" shows on qemu's monitor. This infomations are strictly for
x86
Feel free to correct or send feedbacks about this document
PS: Hetz, please "copy" this document toward Qemu forums.... Thank you
in advance...
regards
Mulyadi
[-- Attachment #2: info-registers-mini-document-English.zip --]
[-- Type: application/x-zip, Size: 1416 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] mini documentation of "info registers" output
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
0 siblings, 1 reply; 5+ messages in thread
From: Paul Brook @ 2005-07-01 12:17 UTC (permalink / raw)
To: qemu-devel, a_mulyadi
On Friday 01 July 2005 05:33, Mulyadi Santosa wrote:
> Dear list
>
> Here is a little cheat sheet for you to better understand what "info
> registers" shows on qemu's monitor. This infomations are strictly for
> x86
> CCS : Compiled Code Source (?)
Condition Code Source.
> CCD : Compiled Code Destination (?)
Condition Code Source.
> CCO : (?) instruction name
Condition Code Operation
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.
Calculating the flags at every operation would be very slow. Instead qemu just
remembers the destination, one source operand and the instruction class of a
flag setting operation, then lazily evaluates the flags as needed.
Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: [Qemu-devel] mini documentation of "info registers" output
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
0 siblings, 2 replies; 5+ messages in thread
From: Mulyadi Santosa @ 2005-07-02 4:12 UTC (permalink / raw)
To: Paul Brook, qemu-devel
Hello Paul...
> > CCD : Compiled Code Destination (?)
>
> Condition Code Source.
Or Condition Code Destination?
> 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?
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?
Or we can still safely ignore it?
regards
Mulyadi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] mini documentation of "info registers" output
2005-07-02 4:12 ` Mulyadi Santosa
@ 2005-07-02 7:18 ` Gwenole Beauchesne
2005-07-02 15:08 ` Paul Brook
1 sibling, 0 replies; 5+ messages in thread
From: Gwenole Beauchesne @ 2005-07-02 7:18 UTC (permalink / raw)
To: qemu-devel
Le samedi, 2 jul 2005, à 06:12 Europe/Paris, Mulyadi Santosa a écrit :
> hm, i see....BTW, these two lazy flags, CCS and CCD, they are the
> representation of EFLAGS?
CCS/CCD = Condition Codes Source/Destination values. Those represent
part of the state (input and/or result + operation type) used to
evaluate the EFLAGS, when necessary. Hence the term lazy evaluation of
condition codes and they aren't in the EFLAGS format.
> 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?
> Or we can still safely ignore it?
Liveness analysis of the EFLAGS bits is performed to determine where
computation of EFLAGS is really needed.
Bye,
Gwenolé.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] mini documentation of "info registers" output
2005-07-02 4:12 ` Mulyadi Santosa
2005-07-02 7:18 ` Gwenole Beauchesne
@ 2005-07-02 15:08 ` Paul Brook
1 sibling, 0 replies; 5+ messages in thread
From: Paul Brook @ 2005-07-02 15:08 UTC (permalink / raw)
To: a_mulyadi; +Cc: qemu-devel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-07-02 15:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).