Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/next68k switch next68k to ELF. highlight include:



details:   https://anonhg.NetBSD.org/src/rev/65e48fca263f
branches:  trunk
changeset: 509776:65e48fca263f
user:      chs <chs%NetBSD.org@localhost>
date:      Sat May 12 22:35:29 2001 +0000

description:
switch next68k to ELF.  highlight include:
add "%" prefix to register names in assembly code.
change assembly functions to return pointer values in %a0 instead of %d0.
C symbols no longer prepend an underscore, adjust assembly code for this.
32-bit values are now 32-bit aligned instead of 16-bit aligned,
adjust structure packing and padding to override this where necessary.
make EXEC_ELF std, make EXEC_AOUT and COMPAT_AOUT_M68K optional.
use the MI loadfile() instead of several home-grown versions.

diffstat:

 sys/arch/next68k/conf/GENERIC               |    7 +-
 sys/arch/next68k/conf/SLAB                  |    5 +-
 sys/arch/next68k/conf/files.next68k         |    5 +-
 sys/arch/next68k/conf/std.next68k           |    4 +-
 sys/arch/next68k/include/bus_space.h        |  182 +++++++-------
 sys/arch/next68k/include/cpu.h              |    4 +-
 sys/arch/next68k/include/db_machdep.h       |    4 +-
 sys/arch/next68k/include/loadfile_machdep.h |   76 ++++++
 sys/arch/next68k/next68k/locore.s           |  350 +++++++++++++--------------
 sys/arch/next68k/next68k/machdep.c          |   56 ++--
 sys/arch/next68k/next68k/nextrom.c          |   78 ++++++-
 sys/arch/next68k/next68k/vectors.s          |  177 ++++++-------
 sys/arch/next68k/stand/boot/Makefile        |   28 +-
 sys/arch/next68k/stand/boot/boot.c          |   73 +++--
 sys/arch/next68k/stand/boot/machdep.c       |   77 +++---
 sys/arch/next68k/stand/boot/srt0.s          |  166 ++++++------
 sys/arch/next68k/stand/boot/version         |    3 +-
 17 files changed, 721 insertions(+), 574 deletions(-)

diffs (truncated from 2375 to 300 lines):

diff -r b35174c2fb4a -r 65e48fca263f sys/arch/next68k/conf/GENERIC
--- a/sys/arch/next68k/conf/GENERIC     Sat May 12 22:27:05 2001 +0000
+++ b/sys/arch/next68k/conf/GENERIC     Sat May 12 22:35:29 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.39 2001/04/05 04:42:42 dbj Exp $
+# $NetBSD: GENERIC,v 1.40 2001/05/12 22:35:29 chs Exp $
 #
 # GENERIC next68k
 #
@@ -6,7 +6,7 @@
 
 include "arch/next68k/conf/std.next68k"
 
-#ident                 "GENERIC-$Revision: 1.39 $"
+#ident                 "GENERIC-$Revision: 1.40 $"
 
 # Needs to be set per system.  i.e change these as you see fit
 maxusers       16
@@ -57,7 +57,8 @@
 options        COMPAT_SUNOS    # can run SunOS 4.1.1 executables
 #options       COMPAT_SVR4     # can run SVR4 executables
 #options       COMPAT_LINUX    # can run Linux/m68k executables
-#options       EXEC_ELF32      # 32-bit ELF executables (Linux, SVR4)
+options        COMPAT_AOUT_M68K # support for NetBSD a.out executables
+options        EXEC_AOUT       # support for a.out executables
 
 # File systems
 #file-system   FFS             # UFS
diff -r b35174c2fb4a -r 65e48fca263f sys/arch/next68k/conf/SLAB
--- a/sys/arch/next68k/conf/SLAB        Sat May 12 22:27:05 2001 +0000
+++ b/sys/arch/next68k/conf/SLAB        Sat May 12 22:35:29 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: SLAB,v 1.3 2000/09/29 06:33:17 deberg Exp $
+# $NetBSD: SLAB,v 1.4 2001/05/12 22:35:29 chs Exp $
 #
 # deberg's development machine
 #
@@ -55,7 +55,8 @@
 #options       COMPAT_SUNOS    # can run SunOS 4.1.1 executables
 #options       COMPAT_SVR4     # can run SVR4 executables
 #options       COMPAT_LINUX    # can run Linux/m68k executables
