From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVYm6-0004X8-E9 for qemu-devel@nongnu.org; Sat, 29 Aug 2015 01:33:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZVYm5-0002Nn-Fx for qemu-devel@nongnu.org; Sat, 29 Aug 2015 01:33:58 -0400 Sender: Richard Henderson References: <1440719254-12349-1-git-send-email-afaerber@suse.de> <55DFE3CC.4030806@twiddle.net> <55E08AEE.3060308@suse.de> From: Richard Henderson Message-ID: <55E1443D.1060305@twiddle.net> Date: Fri, 28 Aug 2015 22:33:49 -0700 MIME-Version: 1.0 In-Reply-To: <55E08AEE.3060308@suse.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] tcg/aarch64: Fix tcg_out_qemu_{ld, st} for linux-user List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Andreas_F=c3=a4rber?= , qemu-devel@nongnu.org Cc: Paolo Bonzini , Claudio Fontana , qemu-stable , Aurelien Jarno On 08/28/2015 09:23 AM, Andreas Färber wrote: > An otype argument is being inserted as next-to-last argument for the > function definitions. Same for the softmmu callsites. Only in the *-user > callsites the argument order is being changed with addr_reg and off_r > switching order? I don't see why that should be done in this patch. If > it was wrong before, it should've been done in a separate patch. It wasn't "wrong" before because it didn't matter before. The whole point of the patch is that we're changing from (xD = data_reg, xA = addr_reg, xG = GUEST_BASE) ldr xD, [xA, xG] to ldr xD, [xG, wA, uxtw] i.e. zero-extending xA during the address formation. Before this patch, the order of xA and xG doesn't matter; they're both straight addition operands. After this patch, if we don't switch the argument order it'll be xG that gets zero-extending GUEST_BASE, which is obviously incorrect. You'll note that we also switch the argument order for the softmmu case in the next patch, and for the same reason. Tomorrow I'll be home and can do any further investigation in depth. r~