; File: fpu.i ; Author: Mikael Kalms ; Date: 1 Oct 1999 ; Title: FPU control/status register bits ; ; Description: ; Contains bitmasks for FPU control/status register bits IFND _FPU_I_ _FPU_I_ SET 1 ; Rounding modes FPCR_ROUNDMASK EQU $00000030 FPCR_RN EQU $00000000 ; Round toward Nearest (default) FPCR_RZ EQU $00000010 ; Round toward Zero (CHOP) FPCR_RM EQU $00000020 ; Round toward -Infinity (FLOOR) FPCR_RP EQU $00000030 ; Round toward +Infinity (CEILING) ; Precision modes FPCR_PRECMASK EQU $000000c0 FPCR_EXT EQU $00000000 ; Extended (80bit) precision (default) FPCR_SINGLE EQU $00000040 ; Single (32bit) precision FPCR_DOUBLE EQU $00000080 ; Double (64bit) precision ; Exception enable FPCR_ENABLEMASK EQU $0000ff00 FPCRF_INEX1 EQU $00000100 FPCRF_INEX2 EQU $00000200 FPCRF_DZ EQU $00000400 FPCRF_UNFL EQU $00000800 FPCRF_OVFL EQU $00001000 FPCRF_OPERR EQU $00002000 FPCRF_SNAN EQU $00004000 FPCRF_BSUN EQU $00008000 FPCRB_INEX1 EQU 8 FPCRB_INEX2 EQU 9 FPCRB_DZ EQU 10 FPCRB_UNFL EQU 11 FPCRB_OVFL EQU 12 FPCRB_OPERR EQU 13 FPCRB_SNAN EQU 14 FPCRB_BSUN EQU 15 ; Accrued exceptions FPSR_AEXCMASK EQU $000000f8 FPSRF_AINEX EQU $00000008 FPSRF_ADZ EQU $00000010 FPSRF_AUNFL EQU $00000020 FPSRF_AOVFL EQU $00000040 FPSRF_AIOP EQU $00000080 FPSRB_AINEX EQU 3 FPSRB_ADZ EQU 4 FPSRB_AUNFL EQU 5 FPSRB_AOVFL EQU 6 FPSRB_AIOP EQU 7 ; Exception status FPSR_EXCMASK EQU $0000ff00 FPSRF_INEX1 EQU $00000100 FPSRF_INEX2 EQU $00000200 FPSRF_DZ EQU $00000400 FPSRF_UNFL EQU $00000800 FPSRF_OVFL EQU $00001000 FPSRF_OPERR EQU $00002000 FPSRF_SNAN EQU $00004000 FPSRF_BSUN EQU $00008000 FPSRB_INEX1 EQU 8 FPSRB_INEX2 EQU 9 FPSRB_DZ EQU 10 FPSRB_UNFL EQU 11 FPSRB_OVFL EQU 12 FPSRB_OPERR EQU 13 FPSRB_SNAN EQU 14 FPSRB_BSUN EQU 15 ; Quotient byte FPSR_QUOTMASK EQU $00ff0000 FPSR_QUOTSHIFT EQU 16 ; Status flags FPSRB_NAN EQU 24 FPSRB_I EQU 25 FPSRB_Z EQU 26 FPSRB_N EQU 27 FPSRF_NAN EQU $01000000 FPSRF_I EQU $02000000 FPSRF_Z EQU $04000000 FPSRF_N EQU $08000000 ENDC