2

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.

durron597
  • 31,968
  • 17
  • 99
  • 158
hardcoder
  • 415
  • 1
  • 5
  • 13

1 Answers1

2

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

Community
  • 1
  • 1
VividD
  • 10,456
  • 6
  • 64
  • 111