On Sun, Jun 03, 2012 at 10:44:32PM +0200, Davide Ferraretto wrote: > I'm in qemu-arm. > tcg_qemu_tb_exec function is a macro: > #define tcg_qemu_tb_exec(env, tb_ptr) \ > ((long REGPARM (*)(void *, void *))code_gen_prologue)(env, tb_ptr) > #endif
QEMU treats execution in code cache as a function call. As you might know, function has its prologue/epilogue, the "code_gen_prologue" stores the prologue/epilogue code. After executing prologue, it'll jump to the code cache (tb_ptr), then back to epilogue, finally return to QEMU. Regards, chenwj [1] http://en.wikipedia.org/wiki/Function_prologue -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj