From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52673) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKDKS-000329-Cl for qemu-devel@nongnu.org; Wed, 11 May 2011 13:36:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QKDKR-0001Gy-GY for qemu-devel@nongnu.org; Wed, 11 May 2011 13:36:08 -0400 Received: from mail-qy0-f173.google.com ([209.85.216.173]:57214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKDKR-0001Gt-EW for qemu-devel@nongnu.org; Wed, 11 May 2011 13:36:07 -0400 Received: by qyk36 with SMTP id 36so2518659qyk.4 for ; Wed, 11 May 2011 10:36:07 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <201105102357.17637.paul@codesourcery.com> References: <4DC9B51B.20505@twiddle.net> <201105102357.17637.paul@codesourcery.com> From: Blue Swirl Date: Wed, 11 May 2011 20:35:47 +0300 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] TCG: AREG0 removal planning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org, Richard Henderson On Wed, May 11, 2011 at 1:57 AM, Paul Brook wrote: >> While we're at it, let us change things a bit further to allow guest >> byte-swap load/store insns to be implemented more efficiently. =C2=A0For >> instance, currently a sparc load_asr (little-endian), as emulated on >> an x86 host, does the byte swap twice. > > FWIW this also ends up interacting with the device and bus models. This i= s > partially implemented by the endian parameter of cpu_register_io_memory e= t. > al. =C2=A0This may also be a runtime property, either part of the CPU sta= te (e.g. > ARM where instruction and data accesses may have different endianness), o= r > even a per-page TLB attribute (PPC?). SuperSparc (Sparc32) MMU had a bit for reversing the endianness of a page, on Sparc64 there are many levels where this can be done (global CPU mode flag, MMU page flag and some memory accesses can use byte swapping ASIs). I don't think they are used though.