2 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 # MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP
4 # M68000 Hi-Performance Microprocessor Division
5 # M68060 Software Package Production Release
7 # M68060 Software Package Copyright (C) 1993, 1994, 1995, 1996 Motorola Inc.
10 # THE SOFTWARE is provided on an "AS IS" basis and without warranty.
11 # To the maximum extent permitted by applicable law,
12 # MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED,
13 # INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS
14 # FOR A PARTICULAR PURPOSE and any warranty against infringement with
15 # regard to the SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF)
16 # and any accompanying written materials.
18 # To the maximum extent permitted by applicable law,
19 # IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER
20 # (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS,
21 # BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS)
22 # ARISING OF THE USE OR INABILITY TO USE THE SOFTWARE.
24 # Motorola assumes no responsibility for the maintenance and support
27 # You are hereby granted a copyright license to use, modify, and distribute the
28 # SOFTWARE so long as this entire notice is retained without alteration
29 # in any modified and/or redistributed versions, and that such modified
30 # versions are clearly identified as such.
31 # No licenses are granted by implication, estoppel or otherwise under any
32 # patents or trademarks of Motorola, Inc.
33 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39 # (1) example "Call-out"s
40 # (2) example package entry code
41 # (3) example "Call-out" table
45 #################################
46 # (1) EXAMPLE CALL-OUTS #
57 # _060_real_fpu_disabled() #
59 #################################
66 # This is the main exit point for the 68060 Floating-Point
67 # Software Package. For a normal exit, all 060FPSP routines call this
68 # routine. The operating system can do system dependent clean-up or
69 # simply execute an "rte" as with the sample code below.
80 # This is the exit point for the 060FPSP when an enabled overflow exception
81 # is present. The routine below should point to the operating system handler
82 # for enabled overflow conditions. The exception stack frame is an overflow
83 # stack frame. The FP state frame holds the EXCEPTIONAL OPERAND.
85 # The sample routine below simply clears the exception status bit and
96 # This is the exit point for the 060FPSP when an enabled underflow exception
97 # is present. The routine below should point to the operating system handler
98 # for enabled underflow conditions. The exception stack frame is an underflow
99 # stack frame. The FP state frame holds the EXCEPTIONAL OPERAND.
101 # The sample routine below simply clears the exception status bit and
112 # This is the exit point for the 060FPSP when an enabled operand error exception
113 # is present. The routine below should point to the operating system handler
114 # for enabled operand error exceptions. The exception stack frame is an operand error
115 # stack frame. The FP state frame holds the source operand of the faulting
118 # The sample routine below simply clears the exception status bit and
129 # This is the exit point for the 060FPSP when an enabled signalling NaN exception
130 # is present. The routine below should point to the operating system handler
131 # for enabled signalling NaN exceptions. The exception stack frame is a signalling NaN
132 # stack frame. The FP state frame holds the source operand of the faulting
135 # The sample routine below simply clears the exception status bit and
146 # This is the exit point for the 060FPSP when an enabled divide-by-zero exception
147 # is present. The routine below should point to the operating system handler
148 # for enabled divide-by-zero exceptions. The exception stack frame is a divide-by-zero
149 # stack frame. The FP state frame holds the source operand of the faulting
152 # The sample routine below simply clears the exception status bit and
164 # This is the exit point for the 060FPSP when an enabled inexact exception
165 # is present. The routine below should point to the operating system handler
166 # for enabled inexact exceptions. The exception stack frame is an inexact
167 # stack frame. The FP state frame holds the source operand of the faulting
170 # The sample routine below simply clears the exception status bit and
176 movew #0x6000,%sp@(0x2)
184 # This is the exit point for the 060FPSP when an enabled bsun exception
185 # is present. The routine below should point to the operating system handler
186 # for enabled bsun exceptions. The exception stack frame is a bsun
189 # The sample routine below clears the exception status bit, clears the NaN
190 # bit in the FPSR, and does an "rte". The instruction that caused the
191 # bsun will now be re-executed but with the NaN FPSR bit cleared.
209 # This is the exit point for the 060FPSP when an F-Line Illegal exception is
210 # encountered. Three different types of exceptions can enter the F-Line exception
211 # vector number 11: FP Unimplemented Instructions, FP implemented instructions when
212 # the FPU is disabled, and F-Line Illegal instructions. The 060FPSP module
213 # _fpsp_fline() distinguishes between the three and acts appropriately. F-Line
214 # Illegals branch here.
219 bra jmp_exception_old_fline
223 # _060_real_fpu_disabled():
225 # This is the exit point for the 060FPSP when an FPU disabled exception is
226 # encountered. Three different types of exceptions can enter the F-Line exception
227 # vector number 11: FP Unimplemented Instructions, FP implemented instructions when
228 # the FPU is disabled, and F-Line Illegal instructions. The 060FPSP module
229 # _fpsp_fline() distinguishes between the three and acts appropriately. FPU disabled
230 # exceptions branch here.
232 # The sample code below enables the FPU, sets the PC field in the exception stack
233 # frame to the PC of the instruction causing the exception, and does an "rte".
234 # The execution of the instruction then proceeds with an enabled floating-point
239 _060_real_fpu_disabled:
240 bra jmp_exception_old_fline
246 # This is the exit point for the 060FPSP when an emulated "ftrapcc" instruction
247 # discovers that the trap condition is true and it should branch to the operating
248 # system handler for the trap exception vector number 7.
250 # The sample code below simply executes an "rte".
258 #############################################################################
260 ##################################
261 # (2) EXAMPLE PACKAGE ENTRY CODE #
262 ##################################
267 bral FP_CALL_TOP+0x80+0x00
270 bral FP_CALL_TOP+0x80+0x08
273 bral FP_CALL_TOP+0x80+0x10
276 bral FP_CALL_TOP+0x80+0x18
279 bral FP_CALL_TOP+0x80+0x20
282 bral FP_CALL_TOP+0x80+0x28
285 bral FP_CALL_TOP+0x80+0x30
288 bral FP_CALL_TOP+0x80+0x38
291 bral FP_CALL_TOP+0x80+0x40
295 #############################################################################
297 ################################
298 # (3) EXAMPLE CALL-OUT SECTION #
299 ################################
301 # The size of this section MUST be 128 bytes!!!
305 .long _060_real_bsun - FP_CALL_TOP
306 .long _060_real_snan - FP_CALL_TOP
307 .long _060_real_operr - FP_CALL_TOP
308 .long _060_real_ovfl - FP_CALL_TOP
309 .long _060_real_unfl - FP_CALL_TOP
310 .long _060_real_dz - FP_CALL_TOP
311 .long _060_real_inex - FP_CALL_TOP
312 .long _060_real_fline - FP_CALL_TOP
313 .long _060_real_fpu_disabled - FP_CALL_TOP
314 .long _060_real_trap - FP_CALL_TOP
315 .long _060_real_trace - FP_CALL_TOP
316 .long _060_real_access - FP_CALL_TOP
317 .long _060_fpsp_done - FP_CALL_TOP
319 .long 0x00000000,0x00000000,0x00000000
321 .long _060_imem_read - FP_CALL_TOP
322 .long _060_dmem_read - FP_CALL_TOP
323 .long _060_dmem_write - FP_CALL_TOP
324 .long _060_imem_read_word - FP_CALL_TOP
325 .long _060_imem_read_long - FP_CALL_TOP
326 .long _060_dmem_read_byte - FP_CALL_TOP
327 .long _060_dmem_read_word - FP_CALL_TOP
328 .long _060_dmem_read_long - FP_CALL_TOP
329 .long _060_dmem_write_byte - FP_CALL_TOP
330 .long _060_dmem_write_word - FP_CALL_TOP
331 .long _060_dmem_write_long - FP_CALL_TOP
335 .long 0x00000000,0x00000000,0x00000000,0x00000000
338 #############################################################################
340 # 060 FPSP KERNEL PACKAGE NEEDS TO GO HERE!!!
343 #include "060sp/fpsp.S"