Received: from eggs.gnu.org ([2001:4830:134:3::10]:49792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btxwX-0003iq-9S for qemu-devel@nongnu.org; Tue, 11 Oct 2016 10:22:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btxwT-0005tF-Gs for qemu-devel@nongnu.org; Tue, 11 Oct 2016 10:22:09 -0400 Received: from mail-qt0-x241.google.com ([2607:f8b0:400d:c0d::241]:34635) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btxwT-0005t9-CK for qemu-devel@nongnu.org; Tue, 11 Oct 2016 10:22:05 -0400 Received: by mail-qt0-x241.google.com with SMTP id f6so656916qtd.1 for ; Tue, 11 Oct 2016 07:22:05 -0700 (PDT) Sender: Richard Henderson References: <1475316333-9776-1-git-send-email-atar4qemu@gmail.com> <1475316333-9776-24-git-send-email-atar4qemu@gmail.com> From: Richard Henderson Message-ID: <97fc3ce9-ea48-28a8-5cbe-ea96f5e0da19@twiddle.net> Date: Tue, 11 Oct 2016 09:22:02 -0500 MIME-Version: 1.0 In-Reply-To: <1475316333-9776-24-git-send-email-atar4qemu@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 23/29] target-sparc: implement ST_BLKINIT_ ASIs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Artyom Tarasenko , qemu-devel@nongnu.org Cc: Mark Cave-Ayland On 10/01/2016 05:05 AM, Artyom Tarasenko wrote: > @@ -2234,13 +2234,24 @@ static void gen_st_asi(DisasContext *dc, TCGv src, TCGv addr, > switch (da.type) { > case GET_ASI_EXCP: > break; > - case GET_ASI_DTWINX: /* Reserved for stda. */ > - gen_exception(dc, TT_ILL_INSN); > - break; > case GET_ASI_DIRECT: > gen_address_mask(dc, addr); > tcg_gen_qemu_st_tl(src, addr, da.mem_idx, da.memop); > break; > + case GET_ASI_DTWINX: > +#ifndef TARGET_SPARC64 > + gen_exception(dc, TT_ILL_INSN); > + break; > +#else > + if (!(dc->def->features & CPU_FEATURE_HYPV)) { > + /* Pre OpenSPARC CPUs don't have these */ > + gen_exception(dc, TT_ILL_INSN); > + return; > + } > + /* in OpenSPARC T1+ CPUs TWINX ASIs in store instructions > + * are ST_BLKINIT_ ASIs */ > + /* fall through */ > +#endif > default: Of course, "DTWINX" is short for "DIRECT TWINX", so you don't need to fall into the default case, but into the DIRECT case. Indeed, built upon my patch set that would reach g_assert_not_reached, since I removed all the cases that are handled inline. r~