From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WN77e-00027G-6V for qemu-devel@nongnu.org; Mon, 10 Mar 2014 16:48:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WN77Y-00017g-3h for qemu-devel@nongnu.org; Mon, 10 Mar 2014 16:48:30 -0400 Received: from mail-qc0-x235.google.com ([2607:f8b0:400d:c01::235]:48452) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WN77X-00017c-V4 for qemu-devel@nongnu.org; Mon, 10 Mar 2014 16:48:24 -0400 Received: by mail-qc0-f181.google.com with SMTP id e9so8325114qcy.40 for ; Mon, 10 Mar 2014 13:48:23 -0700 (PDT) Sender: Richard Henderson Message-ID: <531E2513.3060308@twiddle.net> Date: Mon, 10 Mar 2014 13:48:19 -0700 From: Richard Henderson MIME-Version: 1.0 References: <531C4A43.1030309@embedded-brains.de> In-Reply-To: <531C4A43.1030309@embedded-brains.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5] target-sparc: Add and use CPU_FEATURE_CASA List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sebastian Huber , qemu-devel@nongnu.org Cc: blauwirbel@gmail.com, Mark Cave-Ayland , afaerber@suse.de, Fabien Chouteau On 03/09/2014 04:02 AM, Sebastian Huber wrote: > #endif > +#if !defined(CONFIG_USER_ONLY) || defined(TARGET_SPARC64) > + case 0x3c: /* V9 or LEON3 casa */ > + CHECK_IU_FEATURE(dc, CASA); > +#ifndef TARGET_SPARC64 > + if (IS_IMM) { > + goto illegal_insn; > + } > + if (!supervisor(dc)) { > + goto priv_insn; > + } > +#endif > + rs2 = GET_FIELD(insn, 27, 31); > + cpu_src2 = gen_load_gpr(dc, rs2); > + gen_cas_asi(dc, cpu_addr, cpu_src2, insn, rd); > + break; > +#endif Might as well put the feature check inside the ifndef sparc64, since we know that sparc64 always has the feature. Otherwise, Reviewed-by: Richard Henderson r~