1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
3 M68000 Hi-Performance Microprocessor Division
4 M68060 Software Package
5 Production Release P1.00 -- October 10, 1994
7 M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved.
9 THE SOFTWARE is provided on an "AS IS" basis and without warranty.
10 To the maximum extent permitted by applicable law,
11 MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED,
12 INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
13 and any warranty against infringement with regard to the SOFTWARE
14 (INCLUDING ANY MODIFIED VERSIONS THEREOF) and any accompanying written materials.
16 To the maximum extent permitted by applicable law,
17 IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER
18 (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS,
19 BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS)
20 ARISING OF THE USE OR INABILITY TO USE THE SOFTWARE.
21 Motorola assumes no responsibility for the maintenance and support of the SOFTWARE.
23 You are hereby granted a copyright license to use, modify, and distribute the SOFTWARE
24 so long as this entire notice is retained without alteration in any modified and/or
25 redistributed versions, and that such modified versions are clearly identified as such.
26 No licenses are granted by implication, estoppel or otherwise under any patents
27 or trademarks of Motorola, Inc.
28 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29 68060 FLOATING-POINT SOFTWARE PACKAGE (Kernel version)
30 -------------------------------------------------------
32 The file fpsp.sa contains the 68060 Floating-Point Software
33 Package. This package is essentially a set of exception handlers
34 that can be integrated into an operating system.
35 These exception handlers emulate Unimplemented FP instructions,
36 instructions using unimplemented data types, and instructions
37 using unimplemented addressing modes. In addition, this package
38 includes exception handlers to provide full IEEE-754 compliant
43 The file fpsp.sa is essentially a hexadecimal image of the
44 release package. This is the ONLY format which will be supported.
45 The hex image was created by assembling the source code and
46 then converting the resulting binary output image into an
47 ASCII text file. The hexadecimal numbers are listed
48 using the Motorola Assembly Syntax assembler directive "dc.l"
49 (define constant longword). The file can be converted to other
50 assembly syntaxes by using any word processor with a global
51 search and replace function.
53 To assist in assembling and linking this module with other modules,
54 the installer should add a symbolic label to the top of the file.
55 This will allow calling routines to access the entry points
58 The source code fpsp.s has also been included but only for
59 documentation purposes.
61 Release file structure:
62 -----------------------
66 | | - 128 byte-sized section
67 (1) | Call-Out | - 4 bytes per entry (user fills these in)
68 | | - example routines in fskeleton.s
70 | | - 8 bytes per entry
71 (2) | Entry Point | - user does "bra" or "jmp" to this address
80 The first section of this module is the "Call-out" section. This section
81 is NOT INCLUDED in fpsp.sa (an example "Call-out" section is provided at
82 the end of the file fskeleton.s). The purpose of this section is to allow
83 the FPSP routines to reference external functions that must be provided
84 by the host operating system. This section MUST be exactly 128 bytes in
85 size. There are 32 fields, each 4 bytes in size. Each field corresponds
86 to a function required by the FPSP (these functions and their location are
87 listed in "68060FPSP call-outs" below). Each field entry should contain
88 the address of the corresponding function RELATIVE to the starting address
89 of the "call-out" section. The "Call-out" section must sit adjacent to the
90 fpsp.sa image in memory.
92 The second section, the "Entry-point" section, is used by external routines
93 to access the functions within the FPSP. Since the fpsp.sa hex file contains
94 no symbol names, this section contains function entry points that are fixed
95 with respect to the top of the package. The currently defined entry-points
96 are listed in section "68060 FPSP entry points" below. A calling routine
97 would simply execute a "bra" or "jmp" that jumped to the selected function
100 For example, if the 68060 hardware took a "Line-F Emulator" exception
101 (vector #11), the operating system should execute something similar to:
103 bra _060FPSP_TOP+128+48
105 (_060FPSP_TOP is the starting address of the "Call-out" section; the "Call-out"
106 section is 128 bytes long; and the F-Line FPSP handler entry point is located
107 48 bytes from the top of the "Entry-point" section.)
109 The third section is the code section. After entering through an "Entry-point",
110 the entry code jumps to the appropriate emulation code within the code section.
112 68060FPSP call-outs: (details in fskeleton.s)
114 0x000: _060_real_bsun
115 0x004: _060_real_snan
116 0x008: _060_real_operr
117 0x00c: _060_real_ovfl
118 0x010: _060_real_unfl
120 0x018: _060_real_inex
121 0x01c: _060_real_fline
122 0x020: _060_real_fpu_disabled
123 0x024: _060_real_trap
124 0x028: _060_real_trace
125 0x02c: _060_real_access
126 0x030: _060_fpsp_done
128 0x034: (Motorola reserved)
129 0x038: (Motorola reserved)
130 0x03c: (Motorola reserved)
132 0x040: _060_imem_read
133 0x044: _060_dmem_read
134 0x048: _060_dmem_write
135 0x04c: _060_imem_read_word
136 0x050: _060_imem_read_long
137 0x054: _060_dmem_read_byte
138 0x058: _060_dmem_read_word
139 0x05c: _060_dmem_read_long
140 0x060: _060_dmem_write_byte
141 0x064: _060_dmem_write_word
142 0x068: _060_dmem_write_long
144 0x06c: (Motorola reserved)
145 0x070: (Motorola reserved)
146 0x074: (Motorola reserved)
147 0x078: (Motorola reserved)
148 0x07c: (Motorola reserved)
150 68060FPSP entry points:
151 -----------------------
152 0x000: _060_fpsp_snan
153 0x008: _060_fpsp_operr
154 0x010: _060_fpsp_ovfl
155 0x018: _060_fpsp_unfl
157 0x028: _060_fpsp_inex
158 0x030: _060_fpsp_fline
159 0x038: _060_fpsp_unsupp
160 0x040: _060_fpsp_effadd
169 - documented in 3.5 of 060SP spec.
171 exception taken ---> enter _060_fpsp_snan --|
173 always exits through _060_real_snan <----
177 - documented in 3.5 of 060SP spec.
179 exception taken ---> enter _060_fpsp_operr --|
181 always exits through _060_real_operr <-----
185 - documented in 3.7 of 060SP spec.
187 exception taken ---> enter _060_fpsp_dz --|
189 always exits through _060_real_dz <----
193 - documented in 3.6 of 060SP spec.
195 exception taken ---> enter _060_fpsp_inex --|
197 always exits through _060_real_inex <----
202 - documented in 3.4 of 060SP spec.
204 exception taken ---> enter _060_fpsp_ovfl --|
206 may exit through _060_real_inex <---|
208 may exit through _060_real_ovfl <---|
210 may exit through _060_fpsp_done <---|
214 - documented in 3.4 of 060SP spec.
216 exception taken ---> enter _060_fpsp_unfl --|
218 may exit through _060_real_inex <---|
220 may exit through _060_real_unfl <---|
222 may exit through _060_fpsp_done <---|
227 - not fully documented in 060SP spec.
229 exception taken ---> enter _060_fpsp_fline --|
231 -------------------------------------------
234 (unimplemented (fpu disabled) (possible F-line illegal)
236 | v special case "fmovecr"?
238 | _060_real_fpu_disabled -------------
243 | | fpu disabled? exit through
244 | | | _060_real_fline
248 | |-----------(yes) (no)
250 |----<------------------------------------|
253 |----> may exit through _060_real_trace
255 |----> may exit through _060_real_trap
257 |----> may exit through _060_real_bsun
259 |----> may exit through _060_fpsp_done
264 - documented in 3.1 of 060SP spec.
266 exception taken ---> enter _060_fpsp_unsupp --|
269 may exit through _060_real_snan <----|
271 may exit through _060_real_operr <----|
273 may exit through _060_real_ovfl <----|
275 may exit through _060_real_unfl <----|
277 may exit through _060_real_inex <----|
279 may exit through _060_real_trace <----|
281 may exit through _060_fpsp_done <----|
286 - documented in 3.3 of 060 spec.
288 exception taken ---> enter _060_fpsp_effadd --|
291 may exit through _060_real_trace <----|
293 may exit through _060_real_fpu_disabled <----|
295 may exit through _060_fpsp_done <----|