Where is the code for RDTSC handler in QEMU source code?

青春壹個敷衍的年華 提交于 2019-12-13 17:32:01

问题


I am working on an application which requires me to make some changes with the part of the QEMU source code which deals with RDTSC calls. However, I am not able to locate the same in the huge source code.


回答1:


Key portion is here:

target-i386/translate.c

6850     case 0x131: /* rdtsc */
6851         if (s->cc_op != CC_OP_DYNAMIC)
6852             gen_op_set_cc_op(s->cc_op);
6853         gen_jmp_im(pc_start - s->cs_base);
6854         if (use_icount)
6855             gen_io_start();
6856         gen_helper_rdtsc();
6857         if (use_icount) {
6858             gen_io_end();
6859             gen_jmp(s, s->pc - s->cs_base);
6860         }
6861         break;

For general understanding of qemu code related to code translation, this answer is good:

Qemu code translation main execution loop



来源:https://stackoverflow.com/questions/21062308/where-is-the-code-for-rdtsc-handler-in-qemu-source-code

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!