📄 l_entry.s
字号:
fmovel fpcr,a6@(USER_FPCR) fmovel fpcr,d1 /* | user's rounding mode/precision */ fmovel #0,fpcr | force rounding mode/prec to extended,rn|| copy, convert and tag input argument| fmovex a6@(8),fp0 fmovex fp0,a6@(ETEMP) lea a6@(ETEMP),a0 bsrl __l_tag moveb d0,a6@(STAG) tstb d0 jne L_108C bsrl __l_setoxm1 | normalized (regular) number jra L_108GL_108C: cmpb #0x20,d0 | zero? jne L_108D bsrl __l_szero jra L_108GL_108D: cmpb #0x40,d0 | infinity? jne L_108E bsrl __l_setoxm1i jra L_108GL_108E: cmpb #0x60,d0 | NaN? jne L_108F bsrl __l_mon_nan jra L_108GL_108F: bsrl __l_setoxm1d | assuming a denorm...L_108G: fmovel fpsr,d0 | update status register orb a6@(USER_FPSR+3),d0 | add previously accrued exceptions fmovel d0,fpsr|| Result is now in FP0| moveml a6@(USER_DA),d0-d1/a0-a1 fmovemx a6@(USER_FP1),fp1-fp3 | note: fp0 not restored fmovel a6@(USER_FPCR),fpcr | fpcr restored unlk a6 rts|| MONADIC.GEN 1.3 4/30/91|| MONADIC.GEN --- generic MONADIC template|| This version saves all registers that will be used by the emulation| routines and restores all but FP0 on exit. The FPSR is| updated to reflect the result of the operation. Return value| is placed in FP0 for single, double and extended results.|| The package subroutines expect the incoming fpcr to be zeroed| since they need extended precision to work properly. The/* | 'final' fpcr is expected in d1 so that the calculated result */| can be properly sized and rounded. Also, if the incoming fpcr| has enabled any exceptions, the exception will be taken on the| final fmovem in this template.|| Customizations:| 1. Remove the moveml at the entry and exit of| each routine if your compiler treats those| registers as scratch./* | 2. Likewise, don't save FP0/FP1 if they are scratch */| registers.| 3. Delete handling of the fpsr if you only care about| the result.| 4. Some (most?) C compilers convert all float arguments| to double, and provide no support at all for extended| precision so remove the __l_fgetexps and __l_fgetexpx entry points.| 5. Move the result to d0/d1 if the compiler is that old.| Copyright (C) Motorola, Inc. 1991| All Rights Reserved|| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA| The copyright notice above does not evidence any| actual or intended publication of such source code.| xref __l_tag| xref __l_sgetexp| xref __l_szero| xref __l_t_operr| xref __l_mon_nan| xref __l_sgetexpd .globl __l_fgetexps__l_fgetexps: link a6,#-LOCAL_SIZE moveml d0-d1/a0-a1,a6@(USER_DA) fmovemx fp0-fp3,a6@(USER_FP0) fmovel fpsr,a6@(USER_FPSR) fmovel fpcr,a6@(USER_FPCR) fmovel fpcr,d1 /* | user's rounding mode/precision */ fmovel #0,fpcr | force rounding mode/prec to extended,rn|| copy, convert and tag input argument| fmoves a6@(8),fp0 fmovex fp0,a6@(ETEMP) lea a6@(ETEMP),a0 bsrl __l_tag moveb d0,a6@(STAG) tstb d0 jne L_1092 bsrl __l_sgetexp | normalized (regular) number jra L_1096L_1092: cmpb #0x20,d0 | zero? jne L_1093 bsrl __l_szero jra L_1096L_1093: cmpb #0x40,d0 | infinity? jne L_1094 bsrl __l_t_operr jra L_1096L_1094: cmpb #0x60,d0 | NaN? jne L_1095 bsrl __l_mon_nan jra L_1096L_1095: bsrl __l_sgetexpd | assuming a denorm...L_1096: fmovel fpsr,d0 | update status register orb a6@(USER_FPSR+3),d0 | add previously accrued exceptions fmovel d0,fpsr|| Result is now in FP0| moveml a6@(USER_DA),d0-d1/a0-a1 fmovemx a6@(USER_FP1),fp1-fp3 | note: fp0 not restored fmovel a6@(USER_FPCR),fpcr | fpcr restored unlk a6 rts .globl __l_fgetexpd__l_fgetexpd: link a6,#-LOCAL_SIZE moveml d0-d1/a0-a1,a6@(USER_DA) fmovemx fp0-fp3,a6@(USER_FP0) fmovel fpsr,a6@(USER_FPSR) fmovel fpcr,a6@(USER_FPCR) fmovel fpcr,d1 /* | user's rounding mode/precision */ fmovel #0,fpcr | force rounding mode/prec to extended,rn|| copy, convert and tag input argument| fmoved a6@(8),fp0 fmovex fp0,a6@(ETEMP) lea a6@(ETEMP),a0 bsrl __l_tag moveb d0,a6@(STAG) tstb d0 jne L_1097 bsrl __l_sgetexp | normalized (regular) number jra L_109BL_1097: cmpb #0x20,d0 | zero? jne L_1098 bsrl __l_szero jra L_109BL_1098: cmpb #0x40,d0 | infinity? jne L_1099 bsrl __l_t_operr jra L_109BL_1099: cmpb #0x60,d0 | NaN? jne L_109A bsrl __l_mon_nan jra L_109BL_109A: bsrl __l_sgetexpd | assuming a denorm...L_109B: fmovel fpsr,d0 | update status register orb a6@(USER_FPSR+3),d0 | add previously accrued exceptions fmovel d0,fpsr|| Result is now in FP0| moveml a6@(USER_DA),d0-d1/a0-a1 fmovemx a6@(USER_FP1),fp1-fp3 | note: fp0 not restored fmovel a6@(USER_FPCR),fpcr | fpcr restored unlk a6 rts .globl __l_fgetexpx__l_fgetexpx: link a6,#-LOCAL_SIZE moveml d0-d1/a0-a1,a6@(USER_DA) fmovemx fp0-fp3,a6@(USER_FP0) fmovel fpsr,a6@(USER_FPSR) fmovel fpcr,a6@(USER_FPCR) fmovel fpcr,d1 /* | user's rounding mode/precision */ fmovel #0,fpcr | force rounding mode/prec to extended,rn|| copy, convert and tag input argument| fmovex a6@(8),fp0 fmovex fp0,a6@(ETEMP) lea a6@(ETEMP),a0 bsrl __l_tag moveb d0,a6@(STAG) tstb d0 jne L_109C bsrl __l_sgetexp | normalized (regular) number jra L_109GL_109C: cmpb #0x20,d0 | zero? jne L_109D bsrl __l_szero jra L_109GL_109D: cmpb #0x40,d0 | infinity? jne L_109E bsrl __l_t_operr jra L_109GL_109E: cmpb #0x60,d0 | NaN? jne L_109F bsrl __l_mon_nan jra L_109GL_109F: bsrl __l_sgetexpd | assuming a denorm...L_109G: fmovel fpsr,d0 | update status register orb a6@(USER_FPSR+3),d0 | add previously accrued exceptions fmovel d0,fpsr|| Result is now in FP0| moveml a6@(USER_DA),d0-d1/a0-a1 fmovemx a6@(USER_FP1),fp1-fp3 | note: fp0 not restored fmovel a6@(USER_FPCR),fpcr | fpcr restored unlk a6 rts|| MONADIC.GEN 1.3 4/30/91|| MONADIC.GEN --- generic MONADIC template|| This version saves all registers that will be used by the emulation| routines and restores all but FP0 on exit. The FPSR is| updated to reflect the result of the operation. Return value| is placed in FP0 for single, double and extended results.|| The package subroutines expect the incoming fpcr to be zeroed| since they need extended precision to work properly. The/* | 'final' fpcr is expected in d1 so that the calculated result */| can be properly sized and rounded. Also, if the incoming fpcr| has enabled any exceptions, the exception will be taken on the| final fmovem in this template.|| Customizations:| 1. Remove the moveml at the entry and exit of| each routine if your compiler treats those| registers as scratch./* | 2. Likewise, don't save FP0/FP1 if they are scratch */| registers.| 3. Delete handling of the fpsr if you only care about| the result.| 4. Some (most?) C compilers convert all float arguments| to double, and provide no support at all for extended| precision so remove the __l_fsins and __l_fsinx entry points.| 5. Move the result to d0/d1 if the compiler is that old.| Copyright (C) Motorola, Inc. 1991| All Rights Reserved|| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA| The copyright notice above does not evidence any| actual or intended publication of such source code.| xref __l_tag| xref __l_ssin| xref __l_szero| xref __l_t_operr| xref __l_mon_nan| xref __l_ssind .globl __l_fsins__l_fsins: link a6,#-LOCAL_SIZE moveml d0-d1/a0-a1,a6@(USER_DA) fmovemx fp0-fp3,a6@(USER_FP0) fmovel fpsr,a6@(USER_FPSR) fmovel fpcr,a6@(USER_FPCR) fmovel fpcr,d1 /* | user's rounding mode/precision */ fmovel #0,fpcr | force rounding mode/prec to extended,rn|| copy, convert and tag input argument| fmoves a6@(8),fp0 fmovex fp0,a6@(ETEMP) lea a6@(ETEMP),a0 bsrl __l_tag moveb d0,a6@(STAG) tstb d0 jne L_1102 bsrl __l_ssin | normalized (regular) number jra L_1106L_1102: cmpb #0x20,d0 | zero? jne L_1103 bsrl __l_szero jra L_1106L_1103: cmpb #0x40,d0 | infinity? jne L_1104 bsrl __l_t_operr jra L_1106L_1104: cmpb #0x60,d0 | NaN? jne L_1105 bsrl __l_mon_nan jra L_1106L_1105: bsrl __l_ssind | assuming a denorm...L_1106: fmovel fpsr,d0 | update status register orb a6@(USER_FPSR+3),d0 | add previously accrued exceptions fmovel d0,fpsr|| Result is now in FP0| moveml a6@(USER_DA),d0-d1/a0-a1 fmovemx a6@(USER_FP1),fp1-fp3 | note: fp0 not restored fmovel a6@(USER_FPCR),fpcr | fpcr restored unlk a6 rts .globl __l_fsind__l_fsind: link a6,#-LOCAL_SIZE moveml d0-d1/a0-a1,a6@(USER_DA) fmovemx fp0-fp3,a6@(USER_FP0) fmovel fpsr,a6@(USER_FPSR) fmovel fpcr,a6@(USER_FPCR) fmovel fpcr,d1 /* | user's rounding mode/precision */ fmovel #0,fpcr | force rounding mode/prec to extended,rn|| copy, convert and tag input argument| fmoved a6@(8),fp0 fmovex fp0,a6@(ETEMP) lea a6@(ETEMP),a0 bsrl __l_tag moveb d0,a6@(STAG) tstb d0 jne L_1107 bsrl __l_ssin | normalized (regular) number jra L_110BL_1107: cmpb #0x20,d0 | zero? jne L_1108 bsrl __l_szero jra L_110BL_1108: cmpb #0x40,d0 | infinity? jne L_1109 bsrl __l_t_operr jra L_110BL_1109: cmpb #0x60,d0 | NaN? jne L_110A bsrl __l_mon_nan jra L_110BL_110A: bsrl __l_ssind | assuming a denorm...L_110B: fmovel fpsr,d0 | update status register orb a6@(USER_FPSR+3),d0 | add previously accrued exceptions fmovel d0,fpsr|| Result is now in FP0| moveml a6@(USER_DA),d0-d1/a0-a1 fmovemx a6@(USER_FP1),fp1-fp3 | note: fp0 not restored fmovel a6@(USER_FPCR),fpcr | fpcr restored unlk a6 rts .globl __l_fsinx__l_fsinx: link a6,#-LOCAL_SIZE moveml d0-d1/a0-a1,a6@(USER_DA) fmovemx fp0-fp3,a6@(USER_FP0) fmovel fpsr,a6@(USER_FPSR) fmovel fpcr,a6@(USER_FPCR) fmovel fpcr,d1 /* | user's rounding mode/precision */ fmovel #0,fpcr | force rounding mode/prec to extended,rn|| copy, convert and tag input argument| fmovex a6@(8),fp0 fmovex fp0,a6@(ETEMP) lea a6@(ETEMP),a0 bsrl __l_tag moveb d0,a6@(STAG) tstb d0 jne L_110C bsrl __l_ssin | normalized (regular) number jra L_110GL_110C: cmpb #0x20,d0 | zero? jne L_110D bsrl __l_szero jra L_110GL_110D: cmpb #0x40,d0 | infinity? jne L_110E bsrl __l_t_operr jra L_110GL_110E: cmpb #0x60,d0 | NaN? jne L_110F bsrl __l_mon_nan jra L_110GL_110F: bsrl __l_ssind | assuming a denorm...L_110G: fmovel fpsr,d0 | update status register orb a6@(USER_FPSR+3),d0 | add previously accrued exceptions fmovel d0,fpsr|| Result is now in FP0| moveml a6@(USER_DA),d0-d1/a0-a1 fmovemx a6@(USER_FP1),fp1-fp3 | note: fp0 not restored fmovel a6@(USER_FPCR),fpcr | fpcr restored unlk a6 rts|| MONADIC.GEN 1.3 4/30/91|| MONADIC.GEN --- generic MONADIC template|| This version saves all registers that will be used by the emulation| routines and restores all but FP0 on exit. The FPSR is| updated to reflect the result of the operation. Return value| is placed in FP0 for single, double and extended results.|| The package subroutines expect the incoming fpcr to be zeroed| since they need extended precision to work properly. The/* | 'final' fpcr is expected in d1 so that the calculated result */| can be properly sized and rounded. Also, if the incoming fpcr| has enabled any exceptions, the exception will be taken on the| final fmovem in this template.|| Customizations:| 1. Remove the moveml at the entry and exit of| each routine if your compiler treats those| registers as scratch./* | 2. Likewise, don't save FP0/FP1 if they are scratch */| registers.| 3. Delete handling of the fpsr if you only care about| the result.| 4. Some (most?) C compilers convert all float arguments| to double, and provide no support at all for extended| precision so remove the __l_fsinhs and __l_fsinhx entry points.| 5. Move the result to d0/d1 if the compiler is that old.| Copyright (C) Motorola, Inc. 1991| All Rights Reserved|| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA| The copyright notice above does not evidence any| actual or intended publication of such source code.| xref __l_tag| xref __l_ssinh| xref __l_szero| xref __l_sinf| xref __l_mon_nan| xref __l_ssinhd .globl __l_fsinhs__l_fsinhs: link a6,#-LOCAL_SIZE moveml d0-d1/a0-a1,a6@(USER_DA) fmovemx fp0-fp3,a6@(USER_FP0) fmovel fpsr,a6@(USER_FPSR) fmovel fpcr,a6@(USER_FPCR) fmovel fpcr,d1 /* | user's rounding mode/precision */ fmovel #0,fpcr | force rounding mode/prec to extended,rn|| copy, convert and tag input argument| fmoves a6@(8),fp0 fmovex fp0,a6@(ETEMP) lea a6@(ETEMP),a0 bsrl __l_tag moveb d0,a6@(STAG) tstb d0 jne L_1112 bsrl __l_ssinh | normalized (regular) number jra L_1116L_1112: cmpb #0x20,d0 | zero? jne L_1113 bsrl __l_szero jra L_1116L_1113: cmpb #0x40,d0 | infinity? jne L_1114 bsrl __l_sinf jra L_1116L_1114: cmpb #0x60,d0 | NaN? jne L_1115 bsrl __l_mon_nan jra L_1116L_1115: bsrl __l_ssinhd | assuming a denorm...L_1116: fmovel fpsr,d0 | update status register orb a6@(USER_FPSR+3),d0 | add previously accrued exceptions fmovel d0,fpsr|| Result is now in FP0| moveml a6@(USER_DA),d0-d1/a0-a1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -