From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYAq3-0002ZK-33 for qemu-devel@nongnu.org; Wed, 27 Jun 2018 09:50:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYApy-0003hc-UL for qemu-devel@nongnu.org; Wed, 27 Jun 2018 09:50:26 -0400 Received: from mail-pl0-x229.google.com ([2607:f8b0:400e:c01::229]:46778) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYApy-0003gI-Av for qemu-devel@nongnu.org; Wed, 27 Jun 2018 09:50:22 -0400 Received: by mail-pl0-x229.google.com with SMTP id 30-v6so1064022pld.13 for ; Wed, 27 Jun 2018 06:50:22 -0700 (PDT) References: <20180618184046.6270-1-richard.henderson@linaro.org> <20180618184046.6270-14-richard.henderson@linaro.org> <20180627125953.GK24595@lianli.shorne-pla.net> From: Richard Henderson Message-ID: Date: Wed, 27 Jun 2018 06:50:18 -0700 MIME-Version: 1.0 In-Reply-To: <20180627125953.GK24595@lianli.shorne-pla.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 13/22] target/openrisc: Fix cpu_mmu_index List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stafford Horne Cc: qemu-devel qemu-devel On 06/27/2018 05:59 AM, Stafford Horne wrote: > The index is negative... this patch should fix that. > > @@ -78,6 +78,7 @@ void HELPER(mtspr)(CPUOpenRISCState *env, target_ulong spr, > target_ulong rb) > case TO_SPR(0, 1024) ... TO_SPR(0, 1024 + (16 * 32)): /* Shadow GPRs */ > idx = (spr - 1024); > env->shadow_gpr[idx / 32][idx % 32] = rb; > + break; > > case TO_SPR(1, 512) ... TO_SPR(1, 512 + TLB_SIZE - 1): /* DTLBW0MR 0-127 */ OMG. That's embarrasing... r~