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/hardfloat Update to compile on coldfire.



details:   https://anonhg.NetBSD.org/src/rev/dde7f494f17f
branches:  trunk
changeset: 788727:dde7f494f17f
user:      matt <matt%NetBSD.org@localhost>
date:      Thu Jul 18 21:29:08 2013 +0000

description:
Update to compile on coldfire.

diffstat:

 lib/libc/arch/m68k/hardfloat/cmpdf2.S     |  18 ++++++++++++++----
 lib/libc/arch/m68k/hardfloat/cmpsf2.S     |  18 ++++++++++++++----
 lib/libc/arch/m68k/hardfloat/fixunsdfsi.S |  25 +++++++++++++++++++++----
 lib/libc/arch/m68k/hardfloat/modf.S       |  12 ++++++++++--
 4 files changed, 59 insertions(+), 14 deletions(-)

diffs (169 lines):

diff -r 02bcb60fe90d -r dde7f494f17f lib/libc/arch/m68k/hardfloat/cmpdf2.S
--- a/lib/libc/arch/m68k/hardfloat/cmpdf2.S     Thu Jul 18 21:25:11 2013 +0000
+++ b/lib/libc/arch/m68k/hardfloat/cmpdf2.S     Thu Jul 18 21:29:08 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cmpdf2.S,v 1.1 2013/07/17 06:39:06 matt Exp $  */
+/*     $NetBSD: cmpdf2.S,v 1.2 2013/07/18 21:29:08 matt Exp $  */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -39,7 +39,7 @@
 #if 0
        RCSID("from: @(#)cmpdf2.s       5.1 (Berkeley) 6/7/90")
 #else
-       RCSID("$NetBSD: cmpdf2.S,v 1.1 2013/07/17 06:39:06 matt Exp $")
+       RCSID("$NetBSD: cmpdf2.S,v 1.2 2013/07/18 21:29:08 matt Exp $")
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -49,11 +49,21 @@
 ENTRY(__cmpdf2)
        fmoved  4(%sp),%fp0
        fcmpd   12(%sp),%fp0
-       fbgt    Lagtb
+       fbgt    Lbgt
+#ifdef __mcoldfire__
+       fbeq    Lbeq
+       movql   #-1,%d0
+#else
        fslt    %d0
        extbl   %d0
+#endif
        rts
-Lagtb:
+Lbgt:
        moveq   #1,%d0
        rts
+#ifdef __mcoldfire__
+Lbeq:
+       clrl    %d0
+       rts
+#endif
 END(__cmpdf2)
diff -r 02bcb60fe90d -r dde7f494f17f lib/libc/arch/m68k/hardfloat/cmpsf2.S
--- a/lib/libc/arch/m68k/hardfloat/cmpsf2.S     Thu Jul 18 21:25:11 2013 +0000
+++ b/lib/libc/arch/m68k/hardfloat/cmpsf2.S     Thu Jul 18 21:29:08 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cmpsf2.S,v 1.1 2013/07/17 06:39:06 matt Exp $  */
+/*     $NetBSD: cmpsf2.S,v 1.2 2013/07/18 21:29:08 matt Exp $  */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -39,7 +39,7 @@
 #if 0
        RCSID("from: @(#)cmpsf2.s       5.1 (Berkeley) 6/7/90")
 #else
-       RCSID("$NetBSD: cmpsf2.S,v 1.1 2013/07/17 06:39:06 matt Exp $")
+       RCSID("$NetBSD: cmpsf2.S,v 1.2 2013/07/18 21:29:08 matt Exp $")
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -49,11 +49,21 @@
 ENTRY(__cmpsf2)
        fmoves  4(%sp),%fp0
        fcmps   8(%sp),%fp0
-       fbgt    Lagtb
+       fbgt    Lbgt
+#ifdef __mcoldfire__
+       fbeq    Lbeq
+       movql   #-1,%d0
+#else
        fslt    %d0
        extbl   %d0
+#endif
        rts
