From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42512) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEjMk-0005Rw-Hk for qemu-devel@nongnu.org; Wed, 28 Aug 2013 13:17:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VEjMZ-0001Uy-1i for qemu-devel@nongnu.org; Wed, 28 Aug 2013 13:17:10 -0400 Received: from mail-yh0-x22e.google.com ([2607:f8b0:4002:c01::22e]:62842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEjMY-0001Uj-TC for qemu-devel@nongnu.org; Wed, 28 Aug 2013 13:16:58 -0400 Received: by mail-yh0-f46.google.com with SMTP id l109so1680595yhq.19 for ; Wed, 28 Aug 2013 10:16:58 -0700 (PDT) Sender: Richard Henderson Message-ID: <521E3086.1030003@twiddle.net> Date: Wed, 28 Aug 2013 10:16:54 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1377664796-11698-1-git-send-email-sw@weilnetz.de> <521E09DF.20102@twiddle.net> <521E16B3.3030008@twiddle.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC] Streamlining endian handling in TCG List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel , Aurelien Jarno On 08/28/2013 09:38 AM, Peter Maydell wrote: >> (B) Add an additional bit to the "opc" to indicate which endianness is desired. >> E.g. 0 = LE, 8 = BE. Expose the opc interface to the translators. At which >> point generating a load becomes more like >> >> tcg_gen_qemu_ld_tl(dest, addr, size | sign | dc->big_endian); >> >> and the current endianness of the guest becomes a bit on the TB, to be copied >> into the DisasContext at the beginning of translation. > > I guess we deal with ARMv5-style BE32 by having the target > emit an explicit XOR TCG op? Yes. I see no other way to implement that. > Do we need to overhaul the C interface to the > memory system too? (ie ldl_p and friends). I don't think so, since we already have ldl_{le,be}_p. r~