18c2ecf20Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28c2ecf20Sopenharmony_ciMOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
38c2ecf20Sopenharmony_ciM68000 Hi-Performance Microprocessor Division
48c2ecf20Sopenharmony_ciM68060 Software Package
58c2ecf20Sopenharmony_ciProduction Release P1.00 -- October 10, 1994
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ciM68060 Software Package Copyright © 1993, 1994 Motorola Inc.  All rights reserved.
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciTHE SOFTWARE is provided on an "AS IS" basis and without warranty.
108c2ecf20Sopenharmony_ciTo the maximum extent permitted by applicable law,
118c2ecf20Sopenharmony_ciMOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED,
128c2ecf20Sopenharmony_ciINCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
138c2ecf20Sopenharmony_ciand any warranty against infringement with regard to the SOFTWARE
148c2ecf20Sopenharmony_ci(INCLUDING ANY MODIFIED VERSIONS THEREOF) and any accompanying written materials.
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ciTo the maximum extent permitted by applicable law,
178c2ecf20Sopenharmony_ciIN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER
188c2ecf20Sopenharmony_ci(INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS,
198c2ecf20Sopenharmony_ciBUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS)
208c2ecf20Sopenharmony_ciARISING OF THE USE OR INABILITY TO USE THE SOFTWARE.
218c2ecf20Sopenharmony_ciMotorola assumes no responsibility for the maintenance and support of the SOFTWARE.
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ciYou are hereby granted a copyright license to use, modify, and distribute the SOFTWARE
248c2ecf20Sopenharmony_ciso long as this entire notice is retained without alteration in any modified and/or
258c2ecf20Sopenharmony_ciredistributed versions, and that such modified versions are clearly identified as such.
268c2ecf20Sopenharmony_ciNo licenses are granted by implication, estoppel or otherwise under any patents
278c2ecf20Sopenharmony_cior trademarks of Motorola, Inc.
288c2ecf20Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
298c2ecf20Sopenharmony_ci68060 FLOATING-POINT SOFTWARE PACKAGE (Kernel version)
308c2ecf20Sopenharmony_ci-------------------------------------------------------
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ciThe file fpsp.sa contains the 68060 Floating-Point Software
338c2ecf20Sopenharmony_ciPackage. This package is essentially a set of exception handlers
348c2ecf20Sopenharmony_cithat can be integrated into an operating system.
358c2ecf20Sopenharmony_ciThese exception handlers emulate Unimplemented FP instructions,
368c2ecf20Sopenharmony_ciinstructions using unimplemented data types, and instructions
378c2ecf20Sopenharmony_ciusing unimplemented addressing modes. In addition, this package
388c2ecf20Sopenharmony_ciincludes exception handlers to provide full IEEE-754 compliant
398c2ecf20Sopenharmony_ciexception handling.
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ciRelease file format:
428c2ecf20Sopenharmony_ci--------------------
438c2ecf20Sopenharmony_ciThe file fpsp.sa is essentially a hexadecimal image of the
448c2ecf20Sopenharmony_cirelease package. This is the ONLY format which will be supported.
458c2ecf20Sopenharmony_ciThe hex image was created by assembling the source code and
468c2ecf20Sopenharmony_cithen converting the resulting binary output image into an
478c2ecf20Sopenharmony_ciASCII text file. The hexadecimal numbers are listed
488c2ecf20Sopenharmony_ciusing the Motorola Assembly Syntax assembler directive "dc.l"
498c2ecf20Sopenharmony_ci(define constant longword). The file can be converted to other
508c2ecf20Sopenharmony_ciassembly syntaxes by using any word processor with a global
518c2ecf20Sopenharmony_cisearch and replace function.
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ciTo assist in assembling and linking this module with other modules,
548c2ecf20Sopenharmony_cithe installer should add a symbolic label to the top of the file.
558c2ecf20Sopenharmony_ciThis will allow calling routines to access the entry points
568c2ecf20Sopenharmony_ciof this package.
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ciThe source code fpsp.s has also been included but only for
598c2ecf20Sopenharmony_cidocumentation purposes.
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ciRelease file structure:
628c2ecf20Sopenharmony_ci-----------------------
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ci(top of module)
658c2ecf20Sopenharmony_ci	-----------------
668c2ecf20Sopenharmony_ci	|		| - 128 byte-sized section
678c2ecf20Sopenharmony_ci   (1)  |   Call-Out	| - 4 bytes per entry (user fills these in)
688c2ecf20Sopenharmony_ci	|		| - example routines in fskeleton.s
698c2ecf20Sopenharmony_ci	-----------------
708c2ecf20Sopenharmony_ci	|		| - 8 bytes per entry
718c2ecf20Sopenharmony_ci   (2)  | Entry Point	| - user does "bra" or "jmp" to this address
728c2ecf20Sopenharmony_ci	|		|
738c2ecf20Sopenharmony_ci	-----------------
748c2ecf20Sopenharmony_ci	|		| - code section
758c2ecf20Sopenharmony_ci   (3)  ~		~
768c2ecf20Sopenharmony_ci	|		|
778c2ecf20Sopenharmony_ci	-----------------
788c2ecf20Sopenharmony_ci(bottom of module)
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_ciThe first section of this module is the "Call-out" section. This section
818c2ecf20Sopenharmony_ciis NOT INCLUDED in fpsp.sa (an example "Call-out" section is provided at
828c2ecf20Sopenharmony_cithe end of the file fskeleton.s). The purpose of this section is to allow
838c2ecf20Sopenharmony_cithe FPSP routines to reference external functions that must be provided
848c2ecf20Sopenharmony_ciby the host operating system. This section MUST be exactly 128 bytes in
858c2ecf20Sopenharmony_cisize. There are 32 fields, each 4 bytes in size. Each field corresponds
868c2ecf20Sopenharmony_cito a function required by the FPSP (these functions and their location are
878c2ecf20Sopenharmony_cilisted in "68060FPSP call-outs" below). Each field entry should contain
888c2ecf20Sopenharmony_cithe address of the corresponding function RELATIVE to the starting address
898c2ecf20Sopenharmony_ciof the "call-out" section. The "Call-out" section must sit adjacent to the
908c2ecf20Sopenharmony_cifpsp.sa image in memory.
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_ciThe second section, the "Entry-point" section, is used by external routines
938c2ecf20Sopenharmony_cito access the functions within the FPSP. Since the fpsp.sa hex file contains
948c2ecf20Sopenharmony_cino symbol names, this section contains function entry points that are fixed
958c2ecf20Sopenharmony_ciwith respect to the top of the package. The currently defined entry-points
968c2ecf20Sopenharmony_ciare listed in section "68060 FPSP entry points" below. A calling routine
978c2ecf20Sopenharmony_ciwould simply execute a "bra" or "jmp" that jumped to the selected function
988c2ecf20Sopenharmony_cientry-point.
998c2ecf20Sopenharmony_ci
1008c2ecf20Sopenharmony_ciFor example, if the 68060 hardware took a "Line-F Emulator" exception
1018c2ecf20Sopenharmony_ci(vector #11), the operating system should execute something similar to:
1028c2ecf20Sopenharmony_ci
1038c2ecf20Sopenharmony_ci	bra	_060FPSP_TOP+128+48
1048c2ecf20Sopenharmony_ci
1058c2ecf20Sopenharmony_ci(_060FPSP_TOP is the starting address of the "Call-out" section; the "Call-out"
1068c2ecf20Sopenharmony_cisection is 128 bytes long; and the F-Line FPSP handler entry point is located
1078c2ecf20Sopenharmony_ci48 bytes from the top of the "Entry-point" section.)
1088c2ecf20Sopenharmony_ci
1098c2ecf20Sopenharmony_ciThe third section is the code section. After entering through an "Entry-point",
1108c2ecf20Sopenharmony_cithe entry code jumps to the appropriate emulation code within the code section.
1118c2ecf20Sopenharmony_ci
1128c2ecf20Sopenharmony_ci68060FPSP call-outs: (details in fskeleton.s)
1138c2ecf20Sopenharmony_ci--------------------
1148c2ecf20Sopenharmony_ci0x000:	_060_real_bsun
1158c2ecf20Sopenharmony_ci0x004:	_060_real_snan
1168c2ecf20Sopenharmony_ci0x008:	_060_real_operr
1178c2ecf20Sopenharmony_ci0x00c:	_060_real_ovfl
1188c2ecf20Sopenharmony_ci0x010:	_060_real_unfl
1198c2ecf20Sopenharmony_ci0x014:	_060_real_dz
1208c2ecf20Sopenharmony_ci0x018:	_060_real_inex
1218c2ecf20Sopenharmony_ci0x01c:	_060_real_fline
1228c2ecf20Sopenharmony_ci0x020:	_060_real_fpu_disabled
1238c2ecf20Sopenharmony_ci0x024:	_060_real_trap
1248c2ecf20Sopenharmony_ci0x028:	_060_real_trace
1258c2ecf20Sopenharmony_ci0x02c:	_060_real_access
1268c2ecf20Sopenharmony_ci0x030:	_060_fpsp_done
1278c2ecf20Sopenharmony_ci
1288c2ecf20Sopenharmony_ci0x034:	(Motorola reserved)
1298c2ecf20Sopenharmony_ci0x038:	(Motorola reserved)
1308c2ecf20Sopenharmony_ci0x03c:	(Motorola reserved)
1318c2ecf20Sopenharmony_ci
1328c2ecf20Sopenharmony_ci0x040:	_060_imem_read
1338c2ecf20Sopenharmony_ci0x044:	_060_dmem_read
1348c2ecf20Sopenharmony_ci0x048:	_060_dmem_write
1358c2ecf20Sopenharmony_ci0x04c:	_060_imem_read_word
1368c2ecf20Sopenharmony_ci0x050:	_060_imem_read_long
1378c2ecf20Sopenharmony_ci0x054:	_060_dmem_read_byte
1388c2ecf20Sopenharmony_ci0x058:	_060_dmem_read_word
1398c2ecf20Sopenharmony_ci0x05c:	_060_dmem_read_long
1408c2ecf20Sopenharmony_ci0x060:	_060_dmem_write_byte
1418c2ecf20Sopenharmony_ci0x064:	_060_dmem_write_word
1428c2ecf20Sopenharmony_ci0x068:	_060_dmem_write_long
1438c2ecf20Sopenharmony_ci
1448c2ecf20Sopenharmony_ci0x06c:	(Motorola reserved)
1458c2ecf20Sopenharmony_ci0x070:	(Motorola reserved)
1468c2ecf20Sopenharmony_ci0x074:	(Motorola reserved)
1478c2ecf20Sopenharmony_ci0x078:	(Motorola reserved)
1488c2ecf20Sopenharmony_ci0x07c:	(Motorola reserved)
1498c2ecf20Sopenharmony_ci
1508c2ecf20Sopenharmony_ci68060FPSP entry points:
1518c2ecf20Sopenharmony_ci-----------------------
1528c2ecf20Sopenharmony_ci0x000:	_060_fpsp_snan
1538c2ecf20Sopenharmony_ci0x008:	_060_fpsp_operr
1548c2ecf20Sopenharmony_ci0x010:	_060_fpsp_ovfl
1558c2ecf20Sopenharmony_ci0x018:	_060_fpsp_unfl
1568c2ecf20Sopenharmony_ci0x020:	_060_fpsp_dz
1578c2ecf20Sopenharmony_ci0x028:	_060_fpsp_inex
1588c2ecf20Sopenharmony_ci0x030:	_060_fpsp_fline
1598c2ecf20Sopenharmony_ci0x038:	_060_fpsp_unsupp
1608c2ecf20Sopenharmony_ci0x040:	_060_fpsp_effadd
1618c2ecf20Sopenharmony_ci
1628c2ecf20Sopenharmony_ci
1638c2ecf20Sopenharmony_ci
1648c2ecf20Sopenharmony_ciMiscellaneous:
1658c2ecf20Sopenharmony_ci--------------
1668c2ecf20Sopenharmony_ci
1678c2ecf20Sopenharmony_ci_060_fpsp_snan:
1688c2ecf20Sopenharmony_ci----------------
1698c2ecf20Sopenharmony_ci- documented in 3.5 of 060SP spec.
1708c2ecf20Sopenharmony_ci- Basic flow:
1718c2ecf20Sopenharmony_ci	exception taken ---> enter _060_fpsp_snan --|
1728c2ecf20Sopenharmony_ci						    |
1738c2ecf20Sopenharmony_ci            always exits through _060_real_snan <----
1748c2ecf20Sopenharmony_ci
1758c2ecf20Sopenharmony_ci_060_fpsp_operr:
1768c2ecf20Sopenharmony_ci----------------
1778c2ecf20Sopenharmony_ci- documented in 3.5 of 060SP spec.
1788c2ecf20Sopenharmony_ci- Basic flow:
1798c2ecf20Sopenharmony_ci	exception taken ---> enter _060_fpsp_operr --|
1808c2ecf20Sopenharmony_ci						     |
1818c2ecf20Sopenharmony_ci           always exits through _060_real_operr <-----
1828c2ecf20Sopenharmony_ci
1838c2ecf20Sopenharmony_ci_060_fpsp_dz:
1848c2ecf20Sopenharmony_ci----------------
1858c2ecf20Sopenharmony_ci- documented in 3.7 of 060SP spec.
1868c2ecf20Sopenharmony_ci- Basic flow:
1878c2ecf20Sopenharmony_ci	exception taken ---> enter _060_fpsp_dz   --|
1888c2ecf20Sopenharmony_ci						    |
1898c2ecf20Sopenharmony_ci            always exits through _060_real_dz   <----
1908c2ecf20Sopenharmony_ci
1918c2ecf20Sopenharmony_ci_060_fpsp_inex:
1928c2ecf20Sopenharmony_ci----------------
1938c2ecf20Sopenharmony_ci- documented in 3.6 of 060SP spec.
1948c2ecf20Sopenharmony_ci- Basic flow:
1958c2ecf20Sopenharmony_ci	exception taken ---> enter _060_fpsp_inex --|
1968c2ecf20Sopenharmony_ci						    |
1978c2ecf20Sopenharmony_ci            always exits through _060_real_inex <----
1988c2ecf20Sopenharmony_ci
1998c2ecf20Sopenharmony_ci
2008c2ecf20Sopenharmony_ci_060_fpsp_ovfl:
2018c2ecf20Sopenharmony_ci----------------
2028c2ecf20Sopenharmony_ci- documented in 3.4 of 060SP spec.
2038c2ecf20Sopenharmony_ci- Basic flow:
2048c2ecf20Sopenharmony_ci	exception taken ---> enter _060_fpsp_ovfl --|
2058c2ecf20Sopenharmony_ci						    |
2068c2ecf20Sopenharmony_ci            may exit through _060_real_inex     <---|
2078c2ecf20Sopenharmony_ci						 or |
2088c2ecf20Sopenharmony_ci            may exit through _060_real_ovfl     <---|
2098c2ecf20Sopenharmony_ci						 or |
2108c2ecf20Sopenharmony_ci            may exit through _060_fpsp_done     <---|
2118c2ecf20Sopenharmony_ci
2128c2ecf20Sopenharmony_ci_060_fpsp_unfl:
2138c2ecf20Sopenharmony_ci----------------
2148c2ecf20Sopenharmony_ci- documented in 3.4 of 060SP spec.
2158c2ecf20Sopenharmony_ci- Basic flow:
2168c2ecf20Sopenharmony_ci	exception taken ---> enter _060_fpsp_unfl --|
2178c2ecf20Sopenharmony_ci						    |
2188c2ecf20Sopenharmony_ci            may exit through _060_real_inex     <---|
2198c2ecf20Sopenharmony_ci						 or |
2208c2ecf20Sopenharmony_ci            may exit through _060_real_unfl     <---|
2218c2ecf20Sopenharmony_ci						 or |
2228c2ecf20Sopenharmony_ci            may exit through _060_fpsp_done     <---|
2238c2ecf20Sopenharmony_ci
2248c2ecf20Sopenharmony_ci
2258c2ecf20Sopenharmony_ci_060_fpsp_fline:
2268c2ecf20Sopenharmony_ci-----------------
2278c2ecf20Sopenharmony_ci- not fully documented in 060SP spec.
2288c2ecf20Sopenharmony_ci- Basic flow:
2298c2ecf20Sopenharmony_ci	exception taken ---> enter _060_fpsp_fline --|
2308c2ecf20Sopenharmony_ci						     |
2318c2ecf20Sopenharmony_ci            -------------------------------------------
2328c2ecf20Sopenharmony_ci            |               |                     |
2338c2ecf20Sopenharmony_ci            v               v                     v
2348c2ecf20Sopenharmony_ci   (unimplemented   (fpu disabled)       (possible F-line illegal)
2358c2ecf20Sopenharmony_ci     stack frame)           |                     v
2368c2ecf20Sopenharmony_ci            |               v               special case "fmovecr"?
2378c2ecf20Sopenharmony_ci            |         exit through                    |
2388c2ecf20Sopenharmony_ci            |     _060_real_fpu_disabled        -------------
2398c2ecf20Sopenharmony_ci            |                                   |           |
2408c2ecf20Sopenharmony_ci            |               ^                   v           v
2418c2ecf20Sopenharmony_ci            |               |                 (yes)        (no)
2428c2ecf20Sopenharmony_ci            |               |                   v           v
2438c2ecf20Sopenharmony_ci            |               |             fpu disabled?   exit through
2448c2ecf20Sopenharmony_ci            |               |                   |         _060_real_fline
2458c2ecf20Sopenharmony_ci            v               |             -------------
2468c2ecf20Sopenharmony_ci            |               |             |           |
2478c2ecf20Sopenharmony_ci            |               |             v           v
2488c2ecf20Sopenharmony_ci            |               |-----------(yes)        (no)
2498c2ecf20Sopenharmony_ci            |                                         |
2508c2ecf20Sopenharmony_ci            |----<------------------------------------|
2518c2ecf20Sopenharmony_ci            |
2528c2ecf20Sopenharmony_ci            |
2538c2ecf20Sopenharmony_ci            |----> may exit through _060_real_trace
2548c2ecf20Sopenharmony_ci            |
2558c2ecf20Sopenharmony_ci            |----> may exit through _060_real_trap
2568c2ecf20Sopenharmony_ci            |
2578c2ecf20Sopenharmony_ci            |----> may exit through _060_real_bsun
2588c2ecf20Sopenharmony_ci            |
2598c2ecf20Sopenharmony_ci            |----> may exit through _060_fpsp_done
2608c2ecf20Sopenharmony_ci
2618c2ecf20Sopenharmony_ci
2628c2ecf20Sopenharmony_ci_060_fpsp_unsupp:
2638c2ecf20Sopenharmony_ci------------------
2648c2ecf20Sopenharmony_ci- documented in 3.1 of 060SP spec.
2658c2ecf20Sopenharmony_ci- Basic flow:
2668c2ecf20Sopenharmony_ci	exception taken ---> enter _060_fpsp_unsupp --|
2678c2ecf20Sopenharmony_ci						      |
2688c2ecf20Sopenharmony_ci						      |
2698c2ecf20Sopenharmony_ci            may exit through _060_real_snan      <----|
2708c2ecf20Sopenharmony_ci						  or  |
2718c2ecf20Sopenharmony_ci            may exit through _060_real_operr     <----|
2728c2ecf20Sopenharmony_ci						  or  |
2738c2ecf20Sopenharmony_ci            may exit through _060_real_ovfl      <----|
2748c2ecf20Sopenharmony_ci						  or  |
2758c2ecf20Sopenharmony_ci            may exit through _060_real_unfl      <----|
2768c2ecf20Sopenharmony_ci						  or  |
2778c2ecf20Sopenharmony_ci            may exit through _060_real_inex      <----|
2788c2ecf20Sopenharmony_ci						  or  |
2798c2ecf20Sopenharmony_ci            may exit through _060_real_trace     <----|
2808c2ecf20Sopenharmony_ci						  or  |
2818c2ecf20Sopenharmony_ci            may exit through _060_fpsp_done      <----|
2828c2ecf20Sopenharmony_ci
2838c2ecf20Sopenharmony_ci
2848c2ecf20Sopenharmony_ci_060_fpsp_effadd:
2858c2ecf20Sopenharmony_ci------------------
2868c2ecf20Sopenharmony_ci- documented in 3.3 of 060 spec.
2878c2ecf20Sopenharmony_ci- Basic flow:
2888c2ecf20Sopenharmony_ci	exception taken ---> enter _060_fpsp_effadd --|
2898c2ecf20Sopenharmony_ci						      |
2908c2ecf20Sopenharmony_ci						      |
2918c2ecf20Sopenharmony_ci            may exit through _060_real_trace     <----|
2928c2ecf20Sopenharmony_ci						  or  |
2938c2ecf20Sopenharmony_ci     may exit through _060_real_fpu_disabled     <----|
2948c2ecf20Sopenharmony_ci						  or  |
2958c2ecf20Sopenharmony_ci            may exit through _060_fpsp_done      <----|
296