162306a36Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 262306a36Sopenharmony_ciMOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP 362306a36Sopenharmony_ciM68000 Hi-Performance Microprocessor Division 462306a36Sopenharmony_ciM68060 Software Package 562306a36Sopenharmony_ciProduction Release P1.00 -- October 10, 1994 662306a36Sopenharmony_ci 762306a36Sopenharmony_ciM68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. 862306a36Sopenharmony_ci 962306a36Sopenharmony_ciTHE SOFTWARE is provided on an "AS IS" basis and without warranty. 1062306a36Sopenharmony_ciTo the maximum extent permitted by applicable law, 1162306a36Sopenharmony_ciMOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, 1262306a36Sopenharmony_ciINCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE 1362306a36Sopenharmony_ciand any warranty against infringement with regard to the SOFTWARE 1462306a36Sopenharmony_ci(INCLUDING ANY MODIFIED VERSIONS THEREOF) and any accompanying written materials. 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ciTo the maximum extent permitted by applicable law, 1762306a36Sopenharmony_ciIN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER 1862306a36Sopenharmony_ci(INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, 1962306a36Sopenharmony_ciBUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) 2062306a36Sopenharmony_ciARISING OF THE USE OR INABILITY TO USE THE SOFTWARE. 2162306a36Sopenharmony_ciMotorola assumes no responsibility for the maintenance and support of the SOFTWARE. 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_ciYou are hereby granted a copyright license to use, modify, and distribute the SOFTWARE 2462306a36Sopenharmony_ciso long as this entire notice is retained without alteration in any modified and/or 2562306a36Sopenharmony_ciredistributed versions, and that such modified versions are clearly identified as such. 2662306a36Sopenharmony_ciNo licenses are granted by implication, estoppel or otherwise under any patents 2762306a36Sopenharmony_cior trademarks of Motorola, Inc. 2862306a36Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ci68060 FLOATING-POINT SOFTWARE PACKAGE (Library version) 3162306a36Sopenharmony_ci-------------------------------------------------------- 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ciThe file fplsp.sa contains the "Library version" of the 3462306a36Sopenharmony_ci68060SP Floating-Point Software Package. The routines 3562306a36Sopenharmony_ciincluded in this module can be used to emulate the 3662306a36Sopenharmony_ciFP instructions not implemented in 68060 hardware. These 3762306a36Sopenharmony_ciinstructions normally take exception vector #11 3862306a36Sopenharmony_ci"FP Unimplemented Instruction". 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ciBy re-compiling a program that uses these instructions, and 4162306a36Sopenharmony_cimaking subroutine calls in place of the unimplemented 4262306a36Sopenharmony_ciinstructions, a program can avoid the overhead associated 4362306a36Sopenharmony_ciwith taking the exception. 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ciRelease file format: 4662306a36Sopenharmony_ci-------------------- 4762306a36Sopenharmony_ciThe file fplsp.sa is essentially a hexadecimal image of the 4862306a36Sopenharmony_cirelease package. This is the ONLY format which will be supported. 4962306a36Sopenharmony_ciThe hex image was created by assembling the source code and 5062306a36Sopenharmony_cithen converting the resulting binary output image into an 5162306a36Sopenharmony_ciASCII text file. The hexadecimal numbers are listed 5262306a36Sopenharmony_ciusing the Motorola Assembly Syntax assembler directive "dc.l" 5362306a36Sopenharmony_ci(define constant longword). The file can be converted to other 5462306a36Sopenharmony_ciassembly syntaxes by using any word processor with a global 5562306a36Sopenharmony_cisearch and replace function. 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ciTo assist in assembling and linking this module with other modules, 5862306a36Sopenharmony_cithe installer should add a symbolic label to the top of the file. 5962306a36Sopenharmony_ciThis will allow calling routines to access the entry points 6062306a36Sopenharmony_ciof this package. 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ciThe source code fplsp.s has also been included but only for 6362306a36Sopenharmony_cidocumentation purposes. 6462306a36Sopenharmony_ci 6562306a36Sopenharmony_ciRelease file structure: 6662306a36Sopenharmony_ci----------------------- 6762306a36Sopenharmony_ciThe file fplsp.sa contains an "Entry-Point" section and a 6862306a36Sopenharmony_cicode section. The FPLSP has no "Call-Out" section. The first section 6962306a36Sopenharmony_ciis the "Entry-Point" section. In order to access a function in the 7062306a36Sopenharmony_cipackage, a program must "bsr" or "jsr" to the location listed 7162306a36Sopenharmony_cibelow in "68060FPLSP entry points" that corresponds to the desired 7262306a36Sopenharmony_cifunction. A branch instruction located at the selected entry point 7362306a36Sopenharmony_ciwithin the package will then enter the correct emulation code routine. 7462306a36Sopenharmony_ci 7562306a36Sopenharmony_ciThe entry point addresses at the beginning of the package will remain 7662306a36Sopenharmony_cifixed so that a program calling the routines will not have to be 7762306a36Sopenharmony_cire-compiled with every new 68060FPLSP release. 7862306a36Sopenharmony_ci 7962306a36Sopenharmony_ciThere are 3 entry-points for each instruction type: single precision, 8062306a36Sopenharmony_cidouble precision, and extended precision. 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_ciAs an example, the "fsin" library instruction can be passed an 8362306a36Sopenharmony_ciextended precision operand if program executes: 8462306a36Sopenharmony_ci 8562306a36Sopenharmony_ci# fsin.x fp0 8662306a36Sopenharmony_ci 8762306a36Sopenharmony_ci fmovm.x &0x01,-(%sp) # pass operand on stack 8862306a36Sopenharmony_ci bsr.l _060FPLSP_TOP+0x1a8 # branch to fsin routine 8962306a36Sopenharmony_ci add.l &0xc,%sp # clear operand from stack 9062306a36Sopenharmony_ci 9162306a36Sopenharmony_ciUpon return, fp0 holds the correct result. The FPSR is 9262306a36Sopenharmony_ciset correctly. The FPCR is unchanged. The FPIAR is undefined. 9362306a36Sopenharmony_ci 9462306a36Sopenharmony_ciAnother example. This time, a dyadic operation: 9562306a36Sopenharmony_ci 9662306a36Sopenharmony_ci# frem.s %fp1,%fp0 9762306a36Sopenharmony_ci 9862306a36Sopenharmony_ci fmov.s %fp1,-(%sp) # pass src operand 9962306a36Sopenharmony_ci fmov.s %fp0,-(%sp) # pass dst operand 10062306a36Sopenharmony_ci bsr.l _060FPLSP_TOP+0x168 # branch to frem routine 10162306a36Sopenharmony_ci addq.l &0x8,%sp # clear operands from stack 10262306a36Sopenharmony_ci 10362306a36Sopenharmony_ciAgain, the result is returned in fp0. Note that BOTH operands 10462306a36Sopenharmony_ciare passed in single precision format. 10562306a36Sopenharmony_ci 10662306a36Sopenharmony_ciException reporting: 10762306a36Sopenharmony_ci-------------------- 10862306a36Sopenharmony_ciThe package takes exceptions according to the FPCR value upon subroutine 10962306a36Sopenharmony_cientry. If an exception should be reported, then the package forces 11062306a36Sopenharmony_cithis exception using implemented floating-point instructions. 11162306a36Sopenharmony_ciFor example, if the instruction being emulated should cause a 11262306a36Sopenharmony_cifloating-point Operand Error exception, then the library routine 11362306a36Sopenharmony_ciexecutes an FMUL of a zero and an infinity to force the OPERR 11462306a36Sopenharmony_ciexception. Although the FPIAR will be undefined for the enabled 11562306a36Sopenharmony_ciOperand Error exception handler, the user will at least be able 11662306a36Sopenharmony_cito record that the event occurred. 11762306a36Sopenharmony_ci 11862306a36Sopenharmony_ciMiscellaneous: 11962306a36Sopenharmony_ci-------------- 12062306a36Sopenharmony_ciThe package does not attempt to correctly emulate instructions 12162306a36Sopenharmony_ciwith Signalling NAN inputs. Use of SNANs should be avoided with 12262306a36Sopenharmony_cithis package. 12362306a36Sopenharmony_ci 12462306a36Sopenharmony_ciThe fabs/fadd/fdiv/fint/fintrz/fmul/fneg/fsqrt/fsub entry points 12562306a36Sopenharmony_ciare provided for the convenience of older compilers that make 12662306a36Sopenharmony_cisubroutine calls for all fp instructions. The code does NOT emulate 12762306a36Sopenharmony_cithe instruction but rather simply executes it. 12862306a36Sopenharmony_ci 12962306a36Sopenharmony_ci68060FPLSP entry points: 13062306a36Sopenharmony_ci------------------------ 13162306a36Sopenharmony_ci_060FPLSP_TOP: 13262306a36Sopenharmony_ci0x000: _060LSP__facoss_ 13362306a36Sopenharmony_ci0x008: _060LSP__facosd_ 13462306a36Sopenharmony_ci0x010: _060LSP__facosx_ 13562306a36Sopenharmony_ci0x018: _060LSP__fasins_ 13662306a36Sopenharmony_ci0x020: _060LSP__fasind_ 13762306a36Sopenharmony_ci0x028: _060LSP__fasinx_ 13862306a36Sopenharmony_ci0x030: _060LSP__fatans_ 13962306a36Sopenharmony_ci0x038: _060LSP__fatand_ 14062306a36Sopenharmony_ci0x040: _060LSP__fatanx_ 14162306a36Sopenharmony_ci0x048: _060LSP__fatanhs_ 14262306a36Sopenharmony_ci0x050: _060LSP__fatanhd_ 14362306a36Sopenharmony_ci0x058: _060LSP__fatanhx_ 14462306a36Sopenharmony_ci0x060: _060LSP__fcoss_ 14562306a36Sopenharmony_ci0x068: _060LSP__fcosd_ 14662306a36Sopenharmony_ci0x070: _060LSP__fcosx_ 14762306a36Sopenharmony_ci0x078: _060LSP__fcoshs_ 14862306a36Sopenharmony_ci0x080: _060LSP__fcoshd_ 14962306a36Sopenharmony_ci0x088: _060LSP__fcoshx_ 15062306a36Sopenharmony_ci0x090: _060LSP__fetoxs_ 15162306a36Sopenharmony_ci0x098: _060LSP__fetoxd_ 15262306a36Sopenharmony_ci0x0a0: _060LSP__fetoxx_ 15362306a36Sopenharmony_ci0x0a8: _060LSP__fetoxm1s_ 15462306a36Sopenharmony_ci0x0b0: _060LSP__fetoxm1d_ 15562306a36Sopenharmony_ci0x0b8: _060LSP__fetoxm1x_ 15662306a36Sopenharmony_ci0x0c0: _060LSP__fgetexps_ 15762306a36Sopenharmony_ci0x0c8: _060LSP__fgetexpd_ 15862306a36Sopenharmony_ci0x0d0: _060LSP__fgetexpx_ 15962306a36Sopenharmony_ci0x0d8: _060LSP__fgetmans_ 16062306a36Sopenharmony_ci0x0e0: _060LSP__fgetmand_ 16162306a36Sopenharmony_ci0x0e8: _060LSP__fgetmanx_ 16262306a36Sopenharmony_ci0x0f0: _060LSP__flog10s_ 16362306a36Sopenharmony_ci0x0f8: _060LSP__flog10d_ 16462306a36Sopenharmony_ci0x100: _060LSP__flog10x_ 16562306a36Sopenharmony_ci0x108: _060LSP__flog2s_ 16662306a36Sopenharmony_ci0x110: _060LSP__flog2d_ 16762306a36Sopenharmony_ci0x118: _060LSP__flog2x_ 16862306a36Sopenharmony_ci0x120: _060LSP__flogns_ 16962306a36Sopenharmony_ci0x128: _060LSP__flognd_ 17062306a36Sopenharmony_ci0x130: _060LSP__flognx_ 17162306a36Sopenharmony_ci0x138: _060LSP__flognp1s_ 17262306a36Sopenharmony_ci0x140: _060LSP__flognp1d_ 17362306a36Sopenharmony_ci0x148: _060LSP__flognp1x_ 17462306a36Sopenharmony_ci0x150: _060LSP__fmods_ 17562306a36Sopenharmony_ci0x158: _060LSP__fmodd_ 17662306a36Sopenharmony_ci0x160: _060LSP__fmodx_ 17762306a36Sopenharmony_ci0x168: _060LSP__frems_ 17862306a36Sopenharmony_ci0x170: _060LSP__fremd_ 17962306a36Sopenharmony_ci0x178: _060LSP__fremx_ 18062306a36Sopenharmony_ci0x180: _060LSP__fscales_ 18162306a36Sopenharmony_ci0x188: _060LSP__fscaled_ 18262306a36Sopenharmony_ci0x190: _060LSP__fscalex_ 18362306a36Sopenharmony_ci0x198: _060LSP__fsins_ 18462306a36Sopenharmony_ci0x1a0: _060LSP__fsind_ 18562306a36Sopenharmony_ci0x1a8: _060LSP__fsinx_ 18662306a36Sopenharmony_ci0x1b0: _060LSP__fsincoss_ 18762306a36Sopenharmony_ci0x1b8: _060LSP__fsincosd_ 18862306a36Sopenharmony_ci0x1c0: _060LSP__fsincosx_ 18962306a36Sopenharmony_ci0x1c8: _060LSP__fsinhs_ 19062306a36Sopenharmony_ci0x1d0: _060LSP__fsinhd_ 19162306a36Sopenharmony_ci0x1d8: _060LSP__fsinhx_ 19262306a36Sopenharmony_ci0x1e0: _060LSP__ftans_ 19362306a36Sopenharmony_ci0x1e8: _060LSP__ftand_ 19462306a36Sopenharmony_ci0x1f0: _060LSP__ftanx_ 19562306a36Sopenharmony_ci0x1f8: _060LSP__ftanhs_ 19662306a36Sopenharmony_ci0x200: _060LSP__ftanhd_ 19762306a36Sopenharmony_ci0x208: _060LSP__ftanhx_ 19862306a36Sopenharmony_ci0x210: _060LSP__ftentoxs_ 19962306a36Sopenharmony_ci0x218: _060LSP__ftentoxd_ 20062306a36Sopenharmony_ci0x220: _060LSP__ftentoxx_ 20162306a36Sopenharmony_ci0x228: _060LSP__ftwotoxs_ 20262306a36Sopenharmony_ci0x230: _060LSP__ftwotoxd_ 20362306a36Sopenharmony_ci0x238: _060LSP__ftwotoxx_ 20462306a36Sopenharmony_ci 20562306a36Sopenharmony_ci0x240: _060LSP__fabss_ 20662306a36Sopenharmony_ci0x248: _060LSP__fabsd_ 20762306a36Sopenharmony_ci0x250: _060LSP__fabsx_ 20862306a36Sopenharmony_ci0x258: _060LSP__fadds_ 20962306a36Sopenharmony_ci0x260: _060LSP__faddd_ 21062306a36Sopenharmony_ci0x268: _060LSP__faddx_ 21162306a36Sopenharmony_ci0x270: _060LSP__fdivs_ 21262306a36Sopenharmony_ci0x278: _060LSP__fdivd_ 21362306a36Sopenharmony_ci0x280: _060LSP__fdivx_ 21462306a36Sopenharmony_ci0x288: _060LSP__fints_ 21562306a36Sopenharmony_ci0x290: _060LSP__fintd_ 21662306a36Sopenharmony_ci0x298: _060LSP__fintx_ 21762306a36Sopenharmony_ci0x2a0: _060LSP__fintrzs_ 21862306a36Sopenharmony_ci0x2a8: _060LSP__fintrzd_ 21962306a36Sopenharmony_ci0x2b0: _060LSP__fintrzx_ 22062306a36Sopenharmony_ci0x2b8: _060LSP__fmuls_ 22162306a36Sopenharmony_ci0x2c0: _060LSP__fmuld_ 22262306a36Sopenharmony_ci0x2c8: _060LSP__fmulx_ 22362306a36Sopenharmony_ci0x2d0: _060LSP__fnegs_ 22462306a36Sopenharmony_ci0x2d8: _060LSP__fnegd_ 22562306a36Sopenharmony_ci0x2e0: _060LSP__fnegx_ 22662306a36Sopenharmony_ci0x2e8: _060LSP__fsqrts_ 22762306a36Sopenharmony_ci0x2f0: _060LSP__fsqrtd_ 22862306a36Sopenharmony_ci0x2f8: _060LSP__fsqrtx_ 22962306a36Sopenharmony_ci0x300: _060LSP__fsubs_ 23062306a36Sopenharmony_ci0x308: _060LSP__fsubd_ 23162306a36Sopenharmony_ci0x310: _060LSP__fsubx_ 232