[BACK]Return to fplsp.doc CVS log [TXT][DIR] Up to [local] / sys / arch / m68k / 060sp

Annotation of sys/arch/m68k/060sp/fplsp.doc, Revision 1.1.1.1

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

CVSweb