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