From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11778 invoked by alias); 3 Feb 2010 11:30:51 -0000 Received: (qmail 11768 invoked by uid 22791); 3 Feb 2010 11:30:51 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Received: from p3plsmtpa01-08.prod.phx3.secureserver.net (HELO p3plsmtpa01-08.prod.phx3.secureserver.net) (72.167.82.88) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Wed, 03 Feb 2010 11:30:47 +0000 Received: (qmail 21283 invoked from network); 3 Feb 2010 11:30:46 -0000 Received: from unknown (99.226.65.232) by p3plsmtpa01-08.prod.phx3.secureserver.net (72.167.82.88) with ESMTP; 03 Feb 2010 11:30:46 -0000 Subject: [patch, moxie] sim tweak for NOP instruction From: Anthony Green To: gdb-patches@sourceware.org Content-Type: multipart/mixed; boundary="=-rLqOy2rZXQh/Lp/k5U53" Date: Wed, 03 Feb 2010 11:30:00 -0000 Message-ID: <1265196644.19156.16.camel@localhost> Mime-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-02/txt/msg00063.txt.bz2 --=-rLqOy2rZXQh/Lp/k5U53 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Content-length: 131 A while ago I moved the NOP opcode from 0x00 to 0x0f, but the simulator patch got lost in the mix. I'm committing this fix. AG --=-rLqOy2rZXQh/Lp/k5U53 Content-Disposition: attachment; filename="moxie-sim.patch" Content-Type: text/x-patch; name="moxie-sim.patch"; charset="UTF-8" Content-Transfer-Encoding: 7bit Content-length: 1262 2010-02-03 Anthony Green * interp.c (sim_resume): nop is 0x0f, and 0x00 is an illegal instruction. Index: moxie/interp.c =================================================================== RCS file: /cvs/src/src/sim/moxie/interp.c,v retrieving revision 1.8 diff -u -r1.8 interp.c --- moxie/interp.c 13 Jan 2010 14:08:36 -0000 1.8 +++ moxie/interp.c 3 Feb 2010 10:13:55 -0000 @@ -414,7 +414,10 @@ int opcode = inst >> 8; switch (opcode) { - case 0x00: /* nop */ + case 0x00: /* bad */ + opc = opcode; + TRACE("SIGILL0"); + cpu.asregs.exception = SIGILL; break; case 0x01: /* ldi.l (immediate) */ { @@ -587,16 +590,17 @@ cpu.asregs.cc = cc; } break; - case 0x0f: - case 0x10: - case 0x11: - case 0x12: - case 0x13: - case 0x14: - case 0x15: - case 0x16: - case 0x17: - case 0x18: + case 0x0f: /* nop */ + break; + case 0x10: /* bad */ + case 0x11: /* bad */ + case 0x12: /* bad */ + case 0x13: /* bad */ + case 0x14: /* bad */ + case 0x15: /* bad */ + case 0x16: /* bad */ + case 0x17: /* bad */ + case 0x18: /* bad */ { opc = opcode; TRACE("SIGILL0"); --=-rLqOy2rZXQh/Lp/k5U53--