aboutsummaryrefslogtreecommitdiff
path: root/sim/sh
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1995-08-31 04:07:00 +0000
committerJeff Law <law@redhat.com>1995-08-31 04:07:00 +0000
commit2ca7c3c41703f380668e19a9407adb72095edcce (patch)
tree0488eaf362659b5188a482c792aaef63b7a72c4d /sim/sh
parentebcb9b6d4e72dba5af48e7aae245ed829938e873 (diff)
downloadgdb-2ca7c3c41703f380668e19a9407adb72095edcce.zip
gdb-2ca7c3c41703f380668e19a9407adb72095edcce.tar.gz
gdb-2ca7c3c41703f380668e19a9407adb72095edcce.tar.bz2
* gencode.c (gensim): abort if an unknown opcode is encountered.
Diffstat (limited to 'sim/sh')
-rw-r--r--sim/sh/ChangeLog33
-rw-r--r--sim/sh/gencode.c11
2 files changed, 35 insertions, 9 deletions
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog
index b868485..8fecfab 100644
--- a/sim/sh/ChangeLog
+++ b/sim/sh/ChangeLog
@@ -1,7 +1,36 @@
+Wed Aug 30 22:05:17 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * gencode.c (gensim): abort if an unknown opcode is encountered.
+
+Tue Aug 22 14:16:46 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * interp.c (trap): Use trap vector 34 for host system interface.
+ * gencode.c: Add 34 to conditional which determines which traps
+ will be handled by simulator.
+
+Fri Aug 11 17:59:15 1995 Jim Wilson <wilson@chestnut.cygnus.com>
+
+ * run.c: Include <signal.h>. Define SIGQUIT if not defined.
+ (main): New variables reason and sigrc. After simulator exits,
+ check to see if it exited because of a signal, and if so, then
+ use the signal number as the return value.
+
+Thu Aug 3 10:45:37 1995 Fred Fish <fnf@cygnus.com>
+
+ * Update all FSF addresses except those in COPYING* files.
+
+Tue Jul 18 23:33:10 1995 Fred Fish <fnf@fishbowl>
+
+ * interp.c (trap): Only use SYS_execv if defined. Might be
+ implemented as execve(arg1,arg2,0), as with Unixware 2.0.
+ (sim_resume): In sbit initializer, cast shifted arg to unsigned
+ to avoid signed integer overflow.
+
Wed Jul 5 14:32:54 1995 J.T. Conklin <jtc@rtl.cygnus.com>
- * Makefile.in (distclean, mostlyclean, realclean): Remove autoconf
- files.
+ * Makefile.in (clean): Remove run, libsim.a.
+ (distclean, mostlyclean, realclean): Remove Makefile and
+ autoconf files.
* sh.mt: Removed.
diff --git a/sim/sh/gencode.c b/sim/sh/gencode.c
index 476acc1..7685b71 100644
--- a/sim/sh/gencode.c
+++ b/sim/sh/gencode.c
@@ -151,14 +151,10 @@ op tab[] =
"{ int tmp = PC; PC=RLAT(R[15])+2;R[15]+=4;SET_SR(RLAT(R[15]) & 0x3f3);R[15]+=4;SL(tmp+2);}"},
{"","","rts", "0000000000001011", "ult=PC;PC=PR+2;SL(ult+2);"},
{"","","sett", "0000000000011000", "T=1;"},
-
-/* start-sanitize-sh3 */
{"n","mn","shad <REG_M>,<REG_N>", "0100nnnnmmmm1100",
"R[n] = (R[m] < 0) ? (((int)R[n]) >> -(R[m]&0x1f) ): (R[n] << ((R[m]) & 0x1f)) ;"},
-
{"n","mn","shld <REG_M>,<REG_N>", "0100nnnnmmmm1101",
"R[n] = (R[m] < 0) ? (((unsigned int)R[n]) >> -(R[m]&0x1f) ): (R[n] << ((R[m]) & 0x1f)) ;"},
-/* end-sanitize-sh3 */
{"n","n","shal <REG_N>", "0100nnnn00100000", "T=R[n]<0; R[n]<<=1;"},
{"n","n","shar <REG_N>", "0100nnnn00100001", "T=R[n]&1; R[n] = R[n] >> 1;"},
{"n","n","shll <REG_N>", "0100nnnn00000000", "T=R[n]<0; R[n]<<=1;"},
@@ -190,7 +186,7 @@ op tab[] =
{"n","nm","swap.w <REG_M>,<REG_N>", "0110nnnnmmmm1001", "R[n]=((R[m]<<16)&0xffff0000)|((R[m]>>16)&0x00ffff);"},
{"","n","tas.b @<REG_N>", "0100nnnn00011011", "ult=RBAT(R[n]);T=ult==0;WBAT(R[n],ult|0x80);"},
{"0","","trapa #<imm>", "11000011i8*1....",
- "{ long imm = 0xff & i; if (i<20||i==0xc3) trap(i,R,memory,maskl,maskw,little_endian); else { R[15]-=4; WLAT(R[15],GET_SR()); R[15]-=4;WLAT(R[15],PC+2); PC=RLAT(VBR+(imm<<2))-2;}}"},
+ "{ long imm = 0xff & i; if (i<20||i==34||i==0xc3) trap(i,R,memory,maskl,maskw,little_endian); else { R[15]-=4; WLAT(R[15],GET_SR()); R[15]-=4;WLAT(R[15],PC+2); PC=RLAT(VBR+(imm<<2))-2;}}"},
{"","0","tst #<imm>,R0", "11001000i8*1....", "T=(R0&i)==0;"},
{"","mn","tst <REG_M>,<REG_N>", "0010nnnnmmmm1000", "T=(R[n]&R[m])==0;"},
{"","0","tst.b #<imm>,@(R0,GBR)", "11001100i8*1....", "T=(RBAT(GBR+R0)&i)==0;"},
@@ -466,7 +462,7 @@ genopc ()
printf ("sh_opcode_info sh_table[]={\n");
for (p = tab; p->name; p++)
{
- printf ("\n\/\* %s %-20s*/", p->code, p->name);
+ printf ("\n/* %s %-20s*/", p->code, p->name);
think (p);
}
printf ("0};\n");
@@ -619,7 +615,7 @@ gensim ()
char *s = p->code;
- printf ("\/\* %s %s *\/\n", p->name, p->code);
+ printf ("/* %s %s */\n", p->name, p->code);
printf ("case %d: \n", p->index);
printf ("{\n");
@@ -718,6 +714,7 @@ gensim ()
printf ("break;\n");
printf ("}\n");
}
+ printf("default:\n{\nabort();;\n}\n");
printf ("}\n}\n");
}