From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFSNF-0004tK-1P for qemu-devel@nongnu.org; Fri, 30 Aug 2013 13:20:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VFSN3-0006kZ-0X for qemu-devel@nongnu.org; Fri, 30 Aug 2013 13:20:40 -0400 Received: from mail-ve0-x22d.google.com ([2607:f8b0:400c:c01::22d]:59681) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFSN2-0006kV-Rs for qemu-devel@nongnu.org; Fri, 30 Aug 2013 13:20:28 -0400 Received: by mail-ve0-f173.google.com with SMTP id cy12so1537051veb.4 for ; Fri, 30 Aug 2013 10:20:28 -0700 (PDT) Sender: Richard Henderson Message-ID: <5220D457.20404@twiddle.net> Date: Fri, 30 Aug 2013 10:20:23 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1377813961-12208-1-git-send-email-rth@twiddle.net> <1377813961-12208-7-git-send-email-rth@twiddle.net> <20130830165524.GA15762@ohm.aurel32.net> In-Reply-To: <20130830165524.GA15762@ohm.aurel32.net> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 6/7] tcg: Introduce zero and sign-extended versions of load helpers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: qemu-devel@nongnu.org On 08/30/2013 09:55 AM, Aurelien Jarno wrote: > While it works for x86 and some other architectures, it makes the > assumption that only part of the register can be used later by the TCG > code. It won't be the case if we later (and I hope we will) implement a > MIPS64 TCG target. In that case, a 32-bit value has to be returned > signed extended, which won't be the case for example for a 32-bit guest > loading a 16-bit unsigned value. This doesn't break the mips64 abi, since we'll be returning a 64-bit value, not a 32-bit value that needs sign-extension. Given a mips64 host with 32-bit guest, the sign-extension of the 32-bit load can either happen by using helper_ret_ldsl_mmu in the table of helper functions, or by using an sll insn instead of a move to put the value into place at the end of the slow path. I have more or less the same constraint in my as-yet unsubmitted Alpha backend. r~