-Lagtb:
+Lbgt:
        moveq   #1,%d0
        rts
+#ifdef __mcoldfire__
+Lbeq:
+       clrl    %d0
+       rts
+#endif
 END(__cmpsf2)
diff -r 02bcb60fe90d -r dde7f494f17f lib/libc/arch/m68k/hardfloat/fixunsdfsi.S
--- a/lib/libc/arch/m68k/hardfloat/fixunsdfsi.S Thu Jul 18 21:25:11 2013 +0000
+++ b/lib/libc/arch/m68k/hardfloat/fixunsdfsi.S Thu Jul 18 21:29:08 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fixunsdfsi.S,v 1.1 2013/07/17 06:39:06 matt Exp $      */
+/*     $NetBSD: fixunsdfsi.S,v 1.2 2013/07/18 21:29:08 matt Exp $      */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -39,19 +39,36 @@
 #if 0
        RCSID("from: @(#)fixunsdfsi.s   5.1 (Berkeley) 6/7/90")
 #else
-       RCSID("$NetBSD: fixunsdfsi.S,v 1.1 2013/07/17 06:39:06 matt Exp $")
+       RCSID("$NetBSD: fixunsdfsi.S,v 1.2 2013/07/18 21:29:08 matt Exp $")
 #endif
 #endif /* LIBC_SCCS and not lint */
 
+#ifdef __mcoldfire__
+       .section .rodata,"a"
+       .p2align 4
+L2G:   .double 0r2147483648.0
+#endif
+
 /* (unsigned) double */
 ENTRY(__fixunsdfsi)
        fintrzd 4(%sp),%fp0
-       fcmpd   #0r2147483648.0,%fp0
+#ifdef __mcoldfire__
+       LEA_LCL(L2G,%a0)
+       fmoved  (%a0),%fp1
+       fcmpd   %fp1,%fp0
+#else
+       fmoved  #0r2147483648.0,%fp1
+       fcmpx   %fp1,%fp0
+#endif
        fbge    Lwaybig
        fmovel  %fp0,%d0
        rts
 Lwaybig:
-       fsubd   #0r2147483648.0,%fp0
+#ifdef __mcoldfire__
+       fsubd   %fp1,%fp0
+#else
+       fsubx   %fp1,%fp0
+#endif
        fmovel  %fp0,%d0
        bset    #31,%d0
        rts
diff -r 02bcb60fe90d -r dde7f494f17f lib/libc/arch/m68k/hardfloat/modf.S
--- a/lib/libc/arch/m68k/hardfloat/modf.S       Thu Jul 18 21:25:11 2013 +0000
+++ b/lib/libc/arch/m68k/hardfloat/modf.S       Thu Jul 18 21:29:08 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: modf.S,v 1.1 2013/07/17 06:39:06 matt Exp $    */
+/*     $NetBSD: modf.S,v 1.2 2013/07/18 21:29:08 matt Exp $    */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -39,7 +39,7 @@
 #if 0
        RCSID("from: @(#)modf.s 5.1 (Berkeley) 5/12/90")
 #else
-       RCSID("$NetBSD: modf.S,v 1.1 2013/07/17 06:39:06 matt Exp $")
+       RCSID("$NetBSD: modf.S,v 1.2 2013/07/18 21:29:08 matt Exp $")
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -50,9 +50,17 @@
 ENTRY(modf)
        fmoved  4(%sp),%fp0
        movel   12(%sp),%a0
+#ifdef __mcoldfire__
+       fintrzd %fp0,%fp1
+#else
        fintrzx %fp0,%fp1
+#endif
        fmoved  %fp1,(%a0)
+#ifdef __mcoldfire__
+       fsubd   %fp1,%fp0
+#else
        fsubx   %fp1,%fp0
+#endif
 #ifndef __SVR4_ABI__
        fmoved  %fp0,-(%sp)
        movel   (%sp)+,%d0



Home | Main Index | Thread Index | Old Index