From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=55004 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOotZ-0004JL-QJ for qemu-devel@nongnu.org; Wed, 16 Jun 2010 05:26:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OOotY-0005PB-KP for qemu-devel@nongnu.org; Wed, 16 Jun 2010 05:26:53 -0400 Received: from hall.aurel32.net ([88.191.82.174]:56292) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOotY-0005OO-G4 for qemu-devel@nongnu.org; Wed, 16 Jun 2010 05:26:52 -0400 Date: Wed, 16 Jun 2010 11:26:34 +0200 From: Aurelien Jarno Message-ID: <20100616092634.GA1763@volta.aurel32.net> References: <1276562128-604-1-git-send-email-rth@twiddle.net> <1276562128-604-2-git-send-email-rth@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1276562128-604-2-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] Re: [PATCH 1/2] tcg: Optionally sign-extend 32-bit arguments for 64-bit hosts. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: blauwirbel@gmail.com, qemu-devel@nongnu.org On Mon, Jun 14, 2010 at 05:35:27PM -0700, Richard Henderson wrote: > Some hosts (amd64, ia64) have an ABI that ignores the high bits > of the 64-bit register when passing 32-bit arguments. Others > require the value to be properly sign-extended for the type. > I.e. "int32_t" must be sign-extended and "uint32_t" must be > zero-extended to 64-bits. > > To effect this, extend the "sizemask" parameter to tcg_gen_callN > to include the signedness of the type of each parameter. If the > tcg target requires it, extend each 32-bit argument into a 64-bit > temp and pass that to the function call. > > This ABI feature is required by sparc64, ppc64 and s390x. > > Signed-off-by: Richard Henderson > --- > def-helper.h | 38 +++++++++--- > target-i386/ops_sse_header.h | 3 + > target-ppc/helper.h | 1 + > tcg/ppc64/tcg-target.h | 1 + > tcg/s390/tcg-target.h | 2 + > tcg/sparc/tcg-target.h | 4 + > tcg/tcg-op.h | 139 +++++++++++++++++++++++++++++++++++------ > tcg/tcg.c | 41 +++++++++++-- > 8 files changed, 193 insertions(+), 36 deletions(-) Thanks, applied. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net