Received: from eggs.gnu.org ([208.118.235.92]:39842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UI9v2-0008Gx-UB for qemu-devel@nongnu.org; Tue, 19 Mar 2013 23:42:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UI9uw-00087E-Ch for qemu-devel@nongnu.org; Tue, 19 Mar 2013 23:42:28 -0400 Date: Wed, 20 Mar 2013 11:42:08 +0800 From: =?utf-8?B?6Zmz6Z+L5Lu7IChXZWktUmVuIENoZW4p?= Message-ID: <20130320034208.GA29514@cs.nctu.edu.tw> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v3] Use proper term in TCG README List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-trivial@nongnu.org Cc: Stefan Hajnoczi , qemu-devel@nongnu.org, Peter Maydell In TCG, "target" means the host architecture for which TCG generates the code. Using "guest" rather than "target" to make the document more consistent. Signed-off-by: Chen Wei-Ren --- v3: Adopt Peter's suggestion on sentence and typo. v2: Correct all wrong usage of the term "target" in this document. =20 tcg/README | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tcg/README b/tcg/README index 934e7af..063aeb9 100644 --- a/tcg/README +++ b/tcg/README @@ -14,6 +14,10 @@ the emulated architecture. As TCG started as a generic= C backend used for cross compiling, it is assumed that the TCG target is different from the host, although it is never the case for QEMU. =20 +In this document, we use "guest" to specify what architecture we are +emulating; "target" always means the TCG target, the machine on which +we are running QEMU. + A TCG "function" corresponds to a QEMU Translated Block (TB). =20 A TCG "temporary" is a variable only live in a basic @@ -379,7 +383,7 @@ double-word product T0. The later is returned in two= single-word outputs. =20 Similar to mulu2, except the two inputs T1 and T2 are signed. =20 -********* 64-bit target on 32-bit host support +********* 64-bit guest on 32-bit host support =20 The following opcodes are internal to TCG. Thus they are to be implemen= ted by 32-bit host code generators, but are not to be emitted by guest translat= ors. @@ -521,9 +525,9 @@ register. a better generated code, but it reduces the memory usage of TCG and the speed of the translation. =20 -- Don't hesitate to use helpers for complicated or seldom used target +- Don't hesitate to use helpers for complicated or seldom used guest instructions. There is little performance advantage in using TCG to - implement target instructions taking more than about twenty TCG + implement guest instructions taking more than about twenty TCG instructions. Note that this rule of thumb is more applicable to helpers doing complex logic or arithmetic, where the C compiler has scope to do a good job of optimisation; it is less relevant where @@ -531,9 +535,9 @@ register. inline TCG may still be faster for longer sequences. =20 - The hard limit on the number of TCG instructions you can generate - per target instruction is set by MAX_OP_PER_INSTR in exec-all.h -- + per guest instruction is set by MAX_OP_PER_INSTR in exec-all.h -- you cannot exceed this without risking a buffer overrun. =20 - Use the 'discard' instruction if you know that TCG won't be able to prove that a given global is "dead" at a given program point. The - x86 target uses it to improve the condition codes optimisation. + x86 guest uses it to improve the condition codes optimisation. --=20 1.7.12.3 --=20 Wei-Ren Chen (=E9=99=B3=E9=9F=8B=E4=BB=BB) 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