From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M3r7I-0002LK-AE for qemu-devel@nongnu.org; Tue, 12 May 2009 08:29:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M3r7D-0002IU-5y for qemu-devel@nongnu.org; Tue, 12 May 2009 08:29:51 -0400 Received: from [199.232.76.173] (port=45420 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M3r7C-0002IJ-Dl for qemu-devel@nongnu.org; Tue, 12 May 2009 08:29:46 -0400 Received: from mx20.gnu.org ([199.232.41.8]:4651) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M3r7C-0004f1-1l for qemu-devel@nongnu.org; Tue, 12 May 2009 08:29:46 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M3r7B-0006GR-3A for qemu-devel@nongnu.org; Tue, 12 May 2009 08:29:45 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH] TCG S/390 backend Date: Tue, 12 May 2009 13:29:42 +0100 References: <1241526283-22190-1-git-send-email-uli@suse.de> <200905121338.45589.uli@suse.de> In-Reply-To: <200905121338.45589.uli@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905121329.42679.paul@codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org > I found the problem: TCG does not zero- or sign-extend arguments to > function calls. Unlike, for instance, AMD64, 32-bit arithmetic ops on > S/390 leave the upper 32 bits of the destination register untouched, so > there could be any kind of garbage there. If a helper taking a 64-bit > argument is called with the result of such an operation, stuff breaks. You mean an helper that takes a 32-bit value, which happens to be passed in a 64-bit register? This is a tricky one because as you say, TCG has no concept of signed or unsigned values. I guess we could add some flag bits to the function call for this. def-helper.h/tcg_gen_callN already has something similar for identifying 64-bit arguments. Paul