Received: from [140.186.70.92] (port=33223 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OrI3B-00015V-Ap for qemu-devel@nongnu.org; Thu, 02 Sep 2010 18:14:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OrI3A-0007ht-4z for qemu-devel@nongnu.org; Thu, 02 Sep 2010 18:14:29 -0400 Received: from mail-ww0-f53.google.com ([74.125.82.53]:50903) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OrI3A-0007hj-0t for qemu-devel@nongnu.org; Thu, 02 Sep 2010 18:14:28 -0400 Received: by wwf26 with SMTP id 26so1194015wwf.10 for ; Thu, 02 Sep 2010 15:14:26 -0700 (PDT) Date: Thu, 2 Sep 2010 23:14:23 +0100 From: Peter Maydell Subject: Re: [Qemu-devel] [PATCH] target-arm: Handle 'smc' as an undefined instruction Message-ID: <20100902221423.GB9117@archaic.org.uk> References: <20100902214050.GD23301@os.inf.tu-dresden.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100902214050.GD23301@os.inf.tu-dresden.de> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Adam Lackorzynski Cc: qemu-devel@nongnu.org On Thu, Sep 02, 2010 at 11:40:50PM +0200, Adam Lackorzynski wrote: > + case 7: > + /* SMC? */ > + if ((insn & 0xfffffff0) == 0xe1600070) { > + goto illegal_op; > + } > + /* bkpt */ This doesn't look right to me. SMC in the ARM encoding is a standard conditionalised instruction, so you shouldn't be mandating that the cond field is 0xe. I think the correct way to distinguish BKPT from SMC is to look at bits [22..21] of the instruction: 01 for BKPT, 11 for SMC and other combinations are UNDEFINED. This is in 'op1' at this point in the code... -- Peter Maydell