qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Lei Li <lilei@linux.vnet.ibm.com>
To: Xin Tong <xerox.time.tech@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] QEMU as a binary disassembler
Date: Tue, 20 Sep 2011 13:35:52 +0800	[thread overview]
Message-ID: <4E782638.50208@linux.vnet.ibm.com> (raw)
In-Reply-To: <CALKntY2Fi9XkuYMCt=uX=VwDY+FE7DQ+a5PQ5J3_a53YBeN-FA@mail.gmail.com>

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

      parent reply	other threads:[~2011-09-20  5:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-20  2:11 [Qemu-devel] QEMU as a binary disassembler Xin Tong
2011-09-20  2:21 ` 陳韋任
2011-09-20  5:35 ` Lei Li [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=4E782638.50208@linux.vnet.ibm.com \
    --to=lilei@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xerox.time.tech@gmail.com \
    /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).