Home | History | Annotate | Line # | Download | only in m68060
makeas.sh revision 1.8
      1  1.1       is #!/bin/sh
      2  1.1       is 
      3  1.8      phx # $NetBSD: makeas.sh,v 1.8 2010/01/06 14:10:57 phx Exp $
      4  1.1       is 
      5  1.5       is # Copyright (c) 1999, 2000 Ignatios Souvatzis
      6  1.1       is # All rights reserved.
      7  1.1       is #
      8  1.1       is # Redistribution and use in source and binary forms, with or without
      9  1.1       is # modification, are permitted provided that the following conditions
     10  1.1       is # are met:
     11  1.1       is # 1. Redistributions of source code must retain the above copyright
     12  1.1       is #    notice, this list of conditions and the following disclaimer.
     13  1.1       is # 2. Redistributions in binary form must reproduce the above copyright
     14  1.1       is #    notice, this list of conditions and the following disclaimer in the
     15  1.1       is #    documentation and/or other materials provided with the distribution.
     16  1.1       is #
     17  1.1       is # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     18  1.1       is # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     19  1.1       is # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     20  1.1       is # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     21  1.1       is # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     22  1.1       is # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     23  1.1       is # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     24  1.1       is # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     25  1.1       is # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     26  1.1       is # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     27  1.1       is 
     28  1.1       is 
     29  1.1       is 
     30  1.1       is REALCODE=fplsp_wrap.S
     31  1.1       is FILELIST=Makefile.list
     32  1.1       is 
     33  1.1       is dummy () {
     34  1.1       is while [ X$1 != X ]; do
     35  1.1       is /bin/cat > $1.S << EOM
     36  1.1       is /* \$NetBSD\$ */
     37  1.1       is 
     38  1.1       is /*
     39  1.5       is  * Dummy file. Real code is elsewhere.
     40  1.1       is  *
     41  1.1       is  * DO NOT EDIT - this file is automatically generated.
     42  1.1       is  *
     43  1.1       is  */
     44  1.1       is EOM
     45  1.1       is echo -n " " $1.S >> $FILELIST
     46  1.1       is shift
     47  1.1       is done
     48  1.1       is }
     49  1.1       is 
     50  1.2       is linebreak () {
     51  1.2       is 	echo " \\" >> ${FILELIST}
     52  1.2       is 	echo -n "	" >> ${FILELIST}
     53  1.2       is }
     54  1.2       is 
     55  1.1       is mk () {
     56  1.1       is NAME=$1
     57  1.1       is OFFS=$2
     58  1.5       is THESRC=$3.S
     59  1.5       is shift; shift; shift
     60  1.1       is 
     61  1.5       is echo -n " " ${THESRC} >> $FILELIST
     62  1.5       is /bin/cat > ${THESRC} << EOJ
     63  1.5       is /* \$NetBSD\$ */
     64  1.5       is 
     65  1.5       is /*
     66  1.5       is  * FPLSP wrapper for $NAME
     67  1.5       is  * DO NOT EDIT - this file is automatically generated.
     68  1.5       is  */
     69  1.5       is 
     70  1.5       is #include <machine/asm.h>
     71  1.1       is 
     72  1.1       is ENTRY($NAME)
     73  1.1       is #ifdef __SVR4_ABI__
     74  1.8      phx 	bral PIC_PLT(_C_LABEL(__fplsp060_$OFFS))
     75  1.1       is #else
     76  1.4  thorpej 	movel %sp@(8),%sp@-
     77  1.4  thorpej 	movel %sp@(8),%sp@-
     78  1.8      phx 	bsrl PIC_PLT(_C_LABEL(__fplsp060_$OFFS))
     79  1.4  thorpej 	fmoved %fp0,%sp@
     80  1.4  thorpej 	movel %sp@+,%d0
     81  1.4  thorpej 	movel %sp@+,%d1
     82  1.1       is 	rts
     83  1.1       is #endif
     84  1.1       is EOJ
     85  1.1       is dummy $*
     86  1.1       is }
     87  1.1       is 
     88  1.1       is mks () {
     89  1.1       is NAME=$1
     90  1.1       is OFFS=$2
     91  1.5       is THESRC=$3.S
     92  1.5       is shift; shift; shift
     93  1.5       is 
     94  1.5       is echo -n " " ${THESRC} >> $FILELIST
     95  1.5       is /bin/cat > ${THESRC} << EOJ
     96  1.5       is /* \$NetBSD\$ */
     97  1.5       is 
     98  1.5       is /*
     99  1.5       is  * FPLSP wrapper for $NAME
    100  1.5       is  * DO NOT EDIT - this file is automatically generated.
    101  1.5       is  */
    102  1.1       is 
    103  1.5       is #include <machine/asm.h>
    104  1.1       is 
    105  1.1       is ENTRY($NAME)
    106  1.1       is #ifdef __SVR4_ABI__
    107  1.8      phx 	bral PIC_PLT(_C_LABEL(__fplsp060_$OFFS))
    108  1.1       is #else
    109  1.4  thorpej 	movel %sp@(4),%sp@-
    110  1.8      phx 	bsrl PIC_PLT(_C_LABEL(__fplsp060_$OFFS))
    111  1.4  thorpej 	fmoves %fp0,%sp@
    112  1.4  thorpej 	movel %sp@+,%d0
    113  1.1       is 	rts
    114  1.1       is #endif
    115  1.1       is EOJ
    116  1.1       is dummy $*
    117  1.1       is }
    118  1.1       is 
    119  1.1       is /bin/cat > ${REALCODE} << EOJ
    120  1.1       is /* \$NetBSD\$ */
    121  1.1       is 
    122  1.1       is /*
    123  1.1       is  * FPLSP wrapper.
    124  1.1       is  *
    125  1.1       is  * DO NOT EDIT - this file is automatically generated!
    126  1.1       is  */
    127  1.1       is 
    128  1.1       is #include <machine/asm.h>
    129  1.1       is 
    130  1.1       is EOJ
    131  1.1       is 
    132  1.1       is /bin/cat > ${FILELIST} << EOJ
    133  1.1       is # \$NetBSD\$
    134  1.1       is 
    135  1.1       is #
    136  1.1       is # list of M68060 architecture dependent files for libm.
    137  1.1       is #
    138  1.1       is # Created by a script. Do not edit manually!
    139  1.1       is #
    140  1.1       is 
    141  1.1       is EOJ
    142  1.1       is 
    143  1.1       is echo -n ARCH_SRCS = >> $FILELIST
    144  1.1       is 
    145  1.1       is mks	__ieee754_acosf		0000	e_acosf
    146  1.1       is mk	__ieee754_acos		0008	e_acos
    147  1.1       is mks	__ieee754_asinf		0018	e_asinf
    148  1.1       is mk	__ieee754_asin		0020	e_asin
    149  1.2       is linebreak
    150  1.1       is mks	atanf			0030	s_atanf
    151  1.1       is mk	atan			0038	s_atan
    152  1.1       is mks	__ieee754_atanhf	0048	e_atanhf
    153  1.1       is mk	__ieee754_atanh		0050	e_atanh
    154  1.2       is linebreak
    155  1.3       is mks	cosf			0060	s_cosf
    156  1.3       is mk	cos			0068	s_cos
    157  1.1       is mks	__ieee754_coshf		0078	e_coshf
    158  1.1       is mk	__ieee754_cosh		0080	e_cosh
    159  1.2       is linebreak
    160  1.1       is mks	__ieee754_expf		0090	e_expf
    161  1.1       is mk	__ieee754_exp		0098	e_exp
    162  1.1       is mks	expm1f			00a8	s_expm1f
    163  1.1       is mk	expm1			00b0	s_expm1
    164  1.2       is linebreak
    165  1.1       is mks	__ieee754_log10f	00f0	e_log10f
    166  1.1       is mk	__ieee754_log10		00f8	e_log10
    167  1.1       is mks	logbf			0108	s_logbf
    168  1.1       is mk	logb			0110	s_logb
    169  1.2       is linebreak
    170  1.1       is mks	__ieee754_logf		0120	e_logf
    171  1.1       is mk	__ieee754_log		0128	e_log
    172  1.1       is mks	log1pf			0138	s_log1pf
    173  1.1       is mk	log1p			0140	s_log1p
    174  1.2       is linebreak
    175  1.3       is mks	sinf			0198	s_sinf
    176  1.3       is mk	sin			01a0	s_sin
    177  1.1       is mks	__ieee754_sinhf		01c8	e_sinhf
    178  1.1       is mk	__ieee754_sinh		01d0	e_sinh
    179  1.2       is linebreak
    180  1.1       is mks	tanf			01e0	s_tanf k_tanf
    181  1.1       is mk	tan			01e8	s_tan k_tan
    182  1.1       is mks	tanhf			01f8	s_tanhf
    183  1.1       is mk	tanh			0200	s_tanh
    184  1.2       is linebreak
    185  1.1       is mks	__ieee754_sqrtf		02e8	e_sqrtf
    186  1.1       is mk	__ieee754_sqrt		02f0	e_sqrt
    187  1.1       is 
    188  1.1       is /bin/cat >> ${REALCODE} << EOJ
    189  1.1       is 
    190  1.1       is L060FPLSP_BASE:
    191  1.1       is #include "fplsp.hex"
    192  1.1       is EOJ
    193  1.1       is 
    194  1.1       is echo ""	>> ${FILELIST}
    195  1.1       is echo ARCH_ADDS = ${REALCODE} >> ${FILELIST}
    196