Re: [Qemu-devel] Re: Detecting an assembly instruction in QEMU
From:
Eduardo Felipe
Subject:
Re: [Qemu-devel] Re: Detecting an assembly instruction in QEMU
Date:
Fri, 6 Apr 2007 14:15:33 +0200
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.