📄 fpsp060alib.s
字号:
* bsun will now be re-executed but with the NaN FPSR bit cleared.**/__060_real_bsun: fsave -(sp) fmovel fpsr,-(sp) andi.b #0xfe,(sp) fmovel (sp)+,fpsr add.l #0xc,sp rte/********************************************************************************* _060_real_fline - exit point from an F-Line Illegal exception** This is the exit point for the 060FPSP when an F-Line Illegal exception is * encountered. Three different types of exceptions can enter the F-Line* exception vector number 11: FP Unimplemented Instructions, FP implemented* instructions when the FPU is disabled, and F-Line Illegal instructions. The* 060FPSP module _fpsp_fline() distinguishes between the three and acts* appropriately. F-Line Illegals branch here.* * The simple routine below calls the default exception handler which was* connected to the exception vector number 11. Before to connect the Floating* point exception handler, the default exception handler was saved into the* __060_real_fline_hdl variable. This is performed by the fpsp060COTblInit()* function in the fpsp060ArchLib.c file.* */__060_real_fline: subql #0x04,sp /* save space for vector handler addr */ movel a0,sp@- /* save a0 */ movel __060_real_fline_hdl,a0 /* put handler nb 11 addr into a0 */ movel a0,sp@(4) /* put into the stack the handler add */ movel sp@+,a0 /* restore a0 */ rts /* jmp into the handler *//********************************************************************************* _060_real_fpu_disabled - exit point from an FPU disabled exception.** This is the exit point for the 060FPSP when an FPU disabled exception is * encountered. Three different types of exceptions can enter the F-Line* exception vector number 11: FP Unimplemented Instructions, FP implemented* instructions when the FPU is disabled, and F-Line Illegal instructions. The* 060FPSP module _fpsp_fline() distinguishes between the three and acts* appropriately. FPU disabled exceptions branch here.** The sample code below enables the FPU, sets the PC field in the exception* stack frame to the PC of the instruction causing the exception, and does an* "rte".* The execution of the instruction then proceeds with an enabled floating-point* unit.**/__060_real_fpu_disabled: movel d0,-(sp) /* enabled the fpu */ .word 0x4e7a,0x0808 /* movec pcr,d0 */ bclr #0x1,d0 .word 0x4e7b,0x0808 /* movec d0,pcr */ movel (sp)+,d0 movel 0xc(sp),0x2(sp) /* set "Current PC" */ rte/********************************************************************************* _060_real_trap - exit point from an FP "ftrapcc" instruction emulation exc.** This is the exit point for the 060FPSP when an emulated "ftrapcc" instruction* discovers that the trap condition is true. it branchs to the* operating system handler for the trap exception vector number 7.**/__060_real_trap: subql #0x04,sp /* save space for vector handler addr */ movel d0,sp@- /* save d0 */ movel a0,sp@- /* save a0 */ jsr _intVecBaseGet /* get the interrupt vector base addr */ addl #0x1c,d0 /* compute the vector number 7 addr */ movel d0,sp@- /* move the vector number 7 addr */ movel sp@+,a0 /* into a0 */ movel a0@,sp@(8) /* put into the stack the vector nb 7 */ /* handler address */ movel sp@+,a0 /* restore a0 */ movel sp@+,d0 /* restore d0 */ rts /* jmp into the vector nb 7 handler *//* * The following table handles the host OS dependant function relative * addresses needed by the floating point exception handlers. *//* * The following table handles the function relative addresses needed by the * loating point exception handler. This handler called the following functions: * * _060_real_bsun /@ defined above @/ * _060_real_snan /@ defined above @/ * _060_real_operr /@ defined above @/ * _060_real_ovfl /@ defined above @/ * _060_real_unfl /@ defined above @/ * _060_real_dz /@ defined above @/ * _060_real_inex /@ defined above @/ * _060_real_fline /@ defined above @/ * _060_real_fpu_disabled /@ defined above @/ * _060_real_trap /@ defined above @/ * _060_fpsp_done /@ defined above @/ * * _060_real_trace /@ defined in os060ALib.s @/ * _060_real_access /@ defined in os060ALib.s @/ * _060_imem_read /@ defined in os060ALib.s @/ * _060_dmem_read /@ defined in os060ALib.s @/ * _060_dmem_write /@ defined in os060ALib.s @/ * _060_imem_read_word /@ defined in os060ALib.s @/ * _060_imem_read_long /@ defined in os060ALib.s @/ * _060_dmem_read_byte /@ defined in os060ALib.s @/ * _060_dmem_read_word /@ defined in os060ALib.s @/ * _060_dmem_read_long /@ defined in os060ALib.s @/ * _060_dmem_write_byte /@ defined in os060ALib.s @/ * _060_dmem_write_word /@ defined in os060ALib.s @/ * _060_dmem_write_long /@ defined in os060ALib.s @/ * * Table function order is fixed by MOTOROLA code and can be changed only * for handler update. * * Table table size MUST be exactly 128 bytes formed of 32 fields, each 4 bytes * in size. */ .data .even_FPSP_060_CO_TBL: .fill 32,4,0 /* reserved 32 fields, each 4 bytes in size *//* * floating point exception handler hex code provided by Motorola, version B1 */_FPSP_060_START: .long 0x60ff0000,0x17400000,0x60ff0000,0x15f40000 .long 0x60ff0000,0x02b60000,0x60ff0000,0x04700000 .long 0x60ff0000,0x1b100000,0x60ff0000,0x19aa0000 .long 0x60ff0000,0x1b5a0000,0x60ff0000,0x062e0000 .long 0x60ff0000,0x102c0000,0x51fc51fc,0x51fc51fc .long 0x51fc51fc,0x51fc51fc,0x51fc51fc,0x51fc51fc .long 0x51fc51fc,0x51fc51fc,0x51fc51fc,0x51fc51fc .long 0x51fc51fc,0x51fc51fc,0x51fc51fc,0x51fc51fc .long 0x2f00203a,0xff2c487b,0x0930ffff,0xfef8202f .long 0x00044e74,0x00042f00,0x203afef2,0x487b0930 .long 0xfffffee2,0x202f0004,0x4e740004,0x2f00203a .long 0xfee0487b,0x0930ffff,0xfecc202f,0x00044e74 .long 0x00042f00,0x203afed2,0x487b0930,0xfffffeb6 .long 0x202f0004,0x4e740004,0x2f00203a,0xfea4487b .long 0x0930ffff,0xfea0202f,0x00044e74,0x00042f00 .long 0x203afe96,0x487b0930,0xfffffe8a,0x202f0004 .long 0x4e740004,0x2f00203a,0xfe7c487b,0x0930ffff .long 0xfe74202f,0x00044e74,0x00042f00,0x203afe76 .long 0x487b0930,0xfffffe5e,0x202f0004,0x4e740004 .long 0x2f00203a,0xfe68487b,0x0930ffff,0xfe48202f .long 0x00044e74,0x00042f00,0x203afe56,0x487b0930 .long 0xfffffe32,0x202f0004,0x4e740004,0x2f00203a .long 0xfe44487b,0x0930ffff,0xfe1c202f,0x00044e74 .long 0x00042f00,0x203afe32,0x487b0930,0xfffffe06 .long 0x202f0004,0x4e740004,0x2f00203a,0xfe20487b .long 0x0930ffff,0xfdf0202f,0x00044e74,0x00042f00 .long 0x203afe1e,0x487b0930,0xfffffdda,0x202f0004 .long 0x4e740004,0x2f00203a,0xfe0c487b,0x0930ffff .long 0xfdc4202f,0x00044e74,0x00042f00,0x203afdfa .long 0x487b0930,0xfffffdae,0x202f0004,0x4e740004 .long 0x2f00203a,0xfde8487b,0x0930ffff,0xfd98202f .long 0x00044e74,0x00042f00,0x203afdd6,0x487b0930 .long 0xfffffd82,0x202f0004,0x4e740004,0x2f00203a .long 0xfdc4487b,0x0930ffff,0xfd6c202f,0x00044e74 .long 0x00042f00,0x203afdb2,0x487b0930,0xfffffd56 .long 0x202f0004,0x4e740004,0x2f00203a,0xfda0487b .long 0x0930ffff,0xfd40202f,0x00044e74,0x00042f00 .long 0x203afd8e,0x487b0930,0xfffffd2a,0x202f0004 .long 0x4e740004,0x2f00203a,0xfd7c487b,0x0930ffff .long 0xfd14202f,0x00044e74,0x00042f00,0x203afd6a .long 0x487b0930,0xfffffcfe,0x202f0004,0x4e740004 .long 0x40c62d38,0xd3d64634,0x3d6f90ae,0xb1e75cc7 .long 0x40000000,0xc90fdaa2,0x2168c235,0x00000000 .long 0x3fff0000,0xc90fdaa2,0x2168c235,0x00000000 .long 0x3fe45f30,0x6dc9c883,0x4e56ff40,0xf32eff6c .long 0x48ee0303,0xff9cf22e,0xbc00ff60,0xf22ef0c0 .long 0xffdc2d6e,0xff68ff44,0x206eff44,0x58aeff44 .long 0x61ffffff,0xff042d40,0xff40082e,0x0005ff42 .long 0x66000116,0x41eeff6c,0x61ff0000,0x051c41ee .long 0xff6c61ff,0x0000c1dc,0x1d40ff4e,0x082e0005 .long 0xff436726,0xe9ee0183,0xff4261ff,0x0000bd22 .long 0x41eeff78,0x61ff0000,0xc1ba0c00,0x00066606 .long 0x61ff0000,0xc11e1d40,0xff4f4280,0x102eff63 .long 0x122eff43,0x0241007f,0x02ae00ff,0x01ffff64 .long 0xf23c9000,0x00000000,0xf23c8800,0x00000000 .long 0x41eeff6c,0x43eeff78,0x223b1530,0x00007112 .long 0x4ebb1930,0x0000710a,0xe9ee0183,0xff4261ff .long 0x0000bd4e,0x082e0004,0xff626622,0x082e0001 .long 0xff626644,0xf22ed0c0,0xffdcf22e,0x9c00ff60 .long 0x4cee0303,0xff9c4e5e,0x60ffffff,0xfcc6f22e .long 0xf040ff6c,0x3d7ce005,0xff6ef22e,0xd0c0ffdc .long 0xf22e9c00,0xff604cee,0x0303ff9c,0xf36eff6c .long 0x4e5e60ff,0xfffffcb2,0xf22ef040,0xff6c1d7c .long 0x00c4000b,0x3d7ce001,0xff6ef22e,0xd0c0ffdc .long 0xf22e9c00,0xff604cee,0x0303ff9c,0xf36eff6c .long 0x4e5e60ff,0xfffffcae,0x1d7c0000,0xff4e4280 .long 0x102eff63,0x02aeffff,0x00ffff64,0xf23c9000 .long 0x00000000,0xf23c8800,0x00000000,0x41eeff6c .long 0x61ff0000,0xb2ce082e,0x0004ff62,0x6600ff70 .long 0x082e0001,0xff626600,0xff90f22e,0xd0c0ffdc .long 0xf22e9c00,0xff604cee,0x0303ff9c,0x4e5e0817 .long 0x000767ff,0xfffffc0c,0xf22fa400,0x00083f7c .long 0x20240006,0x60ffffff,0xfcec4e56,0xff40f32e .long 0xff6c48ee,0x0303ff9c,0xf22ebc00,0xff60f22e .long 0xf0c0ffdc,0x2d6eff68,0xff44206e,0xff4458ae .long 0xff4461ff,0xfffffd42,0x2d40ff40,0x082e0005 .long 0xff426600,0x013241ee,0xff6c61ff,0x0000035a .long 0x41eeff6c,0x61ff0000,0xc01a1d40,0xff4e082e .long 0x0005ff43,0x672e082e,0x0004ff43,0x6626e9ee .long 0x0183ff42,0x61ff0000,0xbb5841ee,0xff7861ff .long 0x0000bff0,0x0c000006,0x660661ff,0x0000bf54 .long 0x1d40ff4f,0x4280102e,0xff63122e,0xff430241 .long 0x007f02ae,0x00ff01ff,0xff64f23c,0x90000000 .long 0x0000f23c,0x88000000,0x000041ee,0xff6c43ee .long 0xff78223b,0x15300000,0x6f484ebb,0x19300000 .long 0x6f40e9ee,0x0183ff42,0x61ff0000,0xbb84082e .long 0x0003ff62,0x6622082e,0x0001ff62,0x664ef22e .long 0xd0c0ffdc,0xf22e9c00,0xff604cee,0x0303ff9c .long 0x4e5e60ff,0xfffffafc,0x082e0003,0xff666700 .long 0xffd6f22e,0xf040ff6c,0x3d7ce003,0xff6ef22e .long 0xd0c0ffdc,0xf22e9c00,0xff604cee,0x0303ff9c .long 0xf36eff6c,0x4e5e60ff,0xfffffaf4,0x082e0001 .long 0xff666700,0xffaaf22e,0xf040ff6c,0x1d7c00c4 .long 0x000b3d7c,0xe001ff6e,0xf22ed0c0,0xffdcf22e .long 0x9c00ff60,0x4cee0303,0xff9cf36e,0xff6c4e5e .long 0x60ffffff,0xfad01d7c,0x0000ff4e,0x4280102e .long 0xff6302ae,0xffff00ff,0xff64f23c,0x90000000 .long 0x0000f23c,0x88000000,0x000041ee,0xff6c61ff .long 0x0000b0f0,0x082e0003,0xff626600,0xff66082e .long 0x0001ff62,0x6600ff90,0xf22ed0c0,0xffdcf22e .long 0x9c00ff60,0x4cee0303,0xff9c4e5e,0x08170007 .long 0x67ffffff,0xfa2ef22f,0xa4000008,0x3f7c2024 .long 0x000660ff,0xfffffb0e,0x4e56ff40,0xf32eff6c .long 0x48ee0303,0xff9cf22e,0xbc00ff60,0xf22ef0c0 .long 0xffdc082e,0x00050004,0x66084e68,0x2d48ffd8 .long 0x600841ee,0x00102d48,0xffd82d6e,0xff68ff44 .long 0x206eff44,0x58aeff44,0x61ffffff,0xfb4c2d40 .long 0xff40422e,0xff4a082e,0x0005ff42,0x66000208 .long 0xe9ee0006,0xff420c00,0x00136700,0x049e02ae .long 0x00ff00ff,0xff64f23c,0x90000000,0x0000f23c .long 0x88000000,0x000041ee,0xff6c61ff,0x0000013a .long 0x41eeff6c,0x61ff0000,0xbdfa0c00,0x00066606 .long 0x61ff0000,0xbd5e1d40,0xff4ee9ee,0x0183ff42 .long 0x082e0005,0xff436728,0x0c2e003a,0xff436720 .long 0x61ff0000,0xb92c41ee,0xff7861ff,0x0000bdc4 .long 0x0c000006,0x660661ff,0x0000bd28,0x1d40ff4f .long 0x4280102e,0xff63e9ee,0x1047ff43,0x41eeff6c .long 0x43eeff78,0x223b1d30,0x00006d36,0x4ebb1930 .long 0x00006d2e,0x102eff62,0x6634102e,0xff430200 .long 0x00380c00,0x0038670c,0xe9ee0183,0xff4261ff .long 0x0000b95e,0xf22ed0c0,0xffdcf22e,0x9c00ff60 .long 0x4cee0303,0xff9c4e5e,0x60ffffff,0xf8e6c02e .long 0xff66edc0,0x06086614,0x082e0004,0xff6667ba .long 0x082e0001,0xff6267b2,0x60000066,0x04800000 .long 0x00180c00,0x00066614,0x082e0003,0xff666600 .long 0x004a082e,0x0004ff66,0x66000046,0x2f0061ff .long 0x000007e0,0x201f3d7b,0x0222ff6e,0xf22ed0c0 .long 0xffdcf22e,0x9c00ff60,0x4cee0303,0xff9cf36e .long 0xff6c4e5e,0x60ffffff,0xf87ae000,0xe006e004 .long 0xe005e003,0xe002e001,0xe001303c,0x000460bc .long 0x303c0003,0x60b6e9ee,0x0006ff42,0x0c000011 .long 0x67080c00,0x00156750,0x4e753028,0x00000240 .long 0x7fff0c40,0x3f806708,0x0c40407f,0x672c4e75 .long 0x02a87fff,0xffff0004,0x671861ff,0x0000bbbc .long 0x44400640,0x3f810268,0x80000000,0x81680000 .long 0x4e750268,0x80000000,0x4e750228,0x007f0004 .long 0x00687fff,0x00004e75,0x30280000,0x02407fff .long 0x0c403c00,0x67080c40,0x43ff67de,0x4e7502a8 .long 0x7fffffff,0x00046606,0x4aa80008,0x67c461ff .long 0x0000bb68,0x44400640,0x3c010268,0x80000000 .long 0x81680000,0x4e75e9ee,0x00c3ff42,0x0c000003
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -