* [patch, moxie] sim tweak for NOP instruction
@ 2010-02-03 11:30 Anthony Green
0 siblings, 0 replies; only message in thread
From: Anthony Green @ 2010-02-03 11:30 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 131 bytes --]
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
[-- Attachment #2: moxie-sim.patch --]
[-- Type: text/x-patch, Size: 1262 bytes --]
2010-02-03 Anthony Green <green@moxielogic.com>
* 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");
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-02-03 11:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-03 11:30 [patch, moxie] sim tweak for NOP instruction Anthony Green
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox