From: Martin Hunt Date: Wed, 28 Aug 1996 18:09:06 +0000 (+0000) Subject: New file. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=166acb9f8f8c167a5ffa12b47076dc1351f0991f;p=binutils-gdb.git New file. --- diff --git a/sim/d10v/.Sanitize b/sim/d10v/.Sanitize new file mode 100644 index 00000000000..9cbc26d1e75 --- /dev/null +++ b/sim/d10v/.Sanitize @@ -0,0 +1,39 @@ +# .Sanitize for devo/sim/d10v. + +# Each directory to survive its way into a release will need a file +# like this one called "./.Sanitize". All keyword lines must exist, +# and must exist in the order specified by this file. Each directory +# in the tree will be processed, top down, in the following order. + +# Hash started lines like this one are comments and will be deleted +# before anything else is done. Blank lines will also be squashed +# out. + +# The lines between the "Do-first:" line and the "Things-to-keep:" +# line are executed as a /bin/sh shell script before anything else is +# done in this directory. + +Do-first: + +# All files listed between the "Things-to-keep:" line and the +# "Files-to-sed:" line will be kept. All other files will be removed. +# Directories listed in this section will have their own Sanitize +# called. Directories not listed will be removed in their entirety +# with rm -rf. + +Things-to-keep: + +ChangeLog +Makefile.in +configure +configure.in +d10v_sim.h +gencode.c +interp.c +simops.c + +Things-to-lose: + +Do-last: + +# End of file. diff --git a/sim/d10v/simops.c b/sim/d10v/simops.c index 1081639f3db..6df10cf7137 100644 --- a/sim/d10v/simops.c +++ b/sim/d10v/simops.c @@ -1442,13 +1442,20 @@ OP_5201 () #ifdef DEBUG printf(" rac\tr%d,a%d,%d\n",OP[0],OP[1],shift); #endif + if (OP[1] != 0) + { + fprintf (stderr,"ERROR at PC 0x%x: instruction only valid for A0\n",PC<<2); + State.exception = SIGILL; + } + State.F1 = State.F0; if (shift >=0) tmp = ((State.a[0] << 16) | (State.a[1] & 0xffff)) << shift; else tmp = ((State.a[0] << 16) | (State.a[1] & 0xffff)) >> -shift; - tmp = (tmp + 0x8000) >> 16; - + tmp = ( SEXT60(tmp) + 0x8000 ) >> 16; + printf("tmp=0x%llx\n",tmp); + /* if (tmp > MAX32) { State.regs[OP[0]] = 0x7fff; @@ -1462,6 +1469,7 @@ OP_5201 () State.F0 = 1; } else + */ { State.regs[OP[0]] = (tmp >> 16) & 0xffff; State.regs[OP[0]+1] = tmp & 0xffff; @@ -1480,10 +1488,12 @@ OP_4201 () #endif State.F1 = State.F0; if (shift >=0) - tmp = SEXT40 (State.a[1]) << shift; + tmp = SEXT44 (State.a[1]) << shift; else - tmp = SEXT40 (State.a[1]) >> -shift; + tmp = SEXT44 (State.a[1]) >> -shift; tmp += 0x8000; + printf("tmp=0x%llx\n",tmp); + /* if (tmp > MAX32) { State.regs[OP[0]] = 0x7fff; @@ -1495,6 +1505,7 @@ OP_4201 () State.F0 = 1; } else + */ { State.regs[OP[0]] = (tmp >> 16) & 0xffff; State.F0 = 0;