Skip to contentSkip to conversation

When T0 is updated to last exectued TB

Qemu-devel Wang,zhi 1 participant 1 message Sep 18, 2007

lore
Share & tools
lore

Wang,zhi

author
#0 lore raw

Hi,
I am a newcomer to QEMU. I am trying to understand the QEMU code. I am a little bit confused about the following code about chaining TBs with direct jump (cpu-exec.c, line 611, I edited it to remove #ifdef to make it clear to discussion):

                if (T0 != 0 && tb->page_addr[1] == -1 ) {
                    spin_lock(&tb_lock);
                    tb_add_jump((TranslationBlock *)(long)(T0 & ~3), T0 & 3, tb);
                    spin_unlock(&tb_lock);
                }

Say, if I am compile an i386-softmmu target on i386 host, T0 is %ebx. From the code, T0 should contain the point to the last executed translation block. I checked many code but couldn't find where T0 is updated to the last executed block. Is there anyone willing to give me a hint? Thanks

Pangy

____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow