From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjM9n-0002y8-I4 for qemu-devel@nongnu.org; Mon, 12 Sep 2016 04:00:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjM9j-00064T-DM for qemu-devel@nongnu.org; Mon, 12 Sep 2016 03:59:58 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:16224) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjM9j-00063c-7H for qemu-devel@nongnu.org; Mon, 12 Sep 2016 03:59:55 -0400 Date: Mon, 12 Sep 2016 08:59:33 +0100 From: Leon Alrae Message-ID: <20160912075932.GA3300@hhmipssw201.hh.imgtec.org> References: <1472935202-3342-1-git-send-email-rth@twiddle.net> <1472935202-3342-14-git-send-email-rth@twiddle.net> <20160909144616.GA6795@hhmipssw201.hh.imgtec.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v3 13/34] tcg: Add atomic helpers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: "qemu-devel@nongnu.org" On Fri, Sep 09, 2016 at 09:26:29AM -0700, Richard Henderson wrote: > On 09/09/2016 07:46 AM, Leon Alrae wrote: > >Wouldn't it be useful if tcg.h provided also aliases for _le/_be atomic > >helpers (equivalent to helper_ret_X_mmu) so that in target-* code we wouldn't > >need to care about the endianness (specifically I'm thinking about SC in MIPS > >where I need to select between helper_atomic_cmpxchgl_le_mmu() and > >helper_atomic_cmpxchgl_be_mmu()). > > Perhaps. I would have hoped that you could do the SC inline now > though, and tcg_gen_atomic_cmpxchg() will do the selection for you. On every SC we need to do the virtual -> physical address translation as we have to compare the physical address against that of the preceeding LL. This operation seems too complex to be inlined :( Leon