fplsp.doc
来自「linux 内核源代码」· DOC 代码 · 共 232 行
DOC
232 行
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUPM68000 Hi-Performance Microprocessor DivisionM68060 Software PackageProduction Release P1.00 -- October 10, 1994M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved.THE SOFTWARE is provided on an "AS IS" basis and without warranty.To the maximum extent permitted by applicable law,MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED,INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSEand any warranty against infringement with regard to the SOFTWARE(INCLUDING ANY MODIFIED VERSIONS THEREOF) and any accompanying written materials.To the maximum extent permitted by applicable law,IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER(INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS,BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS)ARISING OF THE USE OR INABILITY TO USE THE SOFTWARE.Motorola assumes no responsibility for the maintenance and support of the SOFTWARE.You are hereby granted a copyright license to use, modify, and distribute the SOFTWAREso long as this entire notice is retained without alteration in any modified and/orredistributed versions, and that such modified versions are clearly identified as such.No licenses are granted by implication, estoppel or otherwise under any patentsor trademarks of Motorola, Inc.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~68060 FLOATING-POINT SOFTWARE PACKAGE (Library version)--------------------------------------------------------The file fplsp.sa contains the "Library version" of the68060SP Floating-Point Software Package. The routinesincluded in this module can be used to emulate theFP instructions not implemented in 68060 hardware. Theseinstructions normally take exception vector #11"FP Unimplemented Instruction".By re-compiling a program that uses these instructions, andmaking subroutine calls in place of the unimplementedinstructions, a program can avoid the overhead associatedwith taking the exception.Release file format:--------------------The file fplsp.sa is essentially a hexadecimal image of therelease package. This is the ONLY format which will be supported.The hex image was created by assembling the source code andthen converting the resulting binary output image into anASCII text file. The hexadecimal numbers are listedusing the Motorola Assembly Syntax assembler directive "dc.l"(define constant longword). The file can be converted to otherassembly syntaxes by using any word processor with a globalsearch and replace function.To assist in assembling and linking this module with other modules,the installer should add a symbolic label to the top of the file.This will allow calling routines to access the entry pointsof this package.The source code fplsp.s has also been included but only fordocumentation purposes.Release file structure:-----------------------The file fplsp.sa contains an "Entry-Point" section and acode section. The FPLSP has no "Call-Out" section. The first sectionis the "Entry-Point" section. In order to access a function in thepackage, a program must "bsr" or "jsr" to the location listedbelow in "68060FPLSP entry points" that corresponds to the desiredfunction. A branch instruction located at the selected entry pointwithin the package will then enter the correct emulation code routine.The entry point addresses at the beginning of the package will remainfixed so that a program calling the routines will not have to bere-compiled with every new 68060FPLSP release.There are 3 entry-points for each instruction type: single precision,double precision, and extended precision.As an example, the "fsin" library instruction can be passed anextended precision operand if program executes:# fsin.x fp0 fmovm.x &0x01,-(%sp) # pass operand on stack bsr.l _060FPLSP_TOP+0x1a8 # branch to fsin routine add.l &0xc,%sp # clear operand from stackUpon return, fp0 holds the correct result. The FPSR isset correctly. The FPCR is unchanged. The FPIAR is undefined.Another example. This time, a dyadic operation:# frem.s %fp1,%fp0 fmov.s %fp1,-(%sp) # pass src operand fmov.s %fp0,-(%sp) # pass dst operand bsr.l _060FPLSP_TOP+0x168 # branch to frem routine addq.l &0x8,%sp # clear operands from stackAgain, the result is returned in fp0. Note that BOTH operandsare passed in single precision format.Exception reporting:--------------------The package takes exceptions according to the FPCR value upon subroutineentry. If an exception should be reported, then the package forcesthis exception using implemented floating-point instructions.For example, if the instruction being emulated should cause afloating-point Operand Error exception, then the library routineexecutes an FMUL of a zero and an infinity to force the OPERRexception. Although the FPIAR will be undefined for the enabledOperand Error exception handler, the user will at least be ableto record that the event occurred.Miscellaneous:--------------The package does not attempt to correctly emulate instructionswith Signalling NAN inputs. Use of SNANs should be avoided withthis package.The fabs/fadd/fdiv/fint/fintrz/fmul/fneg/fsqrt/fsub entry pointsare provided for the convenience of older compilers that makesubroutine calls for all fp instructions. The code does NOT emulatethe instruction but rather simply executes it.68060FPLSP entry points:------------------------_060FPLSP_TOP:0x000: _060LSP__facoss_0x008: _060LSP__facosd_0x010: _060LSP__facosx_0x018: _060LSP__fasins_0x020: _060LSP__fasind_0x028: _060LSP__fasinx_0x030: _060LSP__fatans_0x038: _060LSP__fatand_0x040: _060LSP__fatanx_0x048: _060LSP__fatanhs_0x050: _060LSP__fatanhd_0x058: _060LSP__fatanhx_0x060: _060LSP__fcoss_0x068: _060LSP__fcosd_0x070: _060LSP__fcosx_0x078: _060LSP__fcoshs_0x080: _060LSP__fcoshd_0x088: _060LSP__fcoshx_0x090: _060LSP__fetoxs_0x098: _060LSP__fetoxd_0x0a0: _060LSP__fetoxx_0x0a8: _060LSP__fetoxm1s_0x0b0: _060LSP__fetoxm1d_0x0b8: _060LSP__fetoxm1x_0x0c0: _060LSP__fgetexps_0x0c8: _060LSP__fgetexpd_0x0d0: _060LSP__fgetexpx_0x0d8: _060LSP__fgetmans_0x0e0: _060LSP__fgetmand_0x0e8: _060LSP__fgetmanx_0x0f0: _060LSP__flog10s_0x0f8: _060LSP__flog10d_0x100: _060LSP__flog10x_0x108: _060LSP__flog2s_0x110: _060LSP__flog2d_0x118: _060LSP__flog2x_0x120: _060LSP__flogns_0x128: _060LSP__flognd_0x130: _060LSP__flognx_0x138: _060LSP__flognp1s_0x140: _060LSP__flognp1d_0x148: _060LSP__flognp1x_0x150: _060LSP__fmods_0x158: _060LSP__fmodd_0x160: _060LSP__fmodx_0x168: _060LSP__frems_0x170: _060LSP__fremd_0x178: _060LSP__fremx_0x180: _060LSP__fscales_0x188: _060LSP__fscaled_0x190: _060LSP__fscalex_0x198: _060LSP__fsins_0x1a0: _060LSP__fsind_0x1a8: _060LSP__fsinx_0x1b0: _060LSP__fsincoss_0x1b8: _060LSP__fsincosd_0x1c0: _060LSP__fsincosx_0x1c8: _060LSP__fsinhs_0x1d0: _060LSP__fsinhd_0x1d8: _060LSP__fsinhx_0x1e0: _060LSP__ftans_0x1e8: _060LSP__ftand_0x1f0: _060LSP__ftanx_0x1f8: _060LSP__ftanhs_0x200: _060LSP__ftanhd_0x208: _060LSP__ftanhx_0x210: _060LSP__ftentoxs_0x218: _060LSP__ftentoxd_0x220: _060LSP__ftentoxx_0x228: _060LSP__ftwotoxs_0x230: _060LSP__ftwotoxd_0x238: _060LSP__ftwotoxx_0x240: _060LSP__fabss_0x248: _060LSP__fabsd_0x250: _060LSP__fabsx_0x258: _060LSP__fadds_0x260: _060LSP__faddd_0x268: _060LSP__faddx_0x270: _060LSP__fdivs_0x278: _060LSP__fdivd_0x280: _060LSP__fdivx_0x288: _060LSP__fints_0x290: _060LSP__fintd_0x298: _060LSP__fintx_0x2a0: _060LSP__fintrzs_0x2a8: _060LSP__fintrzd_0x2b0: _060LSP__fintrzx_0x2b8: _060LSP__fmuls_0x2c0: _060LSP__fmuld_0x2c8: _060LSP__fmulx_0x2d0: _060LSP__fnegs_0x2d8: _060LSP__fnegd_0x2e0: _060LSP__fnegx_0x2e8: _060LSP__fsqrts_0x2f0: _060LSP__fsqrtd_0x2f8: _060LSP__fsqrtx_0x300: _060LSP__fsubs_0x308: _060LSP__fsubd_0x310: _060LSP__fsubx_
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?