Source-Changes-HG archive

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

[src/trunk]: src/lib/libm/arch/m68060 Move each wrapper function to its own s...



details:   https://anonhg.NetBSD.org/src/rev/db10fe5dff73
branches:  trunk
changeset: 486080:db10fe5dff73
user:      is <is%NetBSD.org@localhost>
date:      Fri May 12 20:08:04 2000 +0000

description:
Move each wrapper function to its own source file, such that redefining one
function doesn't give link errors when another one is pulled in from the
library.
Problem discovered by Klaus Klein.

diffstat:

 lib/libm/arch/m68060/Readme.NetBSD |   2 +
 lib/libm/arch/m68060/makeas.sh     |  42 ++++++++++++++++++++++++++++---------
 lib/libm/arch/m68060/makeoffs.awk  |   4 +-
 3 files changed, 35 insertions(+), 13 deletions(-)

diffs (109 lines):

diff -r ffe84fc3f8a8 -r db10fe5dff73 lib/libm/arch/m68060/Readme.NetBSD
--- a/lib/libm/arch/m68060/Readme.NetBSD        Fri May 12 18:46:33 2000 +0000
+++ b/lib/libm/arch/m68060/Readme.NetBSD        Fri May 12 20:08:04 2000 +0000
@@ -27,3 +27,5 @@
        movel   sp@+,d1                         4
        rts                                     2
        (26 bytes)
+
+For __SVR4_ABI, the code is much shorter... it reduces to a single jbra.
diff -r ffe84fc3f8a8 -r db10fe5dff73 lib/libm/arch/m68060/makeas.sh
--- a/lib/libm/arch/m68060/makeas.sh    Fri May 12 18:46:33 2000 +0000
+++ b/lib/libm/arch/m68060/makeas.sh    Fri May 12 20:08:04 2000 +0000
@@ -1,8 +1,8 @@
 #!/bin/sh
 
-# $NetBSD: makeas.sh,v 1.4 1999/11/10 16:32:45 thorpej Exp $
+# $NetBSD: makeas.sh,v 1.5 2000/05/12 20:08:04 is Exp $
 
-# Copyright (c) 1999 Ignatios Souvatzis
+# Copyright (c) 1999, 2000 Ignatios Souvatzis
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,7 @@
 /* \$NetBSD\$ */
 
 /*
- * Dummy file. Real code is in ${REALCODE}.
+ * Dummy file. Real code is elsewhere.
  *
  * DO NOT EDIT - this file is automatically generated.
  *
@@ -61,17 +61,27 @@
 mk () {
 NAME=$1
 OFFS=$2
-shift; shift
+THESRC=$3.S
+shift; shift; shift
+
+echo -n " " ${THESRC} >> $FILELIST
+/bin/cat > ${THESRC} << EOJ
+/* \$NetBSD\$ */
 
-/bin/cat >> ${REALCODE} << EOJ
+/*
+ * FPLSP wrapper for $NAME
+ * DO NOT EDIT - this file is automatically generated.
+ */
+
+#include <machine/asm.h>
 
 ENTRY($NAME)
 #ifdef __SVR4_ABI__
-       jbra L060FPLSP$OFFS
+       jbra _ASM_LABEL(___060FPLSP$OFFS)
 #else
        movel %sp@(8),%sp@-
        movel %sp@(8),%sp@-
-       jbsr L060FPLSP$OFFS
+       jbsr _ASM_LABEL(___060FPLSP$OFFS)
        fmoved %fp0,%sp@
        movel %sp@+,%d0
        movel %sp@+,%d1
@@ -84,16 +94,26 @@
 mks () {
 NAME=$1
 OFFS=$2
-shift; shift
+THESRC=$3.S
+shift; shift; shift
+
+echo -n " " ${THESRC} >> $FILELIST
+/bin/cat > ${THESRC} << EOJ
+/* \$NetBSD\$ */
 
-/bin/cat >> ${REALCODE} << EOJ
+/*
+ * FPLSP wrapper for $NAME
+ * DO NOT EDIT - this file is automatically generated.
+ */
+
+#include <machine/asm.h>
 
 ENTRY($NAME)
 #ifdef __SVR4_ABI__
-       jbra L060FPLSP$OFFS
+       jbra _ASM_LABEL(___060FPLSP$OFFS)
 #else
        movel %sp@(4),%sp@-
-       jbsr L060FPLSP$OFFS
+       jbsr _ASM_LABEL(___060FPLSP$OFFS)
        fmoves %fp0,%sp@
        movel %sp@+,%d0
        rts
diff -r ffe84fc3f8a8 -r db10fe5dff73 lib/libm/arch/m68060/makeoffs.awk
--- a/lib/libm/arch/m68060/makeoffs.awk Fri May 12 18:46:33 2000 +0000
+++ b/lib/libm/arch/m68060/makeoffs.awk Fri May 12 20:08:04 2000 +0000
@@ -2,8 +2,8 @@
 /\.long/{s += 16;}
 s<0 || s>1023{print $0}
 s>=0 && s<1024{\
-       printf "L060FPLSP%04x: ", s;\
+       printf "ASENTRY_NOPROFILE(___060FPLSP%04x) ", s;\
        print $1 "," $2;\
-       printf "L060FPLSP%04x: ", s+8;\
+       printf "ASENTRY_NOPROFILE(___060FPLSP%04x) ", s+8;\
        print " .long   " $3 "," $4;\
 }



Home | Main Index | Thread Index | Old Index