From patchwork Fri Mar 22 15:14:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 230087 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3CB932C00C9 for ; Sat, 23 Mar 2013 02:16:50 +1100 (EST) Received: from localhost ([::1]:54247 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJ3i4-0007pA-DX for incoming@patchwork.ozlabs.org; Fri, 22 Mar 2013 11:16:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJ3g9-0005DZ-Lq for qemu-devel@nongnu.org; Fri, 22 Mar 2013 11:14:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UJ3g3-000128-6u for qemu-devel@nongnu.org; Fri, 22 Mar 2013 11:14:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36896) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJ3g3-000120-0S for qemu-devel@nongnu.org; Fri, 22 Mar 2013 11:14:43 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2MFEaSr027124 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 22 Mar 2013 11:14:36 -0400 Received: from localhost (ovpn-112-35.ams2.redhat.com [10.36.112.35]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r2MFEZ2T026837; Fri, 22 Mar 2013 11:14:36 -0400 From: Stefan Hajnoczi To: Date: Fri, 22 Mar 2013 16:14:19 +0100 Message-Id: <1363965261-22267-7-git-send-email-stefanha@redhat.com> In-Reply-To: <1363965261-22267-1-git-send-email-stefanha@redhat.com> References: <1363965261-22267-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id r2MFEaSr027124 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Anthony Liguori , Stefan Hajnoczi , =?UTF-8?q?=E9=99=B3=E9=9F=8B=E4=BB=BB=20=28Wei-Ren=20Chen=29?= Subject: [Qemu-devel] [PATCH 6/8] Use proper term in TCG README X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: 陳韋任 (Wei-Ren Chen) 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 Reviewed-by: Peter Maydell Signed-off-by: Stefan Hajnoczi --- 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. +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). 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. Similar to mulu2, except the two inputs T1 and T2 are signed. -********* 64-bit target on 32-bit host support +********* 64-bit guest on 32-bit host support The following opcodes are internal to TCG. Thus they are to be implemented by 32-bit host code generators, but are not to be emitted by guest translators. @@ -521,9 +525,9 @@ register. a better generated code, but it reduces the memory usage of TCG and the speed of the translation. -- 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. - 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. - 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.