--- /dev/null
+# .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.
#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;
State.F0 = 1;
}
else
+ */
{
State.regs[OP[0]] = (tmp >> 16) & 0xffff;
State.regs[OP[0]+1] = tmp & 0xffff;
#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;
State.F0 = 1;
}
else
+ */
{
State.regs[OP[0]] = (tmp >> 16) & 0xffff;
State.F0 = 0;