aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Hunt <hunt@redhat.com>1996-08-28 18:09:06 +0000
committerMartin Hunt <hunt@redhat.com>1996-08-28 18:09:06 +0000
commit166acb9f8f8c167a5ffa12b47076dc1351f0991f (patch)
tree7589576ef34a56541ae9c0b002abc11e8f4545a3
parent0cf433d937ce0a56e4f0d17a9fe85017d2fe4d60 (diff)
downloadgdb-166acb9f8f8c167a5ffa12b47076dc1351f0991f.zip
gdb-166acb9f8f8c167a5ffa12b47076dc1351f0991f.tar.gz
gdb-166acb9f8f8c167a5ffa12b47076dc1351f0991f.tar.bz2
New file.
-rw-r--r--sim/d10v/.Sanitize39
-rw-r--r--sim/d10v/simops.c19
2 files changed, 54 insertions, 4 deletions
diff --git a/sim/d10v/.Sanitize b/sim/d10v/.Sanitize
new file mode 100644
index 0000000..9cbc26d
--- /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 1081639..6df10cf 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;