Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/arch/m68k/string When using the SVR4 ABI, return po...



details:   https://anonhg.NetBSD.org/src/rev/af64b4867b66
branches:  trunk
changeset: 472576:af64b4867b66
user:      kleink <kleink%NetBSD.org@localhost>
date:      Sun May 02 20:34:04 1999 +0000

description:
When using the SVR4 ABI, return pointer results in a0, too.

diffstat:

 lib/libc/arch/m68k/string/bcopy.S   |  10 ++++++++--
 lib/libc/arch/m68k/string/index.S   |   7 +++++--
 lib/libc/arch/m68k/string/memset.S  |   7 +++++--
 lib/libc/arch/m68k/string/rindex.S  |  16 ++++++++--------
 lib/libc/arch/m68k/string/strcat.S  |   7 +++++--
 lib/libc/arch/m68k/string/strcpy.S  |   7 +++++--
 lib/libc/arch/m68k/string/strncpy.S |   7 +++++--
 7 files changed, 41 insertions(+), 20 deletions(-)

diffs (212 lines):

diff -r 38a86a0a2d95 -r af64b4867b66 lib/libc/arch/m68k/string/bcopy.S
--- a/lib/libc/arch/m68k/string/bcopy.S Sun May 02 20:18:17 1999 +0000
+++ b/lib/libc/arch/m68k/string/bcopy.S Sun May 02 20:34:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcopy.S,v 1.13 1997/05/15 16:07:31 jtc Exp $   */
+/*     $NetBSD: bcopy.S,v 1.14 1999/05/02 20:34:04 kleink Exp $        */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
 #if 0
        RCSID("from: @(#)bcopy.s        5.1 (Berkeley) 5/12/90")
 #else
-       RCSID("$NetBSD: bcopy.S,v 1.13 1997/05/15 16:07:31 jtc Exp $")
+       RCSID("$NetBSD: bcopy.S,v 1.14 1999/05/02 20:34:04 kleink Exp $")
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -165,6 +165,9 @@
 Lbcdone:
 #if defined(MEMCOPY) || defined(MEMMOVE)
        movl    sp@(4),d0       | dest address
+#if defined(__SVR4_ABI__)
+       moveal  d0,a0
+#endif
 #endif
        rts
 
@@ -233,5 +236,8 @@
 
 #if defined(MEMCOPY) || defined(MEMMOVE)
        movl    sp@(4),d0       | dest address
+#if defined(__SVR4_ABI__)
+       moveal  d0,a0
+#endif
 #endif
        rts
diff -r 38a86a0a2d95 -r af64b4867b66 lib/libc/arch/m68k/string/index.S
--- a/lib/libc/arch/m68k/string/index.S Sun May 02 20:18:17 1999 +0000
+++ b/lib/libc/arch/m68k/string/index.S Sun May 02 20:34:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: index.S,v 1.7 1997/01/04 03:26:21 jtc Exp $    */
+/*     $NetBSD: index.S,v 1.8 1999/05/02 20:34:04 kleink Exp $ */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -43,7 +43,7 @@
 #if 0
        RCSID("from: @(#)index.s        5.1 (Berkeley) 5/12/90")
 #else
-       RCSID("$NetBSD: index.S,v 1.7 1997/01/04 03:26:21 jtc Exp $")
+       RCSID("$NetBSD: index.S,v 1.8 1999/05/02 20:34:04 kleink Exp $")
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -60,6 +60,9 @@
        tstb    a0@+                    | null?
        jne     ixloop                  | no, keep going
        moveq   #0,d0                   | not found, return null
+#ifdef __SVR4_ABI__
+       moveal  d0,a0
+#endif
        rts
 ixfound:
        movl    a0,d0                   | found, return pointer
diff -r 38a86a0a2d95 -r af64b4867b66 lib/libc/arch/m68k/string/memset.S
--- a/lib/libc/arch/m68k/string/memset.S        Sun May 02 20:18:17 1999 +0000
+++ b/lib/libc/arch/m68k/string/memset.S        Sun May 02 20:34:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: memset.S,v 1.10 1997/05/14 18:18:44 jtc Exp $  */
+/*     $NetBSD: memset.S,v 1.11 1999/05/02 20:34:04 kleink Exp $       */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
 #if 0
        RCSID("from: @(#)bzero.s        5.1 (Berkeley) 5/12/90")
 #else
-       RCSID("$NetBSD: memset.S,v 1.10 1997/05/14 18:18:44 jtc Exp $")
+       RCSID("$NetBSD: memset.S,v 1.11 1999/05/02 20:34:04 kleink Exp $")
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -158,5 +158,8 @@
        dbf     d1,Lbzbloop             | till done
 Lbzdone:
        movl    sp@(8),d0               | return destination
+#ifdef __SVR4_ABI__
+       moveal  d0,a0
+#endif
        movl    sp@+,d2
        rts
