From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hndzj-0006A1-OO for qemu-devel@nongnu.org; Mon, 14 May 2007 13:05:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hndzi-00067v-1d for qemu-devel@nongnu.org; Mon, 14 May 2007 13:05:59 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hndzh-00067g-PQ for qemu-devel@nongnu.org; Mon, 14 May 2007 13:05:57 -0400 Received: from wx-out-0506.google.com ([66.249.82.229]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hndru-0005D2-Rj for qemu-devel@nongnu.org; Mon, 14 May 2007 12:57:55 -0400 Received: by wx-out-0506.google.com with SMTP id i30so2839944wxd for ; Mon, 14 May 2007 09:57:53 -0700 (PDT) Message-ID: <21dbb7da0705140957m5ed4ce55r1dd77cbbdf033fb0@mail.gmail.com> Date: Mon, 14 May 2007 09:57:51 -0700 From: "Sorav Bansal" Sender: bsorav@gmail.com Subject: Re: [Qemu-devel] micro-instruction size In-Reply-To: <716704.3494.qm@web32507.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4265_6549417.1179161871774" References: <716704.3494.qm@web32507.mail.mud.yahoo.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ------=_Part_4265_6549417.1179161871774 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline > I want to instrument call instruction so that my > tracking function is called on each call instruction. > >From what I understand, I should > a) change target-i386/translate.c case 0xe8 to > generate my own microinstruction, say gen_op_mycall() > b) Add functionality of op_mycall() to > target-i386/op.c > c) Add this new micro-instruction in > i386-softmmu/opc.h. > > Is the above correct? You only need to perform steps A and B. Step C is automatically taken care of by dyngen.c. Similarly, the copy_size in DEF(s,n,copy_size) is automatically computed. Sorav ------=_Part_4265_6549417.1179161871774 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
I want to instrument call instruction so that my
tracking function is called on each call instruction.
>From what I understand, I should
a) change  target-i386/translate.c case 0xe8 to
generate my own microinstruction, say gen_op_mycall()
b) Add functionality of op_mycall() to
target-i386/op.c
c) Add this new micro-instruction in
i386-softmmu/opc.h.

Is the above correct?

You only need to perform steps A and B.
Step C is automatically taken care of by dyngen.c.
Similarly, the copy_size in DEF(s,n,copy_size) is automatically computed.

Sorav
 

------=_Part_4265_6549417.1179161871774--