qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] TB chaining


From: 陳韋任
Subject: Re: [Qemu-devel] TB chaining
Date: Fri, 23 Sep 2011 10:14:11 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

> if direct chaining is used, am I right to think that jmp_next and jmp_first
> will not be used ?

  You have to know that when we say "TB", it might means different
things according to the context.

  QEMU use struct TranslationBlock to record some information about
TB in the code cache. Take direct block chaining for example, when
I say we direct link tb1 to tb2, i.e., tb1 -> tb2, that actually
means two things. First, we patch the branch target of tb1 (in the
code cache) so that tb1 can jump to tb2 (in the code cache) and
executed. Meanwhile, we need to update tb1 (struct TranslationBlock)
and tb2 (struct TranslationBlock) to reflect the fact that tb1 (in the
code cache) is linked to tb2 (in the code cache). jmp_next and jmp_first
are fields of struct TranslationBlock, we use them when we need to
unchian TBs (in the code cache).

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667



reply via email to

[Prev in Thread] Current Thread [Next in Thread]