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