This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] sh-sim, return instead of break.
- From: Michael Snyder <msnyder at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Cc: ezannoni <ezannoni at sources dot redhat dot com>
- Date: Wed, 09 Jul 2003 11:59:34 -0700
- Subject: [RFA] sh-sim, return instead of break.
- Organization: Red Hat, Inc.
Rather a fundamental logic error...
2003-07-09 Michael Snyder <msnyder@redhat.com>
* gencode.c (ppi_gensim): For a conditional ppi insn, if the
condition is false, we want to return (not break). A break
will take us to the end of the function where registers will
be updated, whereas the desired outcome is for nothing to change.
Index: gencode.c
===================================================================
RCS file: /cvs/src/src/sim/sh/gencode.c,v
retrieving revision 1.8
diff -p -r1.8 gencode.c
*** gencode.c 4 Jul 2003 00:03:52 -0000 1.8
--- gencode.c 9 Jul 2003 18:56:25 -0000
*************** ppi_gensim ()
*** 2459,2465 ****
break;
case 'c':
printf (" if ((((iword >> 8) ^ DSR) & 1) == 0)\n");
! printf ("\tbreak;\n");
printf (" }\n");
printf (" case %d: \n", p->index + 1);
printf (" {\n");
--- 2459,2465 ----
break;
case 'c':
printf (" if ((((iword >> 8) ^ DSR) & 1) == 0)\n");
! printf ("\treturn;\n");
printf (" }\n");
printf (" case %d: \n", p->index + 1);
printf (" {\n");