Received: from eggs.gnu.org ([2001:4830:134:3::10]:35530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1F6H-0005OX-Gn for qemu-devel@nongnu.org; Mon, 31 Oct 2016 12:06:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1F6E-000583-A3 for qemu-devel@nongnu.org; Mon, 31 Oct 2016 12:06:17 -0400 Received: from mail-qk0-x244.google.com ([2607:f8b0:400d:c09::244]:34151) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c1F6E-00057k-5L for qemu-devel@nongnu.org; Mon, 31 Oct 2016 12:06:14 -0400 Received: by mail-qk0-x244.google.com with SMTP id o68so7268447qkf.1 for ; Mon, 31 Oct 2016 09:06:14 -0700 (PDT) Sender: Richard Henderson References: <1477588052-10152-1-git-send-email-rth@twiddle.net> From: Richard Henderson Message-ID: <1af05887-d03c-d55e-5ff7-c7294e19941d@twiddle.net> Date: Mon, 31 Oct 2016 10:06:10 -0600 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 00/15] target-sparc improvements List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Artyom Tarasenko Cc: qemu-devel , Mark Cave-Ayland On 10/31/2016 09:40 AM, Artyom Tarasenko wrote: >> * The "Remove asi helper code handled inline" patch retains the code within >> ldda to handle asis that must be handled out of line. This fixes the >> FreeBSD 10.3 boot problem. While the UA2007 spec (and thus sun4v?) doesn't >> allow for such, it would seem that US2 hardware does. > > What ASI was failing? It may still be a part of sun4v CPUs if it's > described in UST1/UST2 supplements. 0x00000000c08e5680: clr %g4 0x00000000c08e5684: mov 1, %g1 0x00000000c08e5688: sllx %g1, 0x24, %o5 0x00000000c08e568c: mov -1, %g1 0x00000000c08e5690: sllx %g1, 0x23, %g1 0x00000000c08e5694: xor %g1, -128, %o4 0x00000000c08e5698: ldda [ %g4 ] #ASI_IC_TAG, %g0 **** 0x00000000c08e569c: mov %g1, %g2 0x00000000c08e56a0: and %g1, %o5, %g1 0x00000000c08e56a4: brz,a %g1, 0xc08e56dc So indeed it would appear that FreeBSD does in fact want the half of the result that would get stored into %g1. As far as I can see they could have achieved the same result with ldxa [%g4] #ASI_IC_TAG, %g1 srl %g1, 0, %g1 to stay within the nominal spec. r~