-#options       EXEC_ELF32      # 32-bit ELF executables (Linux, SVR4)
+options        COMPAT_AOUT_M68K # support for NetBSD a.out executables
+options        EXEC_AOUT       # support for a.out executables
 
 # File systems
 #file-system   FFS             # UFS
diff -r b35174c2fb4a -r 65e48fca263f sys/arch/next68k/conf/files.next68k
--- a/sys/arch/next68k/conf/files.next68k       Sat May 12 22:27:05 2001 +0000
+++ b/sys/arch/next68k/conf/files.next68k       Sat May 12 22:35:29 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.next68k,v 1.18 2001/01/17 00:07:31 fvdl Exp $
+# $NetBSD: files.next68k,v 1.19 2001/05/12 22:35:29 chs Exp $
 
 # next68k-specific configuration info
 
@@ -95,6 +95,9 @@
 # RAIDframe
 major  {raid = 20}
 
+# NetBSD m68k a.out Binary Compatibility (COMPAT_AOUT_M68K)
+include "compat/aoutm68k/files.aoutm68k"
+
 # SunOS Binary Compatibility (COMPAT_SUNOS)
 include "compat/sunos/files.sunos"
 file   arch/m68k/m68k/sunos_machdep.c  compat_sunos
diff -r b35174c2fb4a -r 65e48fca263f sys/arch/next68k/conf/std.next68k
--- a/sys/arch/next68k/conf/std.next68k Sat May 12 22:27:05 2001 +0000
+++ b/sys/arch/next68k/conf/std.next68k Sat May 12 22:35:29 2001 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: std.next68k,v 1.8 2000/06/22 20:27:55 fvdl Exp $
+# $NetBSD: std.next68k,v 1.9 2001/05/12 22:35:29 chs Exp $
 
 # Standard information for next68k
 machine        next68k m68k
 
 # Standard defines
-options        EXEC_AOUT
+options        EXEC_ELF32
 options        EXEC_SCRIPT
