From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5t0j-0005Ko-M4 for qemu-devel@nongnu.org; Tue, 20 Sep 2011 01:36:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5t0i-0005gC-IR for qemu-devel@nongnu.org; Tue, 20 Sep 2011 01:36:49 -0400 Received: from e23smtp02.au.ibm.com ([202.81.31.144]:58890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5t0h-0005fs-Cq for qemu-devel@nongnu.org; Tue, 20 Sep 2011 01:36:48 -0400 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [202.81.31.246]) by e23smtp02.au.ibm.com (8.14.4/8.13.1) with ESMTP id p8K5U6i6002194 for ; Tue, 20 Sep 2011 15:30:06 +1000 Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p8K5YjOL696458 for ; Tue, 20 Sep 2011 15:34:45 +1000 Received: from d23av02.au.ibm.com (loopback [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p8K5aaOt028626 for ; Tue, 20 Sep 2011 15:36:36 +1000 Message-ID: <4E782638.50208@linux.vnet.ibm.com> Date: Tue, 20 Sep 2011 13:35:52 +0800 From: Lei Li MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] QEMU as a binary disassembler List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Xin Tong Cc: qemu-devel On 09/20/2011 10:11 AM, Xin Tong wrote: > One of the research projects I am doing involves disassembling machine > instructions (such as PTX ) to TCG IR and use the QEMU backends to > generate PTX, do you mean Parallel Thread Execution, a pseudo-assembly language for NVIDIA GPUs? > code I need. Basically, I am planning to use QEMU as a dynamic > translators, instead of the full system emulation it is developed for. > I need a way to hack In TCG, the whole translation has two parts: blocks of target code be rewritten in tcg ops, a kind of machine independent intermediate notation, then this notation be compiled for the host's architecture by TCG. TCG requires that there be dedicated code written to support every architecture it is being run on. It also requires that the target instruction translation be rewritten to take advantage of TCG ops. As I know, PTX is not machine code but a typed intermediate language, to some extend, target dependent(it contains a lots of GPU-specific instructions), and till now TCG did not support such target. If you wanna translate PTX to the code you need, the only idea pops into my mind is: maybe you have to write tcg ops code for PTX yourself... :-) > out the piece of QEMU used specifically for dyn translations so that i > do not need a machine image to start the dyn trans parts of QEMU. I am > fairly familiar with the QEMU code base. I would like to hear > suggestions. > > Thanks > > Xin > -- Lei