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