1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GR 2 MOTOROLA MICROPROCESSOR & MEMORY TECHNOLOGY GROUP 3 M68000 Hi-Performance Microprocessor Division 3 M68000 Hi-Performance Microprocessor Division 4 M68060 Software Package 4 M68060 Software Package 5 Production Release P1.00 -- October 10, 1994 5 Production Release P1.00 -- October 10, 1994 6 6 7 M68060 Software Package Copyright © 1993, 199 7 M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. 8 8 9 THE SOFTWARE is provided on an "AS IS" basis a 9 THE SOFTWARE is provided on an "AS IS" basis and without warranty. 10 To the maximum extent permitted by applicable 10 To the maximum extent permitted by applicable law, 11 MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPR 11 MOTOROLA DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, 12 INCLUDING IMPLIED WARRANTIES OF MERCHANTABILIT 12 INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE 13 and any warranty against infringement with reg 13 and any warranty against infringement with regard to the SOFTWARE 14 (INCLUDING ANY MODIFIED VERSIONS THEREOF) and 14 (INCLUDING ANY MODIFIED VERSIONS THEREOF) and any accompanying written materials. 15 15 16 To the maximum extent permitted by applicable 16 To the maximum extent permitted by applicable law, 17 IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY D 17 IN NO EVENT SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER 18 (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOS 18 (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, 19 BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORM 19 BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) 20 ARISING OF THE USE OR INABILITY TO USE THE SOF 20 ARISING OF THE USE OR INABILITY TO USE THE SOFTWARE. 21 Motorola assumes no responsibility for the mai 21 Motorola assumes no responsibility for the maintenance and support of the SOFTWARE. 22 22 23 You are hereby granted a copyright license to 23 You are hereby granted a copyright license to use, modify, and distribute the SOFTWARE 24 so long as this entire notice is retained with 24 so long as this entire notice is retained without alteration in any modified and/or 25 redistributed versions, and that such modified 25 redistributed versions, and that such modified versions are clearly identified as such. 26 No licenses are granted by implication, estopp 26 No licenses are granted by implication, estoppel or otherwise under any patents 27 or trademarks of Motorola, Inc. 27 or trademarks of Motorola, Inc. 28 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 28 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 29 68060 FLOATING-POINT SOFTWARE PACKAGE (Kernel 29 68060 FLOATING-POINT SOFTWARE PACKAGE (Kernel version) 30 ---------------------------------------------- 30 ------------------------------------------------------- 31 31 32 The file fpsp.sa contains the 68060 Floating-P 32 The file fpsp.sa contains the 68060 Floating-Point Software 33 Package. This package is essentially a set of 33 Package. This package is essentially a set of exception handlers 34 that can be integrated into an operating syste 34 that can be integrated into an operating system. 35 These exception handlers emulate Unimplemented 35 These exception handlers emulate Unimplemented FP instructions, 36 instructions using unimplemented data types, a 36 instructions using unimplemented data types, and instructions 37 using unimplemented addressing modes. In addit 37 using unimplemented addressing modes. In addition, this package 38 includes exception handlers to provide full IE 38 includes exception handlers to provide full IEEE-754 compliant 39 exception handling. 39 exception handling. 40 40 41 Release file format: 41 Release file format: 42 -------------------- 42 -------------------- 43 The file fpsp.sa is essentially a hexadecimal 43 The file fpsp.sa is essentially a hexadecimal image of the 44 release package. This is the ONLY format which 44 release package. This is the ONLY format which will be supported. 45 The hex image was created by assembling the so 45 The hex image was created by assembling the source code and 46 then converting the resulting binary output im 46 then converting the resulting binary output image into an 47 ASCII text file. The hexadecimal numbers are l 47 ASCII text file. The hexadecimal numbers are listed 48 using the Motorola Assembly Syntax assembler d 48 using the Motorola Assembly Syntax assembler directive "dc.l" 49 (define constant longword). The file can be co 49 (define constant longword). The file can be converted to other 50 assembly syntaxes by using any word processor 50 assembly syntaxes by using any word processor with a global 51 search and replace function. 51 search and replace function. 52 52 53 To assist in assembling and linking this modul 53 To assist in assembling and linking this module with other modules, 54 the installer should add a symbolic label to t 54 the installer should add a symbolic label to the top of the file. 55 This will allow calling routines to access the 55 This will allow calling routines to access the entry points 56 of this package. 56 of this package. 57 57 58 The source code fpsp.s has also been included 58 The source code fpsp.s has also been included but only for 59 documentation purposes. 59 documentation purposes. 60 60 61 Release file structure: 61 Release file structure: 62 ----------------------- 62 ----------------------- 63 63 64 (top of module) 64 (top of module) 65 ----------------- 65 ----------------- 66 | | - 128 byte-sized sec 66 | | - 128 byte-sized section 67 (1) | Call-Out | - 4 bytes per entry 67 (1) | Call-Out | - 4 bytes per entry (user fills these in) 68 | | - example routines i 68 | | - example routines in fskeleton.s 69 ----------------- 69 ----------------- 70 | | - 8 bytes per entry 70 | | - 8 bytes per entry 71 (2) | Entry Point | - user does "bra" or 71 (2) | Entry Point | - user does "bra" or "jmp" to this address 72 | | 72 | | 73 ----------------- 73 ----------------- 74 | | - code section 74 | | - code section 75 (3) ~ ~ 75 (3) ~ ~ 76 | | 76 | | 77 ----------------- 77 ----------------- 78 (bottom of module) 78 (bottom of module) 79 79 80 The first section of this module is the "Call- 80 The first section of this module is the "Call-out" section. This section 81 is NOT INCLUDED in fpsp.sa (an example "Call-o 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 82 the end of the file fskeleton.s). The purpose of this section is to allow 83 the FPSP routines to reference external functi 83 the FPSP routines to reference external functions that must be provided 84 by the host operating system. This section MUS 84 by the host operating system. This section MUST be exactly 128 bytes in 85 size. There are 32 fields, each 4 bytes in siz 85 size. There are 32 fields, each 4 bytes in size. Each field corresponds 86 to a function required by the FPSP (these func 86 to a function required by the FPSP (these functions and their location are 87 listed in "68060FPSP call-outs" below). Each f 87 listed in "68060FPSP call-outs" below). Each field entry should contain 88 the address of the corresponding function RELA 88 the address of the corresponding function RELATIVE to the starting address 89 of the "call-out" section. The "Call-out" sect 89 of the "call-out" section. The "Call-out" section must sit adjacent to the 90 fpsp.sa image in memory. 90 fpsp.sa image in memory. 91 91 92 The second section, the "Entry-point" section, 92 The second section, the "Entry-point" section, is used by external routines 93 to access the functions within the FPSP. Since 93 to access the functions within the FPSP. Since the fpsp.sa hex file contains 94 no symbol names, this section contains functio 94 no symbol names, this section contains function entry points that are fixed 95 with respect to the top of the package. The cu 95 with respect to the top of the package. The currently defined entry-points 96 are listed in section "68060 FPSP entry points 96 are listed in section "68060 FPSP entry points" below. A calling routine 97 would simply execute a "bra" or "jmp" that jum 97 would simply execute a "bra" or "jmp" that jumped to the selected function 98 entry-point. 98 entry-point. 99 99 100 For example, if the 68060 hardware took a "Lin 100 For example, if the 68060 hardware took a "Line-F Emulator" exception 101 (vector #11), the operating system should exec 101 (vector #11), the operating system should execute something similar to: 102 102 103 bra _060FPSP_TOP+128+48 103 bra _060FPSP_TOP+128+48 104 104 105 (_060FPSP_TOP is the starting address of the " 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 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" sec 107 48 bytes from the top of the "Entry-point" section.) 108 108 109 The third section is the code section. After e 109 The third section is the code section. After entering through an "Entry-point", 110 the entry code jumps to the appropriate emulat 110 the entry code jumps to the appropriate emulation code within the code section. 111 111 112 68060FPSP call-outs: (details in fskeleton.s) 112 68060FPSP call-outs: (details in fskeleton.s) 113 -------------------- 113 -------------------- 114 0x000: _060_real_bsun 114 0x000: _060_real_bsun 115 0x004: _060_real_snan 115 0x004: _060_real_snan 116 0x008: _060_real_operr 116 0x008: _060_real_operr 117 0x00c: _060_real_ovfl 117 0x00c: _060_real_ovfl 118 0x010: _060_real_unfl 118 0x010: _060_real_unfl 119 0x014: _060_real_dz 119 0x014: _060_real_dz 120 0x018: _060_real_inex 120 0x018: _060_real_inex 121 0x01c: _060_real_fline 121 0x01c: _060_real_fline 122 0x020: _060_real_fpu_disabled 122 0x020: _060_real_fpu_disabled 123 0x024: _060_real_trap 123 0x024: _060_real_trap 124 0x028: _060_real_trace 124 0x028: _060_real_trace 125 0x02c: _060_real_access 125 0x02c: _060_real_access 126 0x030: _060_fpsp_done 126 0x030: _060_fpsp_done 127 127 128 0x034: (Motorola reserved) 128 0x034: (Motorola reserved) 129 0x038: (Motorola reserved) 129 0x038: (Motorola reserved) 130 0x03c: (Motorola reserved) 130 0x03c: (Motorola reserved) 131 131 132 0x040: _060_imem_read 132 0x040: _060_imem_read 133 0x044: _060_dmem_read 133 0x044: _060_dmem_read 134 0x048: _060_dmem_write 134 0x048: _060_dmem_write 135 0x04c: _060_imem_read_word 135 0x04c: _060_imem_read_word 136 0x050: _060_imem_read_long 136 0x050: _060_imem_read_long 137 0x054: _060_dmem_read_byte 137 0x054: _060_dmem_read_byte 138 0x058: _060_dmem_read_word 138 0x058: _060_dmem_read_word 139 0x05c: _060_dmem_read_long 139 0x05c: _060_dmem_read_long 140 0x060: _060_dmem_write_byte 140 0x060: _060_dmem_write_byte 141 0x064: _060_dmem_write_word 141 0x064: _060_dmem_write_word 142 0x068: _060_dmem_write_long 142 0x068: _060_dmem_write_long 143 143 144 0x06c: (Motorola reserved) 144 0x06c: (Motorola reserved) 145 0x070: (Motorola reserved) 145 0x070: (Motorola reserved) 146 0x074: (Motorola reserved) 146 0x074: (Motorola reserved) 147 0x078: (Motorola reserved) 147 0x078: (Motorola reserved) 148 0x07c: (Motorola reserved) 148 0x07c: (Motorola reserved) 149 149 150 68060FPSP entry points: 150 68060FPSP entry points: 151 ----------------------- 151 ----------------------- 152 0x000: _060_fpsp_snan 152 0x000: _060_fpsp_snan 153 0x008: _060_fpsp_operr 153 0x008: _060_fpsp_operr 154 0x010: _060_fpsp_ovfl 154 0x010: _060_fpsp_ovfl 155 0x018: _060_fpsp_unfl 155 0x018: _060_fpsp_unfl 156 0x020: _060_fpsp_dz 156 0x020: _060_fpsp_dz 157 0x028: _060_fpsp_inex 157 0x028: _060_fpsp_inex 158 0x030: _060_fpsp_fline 158 0x030: _060_fpsp_fline 159 0x038: _060_fpsp_unsupp 159 0x038: _060_fpsp_unsupp 160 0x040: _060_fpsp_effadd 160 0x040: _060_fpsp_effadd 161 161 162 162 163 163 164 Miscellaneous: 164 Miscellaneous: 165 -------------- 165 -------------- 166 166 167 _060_fpsp_snan: 167 _060_fpsp_snan: 168 ---------------- 168 ---------------- 169 - documented in 3.5 of 060SP spec. 169 - documented in 3.5 of 060SP spec. 170 - Basic flow: 170 - Basic flow: 171 exception taken ---> enter _060_fpsp_s 171 exception taken ---> enter _060_fpsp_snan --| 172 172 | 173 always exits through _060_real_sna 173 always exits through _060_real_snan <---- 174 174 175 _060_fpsp_operr: 175 _060_fpsp_operr: 176 ---------------- 176 ---------------- 177 - documented in 3.5 of 060SP spec. 177 - documented in 3.5 of 060SP spec. 178 - Basic flow: 178 - Basic flow: 179 exception taken ---> enter _060_fpsp_o 179 exception taken ---> enter _060_fpsp_operr --| 180 180 | 181 always exits through _060_real_oper 181 always exits through _060_real_operr <----- 182 182 183 _060_fpsp_dz: 183 _060_fpsp_dz: 184 ---------------- 184 ---------------- 185 - documented in 3.7 of 060SP spec. 185 - documented in 3.7 of 060SP spec. 186 - Basic flow: 186 - Basic flow: 187 exception taken ---> enter _060_fpsp_d 187 exception taken ---> enter _060_fpsp_dz --| 188 188 | 189 always exits through _060_real_dz 189 always exits through _060_real_dz <---- 190 190 191 _060_fpsp_inex: 191 _060_fpsp_inex: 192 ---------------- 192 ---------------- 193 - documented in 3.6 of 060SP spec. 193 - documented in 3.6 of 060SP spec. 194 - Basic flow: 194 - Basic flow: 195 exception taken ---> enter _060_fpsp_i 195 exception taken ---> enter _060_fpsp_inex --| 196 196 | 197 always exits through _060_real_ine 197 always exits through _060_real_inex <---- 198 198 199 199 200 _060_fpsp_ovfl: 200 _060_fpsp_ovfl: 201 ---------------- 201 ---------------- 202 - documented in 3.4 of 060SP spec. 202 - documented in 3.4 of 060SP spec. 203 - Basic flow: 203 - Basic flow: 204 exception taken ---> enter _060_fpsp_o 204 exception taken ---> enter _060_fpsp_ovfl --| 205 205 | 206 may exit through _060_real_inex 206 may exit through _060_real_inex <---| 207 207 or | 208 may exit through _060_real_ovfl 208 may exit through _060_real_ovfl <---| 209 209 or | 210 may exit through _060_fpsp_done 210 may exit through _060_fpsp_done <---| 211 211 212 _060_fpsp_unfl: 212 _060_fpsp_unfl: 213 ---------------- 213 ---------------- 214 - documented in 3.4 of 060SP spec. 214 - documented in 3.4 of 060SP spec. 215 - Basic flow: 215 - Basic flow: 216 exception taken ---> enter _060_fpsp_u 216 exception taken ---> enter _060_fpsp_unfl --| 217 217 | 218 may exit through _060_real_inex 218 may exit through _060_real_inex <---| 219 219 or | 220 may exit through _060_real_unfl 220 may exit through _060_real_unfl <---| 221 221 or | 222 may exit through _060_fpsp_done 222 may exit through _060_fpsp_done <---| 223 223 224 224 225 _060_fpsp_fline: 225 _060_fpsp_fline: 226 ----------------- 226 ----------------- 227 - not fully documented in 060SP spec. 227 - not fully documented in 060SP spec. 228 - Basic flow: 228 - Basic flow: 229 exception taken ---> enter _060_fpsp_f 229 exception taken ---> enter _060_fpsp_fline --| 230 230 | 231 ---------------------------------- 231 ------------------------------------------- 232 | | 232 | | | 233 v v 233 v v v 234 (unimplemented (fpu disabled) (poss 234 (unimplemented (fpu disabled) (possible F-line illegal) 235 stack frame) | 235 stack frame) | v 236 | v sp 236 | v special case "fmovecr"? 237 | exit through 237 | exit through | 238 | _060_real_fpu_disabled 238 | _060_real_fpu_disabled ------------- 239 | 239 | | | 240 | ^ 240 | ^ v v 241 | | 241 | | (yes) (no) 242 | | 242 | | v v 243 | | fpu 243 | | fpu disabled? exit through 244 | | 244 | | | _060_real_fline 245 v | ---- 245 v | ------------- 246 | | | 246 | | | | 247 | | v 247 | | v v 248 | |-----------(yes) 248 | |-----------(yes) (no) 249 | 249 | | 250 |----<---------------------------- 250 |----<------------------------------------| 251 | 251 | 252 | 252 | 253 |----> may exit through _060_real_ 253 |----> may exit through _060_real_trace 254 | 254 | 255 |----> may exit through _060_real_ 255 |----> may exit through _060_real_trap 256 | 256 | 257 |----> may exit through _060_real_ 257 |----> may exit through _060_real_bsun 258 | 258 | 259 |----> may exit through _060_fpsp_ 259 |----> may exit through _060_fpsp_done 260 260 261 261 262 _060_fpsp_unsupp: 262 _060_fpsp_unsupp: 263 ------------------ 263 ------------------ 264 - documented in 3.1 of 060SP spec. 264 - documented in 3.1 of 060SP spec. 265 - Basic flow: 265 - Basic flow: 266 exception taken ---> enter _060_fpsp_u 266 exception taken ---> enter _060_fpsp_unsupp --| 267 267 | 268 268 | 269 may exit through _060_real_snan 269 may exit through _060_real_snan <----| 270 270 or | 271 may exit through _060_real_operr 271 may exit through _060_real_operr <----| 272 272 or | 273 may exit through _060_real_ovfl 273 may exit through _060_real_ovfl <----| 274 274 or | 275 may exit through _060_real_unfl 275 may exit through _060_real_unfl <----| 276 276 or | 277 may exit through _060_real_inex 277 may exit through _060_real_inex <----| 278 278 or | 279 may exit through _060_real_trace 279 may exit through _060_real_trace <----| 280 280 or | 281 may exit through _060_fpsp_done 281 may exit through _060_fpsp_done <----| 282 282 283 283 284 _060_fpsp_effadd: 284 _060_fpsp_effadd: 285 ------------------ 285 ------------------ 286 - documented in 3.3 of 060 spec. 286 - documented in 3.3 of 060 spec. 287 - Basic flow: 287 - Basic flow: 288 exception taken ---> enter _060_fpsp_e 288 exception taken ---> enter _060_fpsp_effadd --| 289 289 | 290 290 | 291 may exit through _060_real_trace 291 may exit through _060_real_trace <----| 292 292 or | 293 may exit through _060_real_fpu_disabled 293 may exit through _060_real_fpu_disabled <----| 294 294 or | 295 may exit through _060_fpsp_done 295 may exit through _060_fpsp_done <----|
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.