Home | History | Annotate | Line # | Download | only in dist
fplsp.doc revision 1.1.6.2
      1  1.1.6.2  bouyer #
      2  1.1.6.2  bouyer # $NetBSD: fplsp.doc,v 1.1.6.2 2000/11/20 20:11:27 bouyer Exp $
      3  1.1.6.2  bouyer #
      4  1.1.6.2  bouyer 
      5  1.1.6.2  bouyer #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      6  1.1.6.2  bouyer # MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
      7  1.1.6.2  bouyer # M68000 Hi-Performance Microprocessor Division
      8  1.1.6.2  bouyer # M68060 Software Package Production Release 
      9  1.1.6.2  bouyer # 
     10  1.1.6.2  bouyer # M68060 Software Package Copyright (C) 1993, 1994, 1995, 1996 Motorola Inc.
     11  1.1.6.2  bouyer # All rights reserved.
     12  1.1.6.2  bouyer # 
     13  1.1.6.2  bouyer # THE SOFTWARE is provided on an "AS IS" basis and without warranty.
     14  1.1.6.2  bouyer # To the maximum extent permitted by applicable law,
     15  1.1.6.2  bouyer # MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED,
     16  1.1.6.2  bouyer # INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS
     17  1.1.6.2  bouyer # FOR A PARTICULAR PURPOSE and any warranty against infringement with
     18  1.1.6.2  bouyer # regard to the SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF)
     19  1.1.6.2  bouyer # and any accompanying written materials. 
     20  1.1.6.2  bouyer # 
     21  1.1.6.2  bouyer # To the maximum extent permitted by applicable law,
     22  1.1.6.2  bouyer # IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER
     23  1.1.6.2  bouyer # (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS,
     24  1.1.6.2  bouyer # BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS)
     25  1.1.6.2  bouyer # ARISING OF THE USE OR INABILITY TO USE THE SOFTWARE.
     26  1.1.6.2  bouyer # 
     27  1.1.6.2  bouyer # Motorola assumes no responsibility for the maintenance and support
     28  1.1.6.2  bouyer # of the SOFTWARE.  
     29  1.1.6.2  bouyer # 
     30  1.1.6.2  bouyer # You are hereby granted a copyright license to use, modify, and distribute the
     31  1.1.6.2  bouyer # SOFTWARE so long as this entire notice is retained without alteration
     32  1.1.6.2  bouyer # in any modified and/or redistributed versions, and that such modified
     33  1.1.6.2  bouyer # versions are clearly identified as such.
     34  1.1.6.2  bouyer # No licenses are granted by implication, estoppel or otherwise under any
     35  1.1.6.2  bouyer # patents or trademarks of Motorola, Inc.
     36  1.1.6.2  bouyer #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     37  1.1.6.2  bouyer 
     38  1.1.6.2  bouyer 68060 FLOATING-POINT SOFTWARE PACKAGE (Library version)
     39  1.1.6.2  bouyer --------------------------------------------------------
     40  1.1.6.2  bouyer 
     41  1.1.6.2  bouyer The file fplsp.sa contains the "Library version" of the
     42  1.1.6.2  bouyer 68060SP Floating-Point Software Package. The routines
     43  1.1.6.2  bouyer included in this module can be used to emulate the
     44  1.1.6.2  bouyer FP instructions not implemented in 68060 hardware. These
     45  1.1.6.2  bouyer instructions normally take exception vector #11 
     46  1.1.6.2  bouyer "FP Unimplemented Instruction".
     47  1.1.6.2  bouyer 
     48  1.1.6.2  bouyer By re-compiling a program that uses these instructions, and
     49  1.1.6.2  bouyer making subroutine calls in place of the unimplemented
     50  1.1.6.2  bouyer instructions, a program can avoid the overhead associated
     51  1.1.6.2  bouyer with taking the exception.
     52  1.1.6.2  bouyer 
     53  1.1.6.2  bouyer Release file format:
     54  1.1.6.2  bouyer --------------------
     55  1.1.6.2  bouyer The file fplsp.sa is essentially a hexadecimal image of the
     56  1.1.6.2  bouyer release package. This is the ONLY format which will be supported.
     57  1.1.6.2  bouyer The hex image was created by assembling the source code and
     58  1.1.6.2  bouyer then converting the resulting binary output image into an
     59  1.1.6.2  bouyer ASCII text file. The hexadecimal numbers are listed
     60  1.1.6.2  bouyer using the Motorola Assembly Syntax assembler directive "dc.l"
     61  1.1.6.2  bouyer (define constant longword). The file can be converted to other
     62  1.1.6.2  bouyer assembly syntaxes by using any word processor with a global
     63  1.1.6.2  bouyer search and replace function.
     64  1.1.6.2  bouyer 
     65  1.1.6.2  bouyer To assist in assembling and linking this module with other modules,
     66  1.1.6.2  bouyer the installer should add a symbolic label to the top of the file.
     67  1.1.6.2  bouyer This will allow calling routines to access the entry points
     68  1.1.6.2  bouyer of this package.
     69  1.1.6.2  bouyer 
     70  1.1.6.2  bouyer The source code fplsp.s has also been included but only for
     71  1.1.6.2  bouyer documentation purposes.
     72  1.1.6.2  bouyer 
     73  1.1.6.2  bouyer Release file structure:
     74  1.1.6.2  bouyer -----------------------
     75  1.1.6.2  bouyer The file fplsp.sa contains an "Entry-Point" section and a
     76  1.1.6.2  bouyer code section. The FPLSP has no "Call-Out" section. The first section
     77  1.1.6.2  bouyer is the "Entry-Point" section. In order to access a function in the
     78  1.1.6.2  bouyer package, a program must "bsr" or "jsr" to the location listed
     79  1.1.6.2  bouyer below in "68060FPLSP entry points" that corresponds to the desired
     80  1.1.6.2  bouyer function. A branch instruction located at the selected entry point
     81  1.1.6.2  bouyer within the package will then enter the correct emulation code routine.
     82  1.1.6.2  bouyer 
     83  1.1.6.2  bouyer The entry point addresses at the beginning of the package will remain
     84  1.1.6.2  bouyer fixed so that a program calling the routines will not have to be
     85  1.1.6.2  bouyer re-compiled with every new 68060FPLSP release.
     86  1.1.6.2  bouyer 
     87  1.1.6.2  bouyer There are 3 entry-points for each instruction type: single precision,
     88  1.1.6.2  bouyer double precision, and extended precision.
     89  1.1.6.2  bouyer 
     90  1.1.6.2  bouyer As an example, the "fsin" library instruction can be passed an
     91  1.1.6.2  bouyer extended precision operand if program executes:
     92  1.1.6.2  bouyer 
     93  1.1.6.2  bouyer # fsin.x fp0
     94  1.1.6.2  bouyer 
     95  1.1.6.2  bouyer 	fmovm.x	&0x01,-(%sp)	# pass operand on stack
     96  1.1.6.2  bouyer 	bsr.l	_060FPLSP_TOP+0x1a8 # branch to fsin routine
     97  1.1.6.2  bouyer 	add.l	&0xc,%sp	# clear operand from stack
     98  1.1.6.2  bouyer 
     99  1.1.6.2  bouyer Upon return, fp0 holds the correct result. The FPSR is
    100  1.1.6.2  bouyer set correctly. The FPCR is unchanged. The FPIAR is undefined.
    101  1.1.6.2  bouyer 
    102  1.1.6.2  bouyer Another example. This time, a dyadic operation:
    103  1.1.6.2  bouyer 
    104  1.1.6.2  bouyer # frem.s %fp1,%fp0
    105  1.1.6.2  bouyer 
    106  1.1.6.2  bouyer 	fmov.s	%fp1,-(%sp)	# pass src operand
    107  1.1.6.2  bouyer 	fmov.s	%fp0,-(%sp)	# pass dst operand
    108  1.1.6.2  bouyer 	bsr.l	_060FPLSP_TOP+0x168 # branch to frem routine
    109  1.1.6.2  bouyer 	addq.l	&0x8,%sp	# clear operands from stack
    110  1.1.6.2  bouyer 
    111  1.1.6.2  bouyer Again, the result is returned in fp0. Note that BOTH operands
    112  1.1.6.2  bouyer are passed in single precision format.
    113  1.1.6.2  bouyer 
    114  1.1.6.2  bouyer Exception reporting:
    115  1.1.6.2  bouyer --------------------
    116  1.1.6.2  bouyer The package takes exceptions according to the FPCR value upon subroutine
    117  1.1.6.2  bouyer entry. If an exception should be reported, then the package forces
    118  1.1.6.2  bouyer this exception using implemented floating-point instructions.
    119  1.1.6.2  bouyer For example, if the instruction being emulated should cause a
    120  1.1.6.2  bouyer floating-point Operand Error exception, then the library routine
    121  1.1.6.2  bouyer executes an FMUL of a zero and an infinity to force the OPERR
    122  1.1.6.2  bouyer exception. Although the FPIAR will be undefined for the enabled
    123  1.1.6.2  bouyer Operand Error exception handler, the user will at least be able
    124  1.1.6.2  bouyer to record that the event occurred.
    125  1.1.6.2  bouyer 
    126  1.1.6.2  bouyer Miscellaneous:
    127  1.1.6.2  bouyer --------------
    128  1.1.6.2  bouyer The package does not attempt to correctly emulate instructions
    129  1.1.6.2  bouyer with Signalling NAN inputs. Use of SNANs should be avoided with
    130  1.1.6.2  bouyer this package.
    131  1.1.6.2  bouyer 
    132  1.1.6.2  bouyer The fabs/fadd/fdiv/fint/fintrz/fmul/fneg/fsqrt/fsub entry points
    133  1.1.6.2  bouyer are provided for the convenience of older compilers that make
    134  1.1.6.2  bouyer subroutine calls for all fp instructions. The code does NOT emulate
    135  1.1.6.2  bouyer the instruction but rather simply executes it.
    136  1.1.6.2  bouyer 
    137  1.1.6.2  bouyer 68060FPLSP entry points:
    138  1.1.6.2  bouyer ------------------------
    139  1.1.6.2  bouyer _060FPLSP_TOP:
    140  1.1.6.2  bouyer 0x000:	_060LSP__facoss_
    141  1.1.6.2  bouyer 0x008:	_060LSP__facosd_
    142  1.1.6.2  bouyer 0x010:	_060LSP__facosx_
    143  1.1.6.2  bouyer 0x018:	_060LSP__fasins_
    144  1.1.6.2  bouyer 0x020:	_060LSP__fasind_
    145  1.1.6.2  bouyer 0x028:	_060LSP__fasinx_
    146  1.1.6.2  bouyer 0x030:	_060LSP__fatans_
    147  1.1.6.2  bouyer 0x038:	_060LSP__fatand_
    148  1.1.6.2  bouyer 0x040:	_060LSP__fatanx_
    149  1.1.6.2  bouyer 0x048:	_060LSP__fatanhs_
    150  1.1.6.2  bouyer 0x050:	_060LSP__fatanhd_
    151  1.1.6.2  bouyer 0x058:	_060LSP__fatanhx_
    152  1.1.6.2  bouyer 0x060:	_060LSP__fcoss_
    153  1.1.6.2  bouyer 0x068:	_060LSP__fcosd_
    154  1.1.6.2  bouyer 0x070:	_060LSP__fcosx_
    155  1.1.6.2  bouyer 0x078:	_060LSP__fcoshs_
    156  1.1.6.2  bouyer 0x080:	_060LSP__fcoshd_
    157  1.1.6.2  bouyer 0x088:	_060LSP__fcoshx_
    158  1.1.6.2  bouyer 0x090:	_060LSP__fetoxs_
    159  1.1.6.2  bouyer 0x098:	_060LSP__fetoxd_
    160  1.1.6.2  bouyer 0x0a0:	_060LSP__fetoxx_
    161  1.1.6.2  bouyer 0x0a8:	_060LSP__fetoxm1s_
    162  1.1.6.2  bouyer 0x0b0:	_060LSP__fetoxm1d_
    163  1.1.6.2  bouyer 0x0b8:	_060LSP__fetoxm1x_
    164  1.1.6.2  bouyer 0x0c0:	_060LSP__fgetexps_
    165  1.1.6.2  bouyer 0x0c8:	_060LSP__fgetexpd_
    166  1.1.6.2  bouyer 0x0d0:	_060LSP__fgetexpx_
    167  1.1.6.2  bouyer 0x0d8:	_060LSP__fgetmans_
    168  1.1.6.2  bouyer 0x0e0:	_060LSP__fgetmand_
    169  1.1.6.2  bouyer 0x0e8:	_060LSP__fgetmanx_
    170  1.1.6.2  bouyer 0x0f0:	_060LSP__flog10s_
    171  1.1.6.2  bouyer 0x0f8:	_060LSP__flog10d_
    172  1.1.6.2  bouyer 0x100:	_060LSP__flog10x_
    173  1.1.6.2  bouyer 0x108:	_060LSP__flog2s_
    174  1.1.6.2  bouyer 0x110:	_060LSP__flog2d_
    175  1.1.6.2  bouyer 0x118:	_060LSP__flog2x_
    176  1.1.6.2  bouyer 0x120:	_060LSP__flogns_
    177  1.1.6.2  bouyer 0x128:	_060LSP__flognd_
    178  1.1.6.2  bouyer 0x130:	_060LSP__flognx_
    179  1.1.6.2  bouyer 0x138:	_060LSP__flognp1s_
    180  1.1.6.2  bouyer 0x140:	_060LSP__flognp1d_
    181  1.1.6.2  bouyer 0x148:	_060LSP__flognp1x_
    182  1.1.6.2  bouyer 0x150:	_060LSP__fmods_
    183  1.1.6.2  bouyer 0x158:	_060LSP__fmodd_
    184  1.1.6.2  bouyer 0x160:	_060LSP__fmodx_
    185  1.1.6.2  bouyer 0x168:	_060LSP__frems_
    186  1.1.6.2  bouyer 0x170:	_060LSP__fremd_
    187  1.1.6.2  bouyer 0x178:	_060LSP__fremx_
    188  1.1.6.2  bouyer 0x180:	_060LSP__fscales_
    189  1.1.6.2  bouyer 0x188:	_060LSP__fscaled_
    190  1.1.6.2  bouyer 0x190:	_060LSP__fscalex_
    191  1.1.6.2  bouyer 0x198:	_060LSP__fsins_
    192  1.1.6.2  bouyer 0x1a0:	_060LSP__fsind_
    193  1.1.6.2  bouyer 0x1a8:	_060LSP__fsinx_
    194  1.1.6.2  bouyer 0x1b0:	_060LSP__fsincoss_
    195  1.1.6.2  bouyer 0x1b8:	_060LSP__fsincosd_
    196  1.1.6.2  bouyer 0x1c0:	_060LSP__fsincosx_
    197  1.1.6.2  bouyer 0x1c8:	_060LSP__fsinhs_
    198  1.1.6.2  bouyer 0x1d0:	_060LSP__fsinhd_
    199  1.1.6.2  bouyer 0x1d8:	_060LSP__fsinhx_
    200  1.1.6.2  bouyer 0x1e0:	_060LSP__ftans_
    201  1.1.6.2  bouyer 0x1e8:	_060LSP__ftand_
    202  1.1.6.2  bouyer 0x1f0:	_060LSP__ftanx_
    203  1.1.6.2  bouyer 0x1f8:	_060LSP__ftanhs_
    204  1.1.6.2  bouyer 0x200:	_060LSP__ftanhd_
    205  1.1.6.2  bouyer 0x208:	_060LSP__ftanhx_
    206  1.1.6.2  bouyer 0x210:	_060LSP__ftentoxs_
    207  1.1.6.2  bouyer 0x218:	_060LSP__ftentoxd_
    208  1.1.6.2  bouyer 0x220:	_060LSP__ftentoxx_
    209  1.1.6.2  bouyer 0x228:	_060LSP__ftwotoxs_
    210  1.1.6.2  bouyer 0x230:	_060LSP__ftwotoxd_
    211  1.1.6.2  bouyer 0x238:	_060LSP__ftwotoxx_
    212  1.1.6.2  bouyer 
    213  1.1.6.2  bouyer 0x240:	_060LSP__fabss_
    214  1.1.6.2  bouyer 0x248:	_060LSP__fabsd_
    215  1.1.6.2  bouyer 0x250:	_060LSP__fabsx_
    216  1.1.6.2  bouyer 0x258:	_060LSP__fadds_
    217  1.1.6.2  bouyer 0x260:	_060LSP__faddd_
    218  1.1.6.2  bouyer 0x268:	_060LSP__faddx_
    219  1.1.6.2  bouyer 0x270:	_060LSP__fdivs_
    220  1.1.6.2  bouyer 0x278:	_060LSP__fdivd_
    221  1.1.6.2  bouyer 0x280:	_060LSP__fdivx_
    222  1.1.6.2  bouyer 0x288:	_060LSP__fints_
    223  1.1.6.2  bouyer 0x290:	_060LSP__fintd_
    224  1.1.6.2  bouyer 0x298:	_060LSP__fintx_
    225  1.1.6.2  bouyer 0x2a0:	_060LSP__fintrzs_
    226  1.1.6.2  bouyer 0x2a8:	_060LSP__fintrzd_
    227  1.1.6.2  bouyer 0x2b0:	_060LSP__fintrzx_
    228  1.1.6.2  bouyer 0x2b8:	_060LSP__fmuls_
    229  1.1.6.2  bouyer 0x2c0:	_060LSP__fmuld_
    230  1.1.6.2  bouyer 0x2c8:	_060LSP__fmulx_
    231  1.1.6.2  bouyer 0x2d0:	_060LSP__fnegs_
    232  1.1.6.2  bouyer 0x2d8:	_060LSP__fnegd_
    233  1.1.6.2  bouyer 0x2e0:	_060LSP__fnegx_
    234  1.1.6.2  bouyer 0x2e8:	_060LSP__fsqrts_
    235  1.1.6.2  bouyer 0x2f0:	_060LSP__fsqrtd_
    236  1.1.6.2  bouyer 0x2f8:	_060LSP__fsqrtx_
    237  1.1.6.2  bouyer 0x300:	_060LSP__fsubs_
    238  1.1.6.2  bouyer 0x308:	_060LSP__fsubd_
    239  1.1.6.2  bouyer 0x310:	_060LSP__fsubx_
    240