diff -r 38a86a0a2d95 -r af64b4867b66 lib/libc/arch/m68k/string/rindex.S
--- a/lib/libc/arch/m68k/string/rindex.S        Sun May 02 20:18:17 1999 +0000
+++ b/lib/libc/arch/m68k/string/rindex.S        Sun May 02 20:34:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rindex.S,v 1.7 1997/01/04 03:26:24 jtc Exp $   */
+/*     $NetBSD: rindex.S,v 1.8 1999/05/02 20:34:04 kleink Exp $        */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -43,7 +43,7 @@
 #if 0
        RCSID("from: @(#)rindex.s       5.1 (Berkeley) 5/12/90")
 #else
-       RCSID("$NetBSD: rindex.S,v 1.7 1997/01/04 03:26:24 jtc Exp $")
+       RCSID("$NetBSD: rindex.S,v 1.8 1999/05/02 20:34:04 kleink Exp $")
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -52,15 +52,15 @@
 #else
 ENTRY(rindex)
 #endif
-       movl    sp@(4),a0               | string
+       movl    sp@(4),a1               | string
        movb    sp@(11),d0              | char to look for
-       subl    a1,a1                   | clear rindex pointer
+       subl    a0,a0                   | clear rindex pointer
 rixloop:
-       cmpb    a0@,d0                  | found our char?
+       cmpb    a1@,d0                  | found our char?
        jne     rixnope                 | no, check for null
-       movl    a0,a1                   | yes, remember location
+       movl    a1,a0                   | yes, remember location
 rixnope:
-       tstb    a0@+                    | null?
+       tstb    a1@+                    | null?
        jne     rixloop                 | no, keep going
-       movl    a1,d0                   | return value
+       movl    a0,d0                   | return value
        rts
diff -r 38a86a0a2d95 -r af64b4867b66 lib/libc/arch/m68k/string/strcat.S
--- a/lib/libc/arch/m68k/string/strcat.S        Sun May 02 20:18:17 1999 +0000
+++ b/lib/libc/arch/m68k/string/strcat.S        Sun May 02 20:34:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: strcat.S,v 1.7 1997/01/04 03:26:24 jtc Exp $   */
+/*     $NetBSD: strcat.S,v 1.8 1999/05/02 20:34:04 kleink Exp $        */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -43,7 +43,7 @@
 #if 0
        RCSID("from: @(#)strcpy.s       5.1 (Berkeley) 5/12/90")
 #else
-       RCSID("$NetBSD: strcat.S,v 1.7 1997/01/04 03:26:24 jtc Exp $")
+       RCSID("$NetBSD: strcat.S,v 1.8 1999/05/02 20:34:04 kleink Exp $")
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -58,4 +58,7 @@
 Lscloop:
        movb    a0@+,a1@+               | copy a byte
        jne     Lscloop                 | copied non-null, keep going
+#ifdef __SVR4_ABI__
+       moveal  d0,a0
+#endif
        rts
diff -r 38a86a0a2d95 -r af64b4867b66 lib/libc/arch/m68k/string/strcpy.S
--- a/lib/libc/arch/m68k/string/strcpy.S        Sun May 02 20:18:17 1999 +0000
+++ b/lib/libc/arch/m68k/string/strcpy.S        Sun May 02 20:34:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: strcpy.S,v 1.7 1997/01/04 03:26:26 jtc Exp $   */
+/*     $NetBSD: strcpy.S,v 1.8 1999/05/02 20:34:04 kleink Exp $        */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -43,7 +43,7 @@
 #if 0
        RCSID("from: @(#)strcpy.s       5.1 (Berkeley) 5/12/90")
 #else
-       RCSID("$NetBSD: strcpy.S,v 1.7 1997/01/04 03:26:26 jtc Exp $")
+       RCSID("$NetBSD: strcpy.S,v 1.8 1999/05/02 20:34:04 kleink Exp $")
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -54,4 +54,7 @@
 Lscloop:
        movb    a0@+,a1@+               | copy a byte
        jne     Lscloop                 | copied non-null, keep going
+#ifdef __SVR4_ABI__
+       moveal  d0,a0
+#endif
        rts
diff -r 38a86a0a2d95 -r af64b4867b66 lib/libc/arch/m68k/string/strncpy.S
--- a/lib/libc/arch/m68k/string/strncpy.S       Sun May 02 20:18:17 1999 +0000
+++ b/lib/libc/arch/m68k/string/strncpy.S       Sun May 02 20:34:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: strncpy.S,v 1.8 1997/05/13 19:27:26 jtc Exp $  */
+/*     $NetBSD: strncpy.S,v 1.9 1999/05/02 20:34:04 kleink Exp $       */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -43,7 +43,7 @@
 #if 0
        RCSID("from: @(#)strncpy.s      5.1 (Berkeley) 5/12/90")
 #else
-       RCSID("$NetBSD: strncpy.S,v 1.8 1997/05/13 19:27:26 jtc Exp $")
+       RCSID("$NetBSD: strncpy.S,v 1.9 1999/05/02 20:34:04 kleink Exp $")
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -59,6 +59,9 @@
        subql   #1,d1                   | adjust count
        jne     Lscloop                 | more room, keep going
 Lscdone:
+#ifdef __SVR4_ABI__
+       moveal  d0,a0
+#endif
        rts
 Lscploop:
        subql   #1,d1                   | adjust count



Home | Main Index | Thread Index | Old Index