[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-discuss] Do arm cpu emulator and arm dynamic translator work t
Re: [Qemu-discuss] Do arm cpu emulator and arm dynamic translator work together?
Mon, 27 Jul 2015 09:13:11 +0000
Thank you very much for the information!! :)
On 27 July 2015 at 01:10, Devendra Agarwal <address@hidden> wrote:
> Do arm cpu emulator and arm dynamic translator work together?
The ARM CPU emulation *is* by dynamic translation. That's how it works...
> I do not have very good understanding but I am assuming that an arm cpu
> emulator should be able to execute arm instructions without translating
> those to host architecture instructions.
The basic approach is:
* target-arm/translate.c translates a block of ARM instructions
to QEMU's intermediate 'TCG' representation
* we do some generic optimisations on the intermediate representation
* tcg/i386/*.c is the backend which produces host instructions from
the intermediate representation
* then we can execute the generated host code
* we cache the generated code so next time we need to run the same
block of guest instructions we can just reuse the generated code
If you use QEMU's "-d in_asm,op,out_asm" debug option on the command
line it will print out the guest instructions, the generated TCG ops
and the final x86 instructions for each block. (This gets pretty
big very fast, so use "-D file.log" to write it to a file.)