* [Qemu-devel] Questions on "hidden" functions in QEMU source code
@ 2007-10-16 8:28 Jun Koi
2007-10-16 13:42 ` Stuart Brady
0 siblings, 1 reply; 5+ messages in thread
From: Jun Koi @ 2007-10-16 8:28 UTC (permalink / raw)
To: qemu-devel
Hi,
I am looking at the source code of QEMU, and there are some mystery to
me: some functions are not defined anywhere.
For example, functions like compute_all_incb() and compute_c_incl() in
target-i386/op.c are never defined anywhere.
So how the compilation process generates these functions?
Another question: micro-op are defined as OPPROTO, but OPPROTO is
actually defined as empty in dyngen-exec.h
#define OPPROTO
So what is the point of using OPPROTO here? I am sure that there is a
good reason to do that, but cannot figure it out.
Many thanks,
Jun
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Questions on "hidden" functions in QEMU source code
2007-10-16 8:28 [Qemu-devel] Questions on "hidden" functions in QEMU source code Jun Koi
@ 2007-10-16 13:42 ` Stuart Brady
2007-10-16 14:19 ` Johannes Schindelin
0 siblings, 1 reply; 5+ messages in thread
From: Stuart Brady @ 2007-10-16 13:42 UTC (permalink / raw)
To: qemu-devel
On Tue, Oct 16, 2007 at 05:28:24PM +0900, Jun Koi wrote:
> For example, functions like compute_all_incb() and compute_c_incl() in
> target-i386/op.c are never defined anywhere.
compute_all_inc* are defined in ops_template.h:~171. You'll notice that
ops_template.h is included four times from op.c.
> Another question: micro-op are defined as OPPROTO, but OPPROTO is
> actually defined as empty in dyngen-exec.h
>
> #define OPPROTO
>
> So what is the point of using OPPROTO here? I am sure that there is a
> good reason to do that, but cannot figure it out.
Presumably so that attributes can be defined later if they're needed.
Cheers,
--
Stuart Brady
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Questions on "hidden" functions in QEMU source code
2007-10-16 13:42 ` Stuart Brady
@ 2007-10-16 14:19 ` Johannes Schindelin
2007-10-18 2:46 ` Jun Koi
2007-10-20 7:02 ` Rob Landley
0 siblings, 2 replies; 5+ messages in thread
From: Johannes Schindelin @ 2007-10-16 14:19 UTC (permalink / raw)
To: Stuart Brady; +Cc: qemu-devel
Hi,
On Tue, 16 Oct 2007, Stuart Brady wrote:
> On Tue, Oct 16, 2007 at 05:28:24PM +0900, Jun Koi wrote:
> > For example, functions like compute_all_incb() and compute_c_incl() in
> > target-i386/op.c are never defined anywhere.
>
> compute_all_inc* are defined in ops_template.h:~171. You'll notice that
> ops_template.h is included four times from op.c.
If you wonder why it is included four times, this might help:
http://libvncserver.sourceforge.net/qemu/qemu-templates-ala-Fabrice.txt
Hth,
Dscho
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Questions on "hidden" functions in QEMU source code
2007-10-16 14:19 ` Johannes Schindelin
@ 2007-10-18 2:46 ` Jun Koi
2007-10-20 7:02 ` Rob Landley
1 sibling, 0 replies; 5+ messages in thread
From: Jun Koi @ 2007-10-18 2:46 UTC (permalink / raw)
To: qemu-devel
On 10/16/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Tue, 16 Oct 2007, Stuart Brady wrote:
>
> > On Tue, Oct 16, 2007 at 05:28:24PM +0900, Jun Koi wrote:
> > > For example, functions like compute_all_incb() and compute_c_incl() in
> > > target-i386/op.c are never defined anywhere.
> >
> > compute_all_inc* are defined in ops_template.h:~171. You'll notice that
> > ops_template.h is included four times from op.c.
>
> If you wonder why it is included four times, this might help:
>
> http://libvncserver.sourceforge.net/qemu/qemu-templates-ala-Fabrice.txt
>
Now it is clear that those stuffs are generated by dyngen, thanks.
But still it it not obvious to me what is the purpose of "OPPROTO"
when defining micro-ops. May you elaborate this a bit more?
Many thanks,
Jun
> Hth,
> Dscho
>
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Questions on "hidden" functions in QEMU source code
2007-10-16 14:19 ` Johannes Schindelin
2007-10-18 2:46 ` Jun Koi
@ 2007-10-20 7:02 ` Rob Landley
1 sibling, 0 replies; 5+ messages in thread
From: Rob Landley @ 2007-10-20 7:02 UTC (permalink / raw)
To: qemu-devel
On Tuesday 16 October 2007 9:19:36 am Johannes Schindelin wrote:
> If you wonder why it is included four times, this might help:
>
> http://libvncserver.sourceforge.net/qemu/qemu-templates-ala-Fabrice.txt
Is that linked from qemu.org/user-doc.html somewhere?
Rob
--
"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-10-20 7:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-16 8:28 [Qemu-devel] Questions on "hidden" functions in QEMU source code Jun Koi
2007-10-16 13:42 ` Stuart Brady
2007-10-16 14:19 ` Johannes Schindelin
2007-10-18 2:46 ` Jun Koi
2007-10-20 7:02 ` Rob Landley
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).