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.
This commit is contained in:
is 2000-05-12 20:08:04 +00:00
parent e0292df01c
commit 183dfce153
3 changed files with 35 additions and 13 deletions

View File

@ -27,3 +27,5 @@ Double precision:
movel sp@+,d1 4
rts 2
(26 bytes)
For __SVR4_ABI, the code is much shorter... it reduces to a single jbra.

View File

@ -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 @@ while [ X$1 != X ]; do
/* \$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 @@ linebreak () {
mk () {
NAME=$1
OFFS=$2
shift; shift
THESRC=$3.S
shift; shift; shift
/bin/cat >> ${REALCODE} << EOJ
echo -n " " ${THESRC} >> $FILELIST
/bin/cat > ${THESRC} << EOJ
/* \$NetBSD\$ */
/*
* 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 @@ dummy $*
mks () {
NAME=$1
OFFS=$2
shift; shift
THESRC=$3.S
shift; shift; shift
/bin/cat >> ${REALCODE} << EOJ
echo -n " " ${THESRC} >> $FILELIST
/bin/cat > ${THESRC} << EOJ
/* \$NetBSD\$ */
/*
* 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

View File

@ -2,8 +2,8 @@ BEGIN{FS=",";s = -16;}
/\.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;\
}