diff -r b35174c2fb4a -r 65e48fca263f sys/arch/next68k/include/bus_space.h
--- a/sys/arch/next68k/include/bus_space.h      Sat May 12 22:27:05 2001 +0000
+++ b/sys/arch/next68k/include/bus_space.h      Sat May 12 22:35:29 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_space.h,v 1.6 2000/09/29 06:35:57 deberg Exp $     */
+/*     $NetBSD: bus_space.h,v 1.7 2001/05/12 22:35:29 chs Exp $        */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -149,11 +149,11 @@
 #define        bus_space_read_multi_1(t, h, o, a, c) do {                      \
        (void) t;                                                       \
        __asm __volatile ("                                             \
-               movl    %0,a0                                   ;       \
-               movl    %1,a1                                   ;       \
-               movl    %2,d0                                   ;       \
-       1:      movb    a0@,a1@+                                ;       \
-               subql   #1,d0                                   ;       \
+               movl    %0,%%a0                                 ;       \
+               movl    %1,%%a1                                 ;       \
+               movl    %2,%%d0                                 ;       \
+       1:      movb    %%a0@,%%a1@+                            ;       \
+               subql   #1,%%d0                                 ;       \
                jne     1b"                                     :       \
                                                                :       \
                    "r" ((h) + (o)), "g" (a), "g" (c)           :       \
@@ -163,11 +163,11 @@
 #define        bus_space_read_multi_2(t, h, o, a, c) do {                      \
        (void) t;                                                       \
        __asm __volatile ("                                             \
-               movl    %0,a0                                   ;       \
-               movl    %1,a1                                   ;       \
-               movl    %2,d0                                   ;       \
-       1:      movw    a0@,a1@+                                ;       \
-               subql   #1,d0                                   ;       \
+               movl    %0,%%a0                                 ;       \
+               movl    %1,%%a1                                 ;       \
+               movl    %2,%%d0                                 ;       \
+       1:      movw    %%a0@,%%a1@+                            ;       \
+               subql   #1,%%d0                                 ;       \
                jne     1b"                                     :       \
                                                                :       \
                    "r" ((h) + (o)), "g" (a), "g" (c)           :       \
@@ -177,11 +177,11 @@
 #define        bus_space_read_multi_4(t, h, o, a, c) do {                      \
        (void) t;                                                       \
        __asm __volatile ("                                             \
-               movl    %0,a0                                   ;       \
-               movl    %1,a1                                   ;       \
-               movl    %2,d0                                   ;       \
-       1:      movl    a0@,a1@+                                ;       \
-               subql   #1,d0                                   ;       \
+               movl    %0,%%a0                                 ;       \
+               movl    %1,%%a1                                 ;       \
+               movl    %2,%%d0                                 ;       \
+       1:      movl    %%a0@,%%a1@+                            ;       \
+               subql   #1,%%d0                                 ;       \
                jne     1b"                                     :       \
                                                                :       \
                    "r" ((h) + (o)), "g" (a), "g" (c)           :       \
@@ -205,11 +205,11 @@
 #define        bus_space_read_region_1(t, h, o, a, c) do {                     \
        (void) t;                                                       \
        __asm __volatile ("                                             \
-               movl    %0,a0                                   ;       \
-               movl    %1,a1                                   ;       \
-               movl    %2,d0                                   ;       \
-       1:      movb    a0@+,a1@+                               ;       \
-               subql   #1,d0                                   ;       \
+               movl    %0,%%a0                                 ;       \
+               movl    %1,%%a1                                 ;       \
+               movl    %2,%%d0                                 ;       \
+       1:      movb    %%a0@+,%%a1@+                           ;       \
+               subql   #1,%%d0                                 ;       \
                jne     1b"                                     :       \
                                                                :       \
                    "r" ((h) + (o)), "g" (a), "g" (c)           :       \
@@ -219,11 +219,11 @@
 #define        bus_space_read_region_2(t, h, o, a, c) do {                     \
        (void) t;                                                       \
        __asm __volatile ("                                             \
-               movl    %0,a0                                   ;       \
-               movl    %1,a1                                   ;       \
-               movl    %2,d0                                   ;       \
-       1:      movw    a0@+,a1@+                               ;       \
-               subql   #1,d0                                   ;       \
+               movl    %0,%%a0                                 ;       \
+               movl    %1,%%a1                                 ;       \
+               movl    %2,%%d0                                 ;       \
+       1:      movw    %%a0@+,%%a1@+                           ;       \
+               subql   #1,%%d0                                 ;       \
                jne     1b"                                     :       \
                                                                :       \
                    "r" ((h) + (o)), "g" (a), "g" (c)           :       \
@@ -233,11 +233,11 @@
 #define        bus_space_read_region_4(t, h, o, a, c) do {                     \
        (void) t;                                                       \
        __asm __volatile ("                                             \
-               movl    %0,a0                                   ;       \
-               movl    %1,a1                                   ;       \
-               movl    %2,d0                                   ;       \
-       1:      movl    a0@+,a1@+                               ;       \
-               subql   #1,d0                                   ;       \
+               movl    %0,%%a0                                 ;       \
+               movl    %1,%%a1                                 ;       \
+               movl    %2,%%d0                                 ;       \
+       1:      movl    %%a0@+,%%a1@+                           ;       \
+               subql   #1,%%d0                                 ;       \
                jne     1b"                                     :       \
                                                                :       \
                    "r" ((h) + (o)), "g" (a), "g" (c)           :       \
@@ -282,11 +282,11 @@
 #define        bus_space_write_multi_1(t, h, o, a, c) do {                     \
        (void) t;                                                       \
        __asm __volatile ("                                             \
-               movl    %0,a0                                   ;       \
-               movl    %1,a1                                   ;       \
-               movl    %2,d0                                   ;       \
-       1:      movb    a1@+,a0@                                ;       \
-               subql   #1,d0                                   ;       \
+               movl    %0,%%a0                                 ;       \
+               movl    %1,%%a1                                 ;       \
+               movl    %2,%%d0                                 ;       \
+       1:      movb    %%a1@+,%%a0@                            ;       \
+               subql   #1,%%d0                                 ;       \
                jne     1b"                                     :       \
                                                                :       \
                    "r" ((h) + (o)), "g" (a), "g" (c)           :       \
@@ -296,11 +296,11 @@
 #define        bus_space_write_multi_2(t, h, o, a, c) do {                     \
        (void) t;                                                       \
        __asm __volatile ("                                             \
-               movl    %0,a0                                   ;       \
-               movl    %1,a1                                   ;       \
-               movl    %2,d0                                   ;       \
-       1:      movw    a1@+,a0@                                ;       \
-               subql   #1,d0                                   ;       \
+               movl    %0,%%a0                                 ;       \
+               movl    %1,%%a1                                 ;       \
+               movl    %2,%%d0                                 ;       \
+       1:      movw    %%a1@+,%%a0@                            ;       \
+               subql   #1,%%d0                                 ;       \
                jne     1b"                                     :       \
                                                                :       \
                    "r" ((h) + (o)), "g" (a), "g" (c)           :       \
@@ -310,11 +310,11 @@
 #define        bus_space_write_multi_4(t, h, o, a, c) do {                     \
        (void) t;                                                       \
        __asm __volatile ("                                             \
-               movl    %0,a0                                   ;       \
-               movl    %1,a1                                   ;       \
-               movl    %2,d0                                   ;       \
-       1:      movl    a1@+,a0@                                ;       \
-               subql   #1,d0                                   ;       \
+               movl    %0,%%a0                                 ;       \
+               movl    %1,%%a1                                 ;       \
+               movl    %2,%%d0                                 ;       \
+       1:      movl    %%a1@+,%%a0@                            ;       \
+               subql   #1,%%d0                                 ;       \
                jne     1b"                                     :       \
                                                                :       \
                    "r" ((h) + (o)), "g" (a), "g" (c)           :       \
@@ -338,11 +338,11 @@
 #define        bus_space_write_region_1(t, h, o, a, c) do {                    \
        (void) t;                                                       \
        __asm __volatile ("                                             \
-               movl    %0,a0                                   ;       \
-               movl    %1,a1                                   ;       \
-               movl    %2,d0                                   ;       \
-       1:      movb    a1@+,a0@+                               ;       \
-               subql   #1,d0                                   ;       \
+               movl    %0,%%a0                                 ;       \
+               movl    %1,%%a1                                 ;       \
+               movl    %2,%%d0                                 ;       \
+       1:      movb    %%a1@+,%%a0@+                           ;       \
+               subql   #1,%%d0                                 ;       \
                jne     1b"                                     :       \
                                                                :       \
                    "r" ((h) + (o)), "g" (a), "g" (c)           :       \
@@ -352,11 +352,11 @@
 #define        bus_space_write_region_2(t, h, o, a, c) do {                    \
        (void) t;                                                       \
        __asm __volatile ("                                             \
-               movl    %0,a0                                   ;       \
-               movl    %1,a1                                   ;       \
-               movl    %2,d0                                   ;       \
-       1:      movw    a1@+,a0@+                               ;       \
-               subql   #1,d0                                   ;       \
+               movl    %0,%%a0                                 ;       \
+               movl    %1,%%a1                                 ;       \
+               movl    %2,%%d0                                 ;       \
+       1:      movw    %%a1@+,%%a0@+                           ;       \
+               subql   #1,%%d0                                 ;       \
                jne     1b"                                     :       \
                                                                :       \
                    "r" ((h) + (o)), "g" (a), "g" (c)           :       \
@@ -366,11 +366,11 @@
 #define        bus_space_write_region_4(t, h, o, a, c) do {                    \
        (void) t;                                                       \
        __asm __volatile ("                                             \
-               movl    %0,a0                                   ;       \
-               movl    %1,a1                                   ;       \
-               movl    %2,d0                                   ;       \
-       1:      movl    a1@+,a0@+                               ;       \
-               subql   #1,d0                                   ;       \
+               movl    %0,%%a0                                 ;       \
+               movl    %1,%%a1                                 ;       \
+               movl    %2,%%d0                                 ;       \
+       1:      movl    %%a1@+,%%a0@+                           ;       \
+               subql   #1,%%d0                                 ;       \
                jne     1b"                                     :       \
                                                                :       \
                    "r" ((h) + (o)), "g" (a), "g" (c)           :       \
@@ -394,11 +394,11 @@
 #define        bus_space_set_multi_1(t, h, o, val, c) do {                     \
        (void) t;                                                       \
        __asm __volatile ("                                             \
-               movl    %0,a0                                   ;       \
-               movl    %1,d1                                   ;       \
-               movl    %2,d0                                   ;       \



Home | Main Index | Thread Index | Old Index