From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaSAH-0003gy-3T for qemu-devel@nongnu.org; Tue, 13 Dec 2011 08:13:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RaSAD-0003gu-1d for qemu-devel@nongnu.org; Tue, 13 Dec 2011 08:13:01 -0500 Received: from mout.web.de ([212.227.15.4]:53118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaSAC-0003gi-NF for qemu-devel@nongnu.org; Tue, 13 Dec 2011 08:12:57 -0500 Message-ID: <4EE74F13.9000908@web.de> Date: Tue, 13 Dec 2011 14:11:47 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1323507747-16261-1-git-send-email-andreas.faerber@web.de> <201112112328.42268.paul@codesourcery.com> <4EE5D9E9.3080700@web.de> <201112121558.44919.paul@codesourcery.com> In-Reply-To: <201112121558.44919.paul@codesourcery.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/4] tcg: Add debug facilities for TCGv List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: Peter Maydell , qemu-devel@nongnu.org Am 12.12.2011 16:58, schrieb Paul Brook: >> For me the most annoying issue was that tcg_gen_qemu_{ld,st}* needs TCGv. > > You mean the value transferred is always TCGv sized, so ld32u requires an > additional truncation before doing 32-bit arithmetic? Fixing that is > completely independent of making TCGv a separate type. tcg_gen_qemu_{ld,st} (guest) differs from tcg_gen_{ld,st} (host) in that they require a TCGv ret/arg (all use TCGv addr). I.e., to read an 8-bit memory-mapped register on a 64-bit target with tcg_gen_qemu_ld8u we need a TCGv temporary and trunc to i32 afterwards (smallest currently available variable size) or unnecessarily blow up storage size to target_long/TCGv everywhere. So, yes, adding an _i32 version may make sense, to at least encapsulate it at TCG level. And without my patches I might have not noticed this design flaw. :) Andreas