Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x68k/stand/xxboot Fixed the bug described in the pr...



details:   https://anonhg.NetBSD.org/src/rev/8f109773b731
branches:  trunk
changeset: 467740:8f109773b731
user:      minoura <minoura%NetBSD.org@localhost>
date:      Sun Mar 28 14:03:36 1999 +0000

description:
Fixed the bug described in the previous commit log.
Re-enabled the title image.

diffstat:

 sys/arch/x68k/stand/xxboot/Makefile         |   4 ++--
 sys/arch/x68k/stand/xxboot/gunzip/inflate.c |  20 +++++++++++---------
 2 files changed, 13 insertions(+), 11 deletions(-)

diffs (78 lines):

diff -r b6adad40fa69 -r 8f109773b731 sys/arch/x68k/stand/xxboot/Makefile
--- a/sys/arch/x68k/stand/xxboot/Makefile       Sun Mar 28 13:48:40 1999 +0000
+++ b/sys/arch/x68k/stand/xxboot/Makefile       Sun Mar 28 14:03:36 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.4 1999/03/27 15:01:34 minoura Exp $
+#      $NetBSD: Makefile,v 1.5 1999/03/28 14:03:36 minoura Exp $
 
 BOOT=  xxboot
 VERSION=0.3
@@ -26,7 +26,7 @@
 CFLAGS+= -W -Wall -Wconversion -Wstrict-prototypes -Wmissing-prototypes
 CFLAGS+= -DTEXTADDR="0x$(TEXT)" -DBOOT=\"$(BOOT)\" -DBOOT_VERS=\"$(VERSION)\"
 CFLAGS+= -DGZIP -DSCSI_ADHOC_BOOTPART
-#CFLAGS+= -DTITLE_IMAGE -DIMAGE_EXTRA=100      # XXX: minoura, Mar. 99
+CFLAGS+= -DTITLE_IMAGE -DIMAGE_EXTRA=100
 #CFLAGS+= -DBOOT_DEBUG
 AFLAGS=        ${CFLAGS:M-[ID]*}
 LDFLAGS=-n -Bstatic -T $(TEXT)
diff -r b6adad40fa69 -r 8f109773b731 sys/arch/x68k/stand/xxboot/gunzip/inflate.c
--- a/sys/arch/x68k/stand/xxboot/gunzip/inflate.c       Sun Mar 28 13:48:40 1999 +0000
+++ b/sys/arch/x68k/stand/xxboot/gunzip/inflate.c       Sun Mar 28 14:03:36 1999 +0000
@@ -100,7 +100,7 @@
  */
 
 #ifdef RCSID
-static char rcsid[] = "$NetBSD: inflate.c,v 1.2 1999/03/27 15:01:34 minoura Exp $";
+static char rcsid[] = "$NetBSD: inflate.c,v 1.3 1999/03/28 14:03:36 minoura Exp $";
 #endif
 
 #include <sys/types.h>
@@ -118,7 +118,7 @@
 #ifdef BOOT
 static voidp fake_malloc_for_inflate OF((unsigned));
 static void fake_free_for_inflate OF((void));
-#if !defined (__m68k__) || 1
+#ifndef __m68k__
 static
 #endif
 int get_byte OF((void));
@@ -297,16 +297,18 @@
 #endif
 #endif
 
-#if defined(__GNUC__) && defined(__m68k__) && 0        /* XXX: minoura Mar. 99 */
+#if defined(__GNUC__) && defined(__m68k__)
 #ifdef BOOT
 /* optimize for size */
 #define NEEDBITS(n) {  \
-               register unsigned k_ asm("d3") = k;             \
+               register unsigned k_ asm("d5") = k;             \
                register ulg b_ asm("d4") = b;                  \
                register const unsigned n_ asm("d1") = (n);     \
                asm volatile("jbsr      needbits"               \
-                       : "=d" (k), "=d" (b)                    \
-                       : "0" (k_), "1" (b_), "r"(n_) : "a0");  \
+                       : "=d" (k_), "=d" (b_)                  \
+                       : "d" (k_), "d" (b_), "r"(n_) : "a0");  \
+               k = k_;                                         \
+               b = b_;                                         \
        }
 asm("_get_byte:\n\
        movel   _csrc,a0\n\
@@ -317,12 +319,12 @@
 asm("Lneedlp:\n\
        movel   d0,sp@-\n\
        jbsr    _get_byte\n\
-       lsll    d3,d0\n\
+       lsll    d5,d0\n\
        orl     d0,d4\n\
        movel   sp@+,d0\n\
-       addql   #8,d3\n\
+       addql   #8,d5\n\
 needbits:\n\
-       cmpw    d1,d3\n\
+       cmpw    d1,d5\n\
        jcs     Lneedlp\n\
        rts");
 #else



Home | Main Index | Thread Index | Old Index