From: "Atif Hashmi" <atifhashmi@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: Detecting an assembly instruction in QEMU
Date: Sat, 7 Apr 2007 16:06:19 -0500 [thread overview]
Message-ID: <d5f3bd2b0704071406pf13d34arfc6b46d44d7a0ccd@mail.gmail.com> (raw)
In-Reply-To: <83a4d4ca0704060515l172d6f9ep59b6467c6e49f250@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1212 bytes --]
Hi Eduardo,
I really appreciate your help but there is a small think that I need to ask
you.
In target-i386/translate.c, there are many variants of mov i.e.
case 0x89: /* mov Gv, Ev */
case 0xc7: /* mov Ev, Iv */
case 0x8b: /* mov Ev, Gv */
case 0x8e: /* mov seg, Gv */
which one do you think will be called when "mov %eax, %eax" instruction is
translated.
I printed the value of modrm inside the case 0x89 but the value remains the
same whether I use %eax or %ebx.
Secondly, How can I extract the source and destination registers from modrm.
I will really appreciate your help.
Thanks,
Atif
On 4/6/07, Eduardo Felipe <edusaper@gmail.com> wrote:
>
> Hi,
>
> Your should create a new helper function in \target-i386\helper.c to
> perform whatever you want QEMU to do when movl %eax,%eax is found.
>
> To invoke that function create a new opcode in \target-i386\op.c. That
> opcode should only call your helper function.
>
> Finally, modify \target-i386\translate.c to generate your opcode when movl
> %eax,%eax is translated. Look for the string 0x89, you can find out target
> and source registers of the move operation from variable modrm, so only %eax
> is considered.
>
> Regards,
> Eduardo
>
>
>
[-- Attachment #2: Type: text/html, Size: 1612 bytes --]
next prev parent reply other threads:[~2007-04-07 21:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-04 4:57 [Qemu-devel] Detecting an assembly instruction in QEMU Atif Hashmi
2007-04-05 17:37 ` [Qemu-devel] " Atif Hashmi
2007-04-06 12:15 ` Eduardo Felipe
2007-04-07 21:06 ` Atif Hashmi [this message]
2007-04-08 14:13 ` Eduardo Felipe
2007-04-08 21:38 ` Atif Hashmi
2007-04-08 22:14 ` Eduardo Felipe
2007-04-17 0:17 ` Atif Hashmi
2007-04-17 0:22 ` Atif Hashmi
2007-04-17 9:49 ` Eduardo Felipe
2007-04-17 20:33 ` Atif Hashmi
2007-04-22 13:09 ` Eduardo Felipe
2007-04-24 7:30 ` Atif Hashmi
2007-04-24 9:34 ` Eduardo Felipe
2007-04-25 16:21 ` Atif Hashmi
2007-04-25 16:50 ` Atif Hashmi
2007-04-26 14:03 ` Eduardo Felipe
2007-04-26 21:26 ` Atif Hashmi
2007-04-27 10:16 ` Eduardo Felipe
2007-05-01 20:28 ` Atif Hashmi
2007-04-11 16:05 ` Thiemo Seufer
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=d5f3bd2b0704071406pf13d34arfc6b46d44d7a0ccd@mail.gmail.com \
--to=atifhashmi@gmail.com \
--cc=qemu-devel@nongnu.org \
/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).