Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/microcode/siop - Add support for NOP instruction



details:   https://anonhg.NetBSD.org/src/rev/df1048ea07dc
branches:  trunk
changeset: 485348:df1048ea07dc
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Tue Apr 25 16:01:16 2000 +0000

description:
- Add support for NOP instruction
- fix dsp value for second operand of memory move, so that patch list will be
  correct.

diffstat:

 sys/dev/microcode/siop/ncr53cxxx.c |  19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diffs (62 lines):

diff -r 8d72bb1dd85a -r df1048ea07dc sys/dev/microcode/siop/ncr53cxxx.c
--- a/sys/dev/microcode/siop/ncr53cxxx.c        Tue Apr 25 14:59:38 2000 +0000
+++ b/sys/dev/microcode/siop/ncr53cxxx.c        Tue Apr 25 16:01:16 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ncr53cxxx.c,v 1.1 2000/04/21 17:50:07 bouyer Exp $     */
+/*     $NetBSD: ncr53cxxx.c,v 1.2 2000/04/25 16:01:16 bouyer Exp $     */
 
 /*
  * Copyright (c) 1995,1999 Michael L. Hitch
@@ -69,6 +69,7 @@
 void   f_clear (void);
 void   f_load (void);
 void   f_store (void);
+void   f_nop (void);
 void   f_arch (void);
 
 struct {
@@ -95,6 +96,7 @@
        {"CLEAR",       f_clear},
        {"LOAD",        f_load},
        {"STORE",       f_store},
+       {"NOP",         f_nop},
        {"ARCH",        f_arch},
        {NULL, NULL}};
 
@@ -413,7 +415,7 @@
        if (outfp) {
                time_t cur_time;
 
-               fprintf(outfp, "/*\t$NetBSD: ncr53cxxx.c,v 1.1 2000/04/21 17:50:07 bouyer Exp $\t*/\n");
+               fprintf(outfp, "/*\t$NetBSD: ncr53cxxx.c,v 1.2 2000/04/25 16:01:16 bouyer Exp $\t*/\n");
                fprintf(outfp, "/*\n");
                fprintf(outfp, " *\tDO NOT EDIT - this file is automatically generated.\n");
                time(&cur_time);
@@ -1054,6 +1056,13 @@
        loadstore(i);
 }
 
+void   f_nop (void)
+{
+       inst0 = 0x10000000;
+       inst1 = 0x00000000;
+       store_inst ();
+}
+
 void loadstore(int i)
 {
        int reg, size;
@@ -1335,7 +1344,13 @@
 {
        inst0 = 0xc0000000 + evaluate (tokenix+1);
        inst1 = evaluate (tokenix+3);
+       /*
+        * need to hack dsps, otherwise patch offset will be wrong for
+        * second pointer
+        */
+       dsps += 4;
        inst2 = evaluate (tokenix+5);
+       dsps -= 4;
 }
 
 void   error_line()



Home | Main Index | Thread Index | Old Index