l_entry.s
上传用户:nvosite88
上传日期:2007-01-17
资源大小:4983k
文件大小:148k
- | 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_fgetmans and __l_fgetmanx 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_sgetman
- | xref __l_szero
- | xref __l_t_operr
- | xref __l_mon_nan
- | xref __l_sgetmand
- .globl __l_fgetmans
- __l_fgetmans:
- 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_1162
- bsrl __l_sgetman | normalized (regular) number
- jra L_1166
- L_1162:
- cmpb #0x20,d0 | zero?
- jne L_1163
- bsrl __l_szero
- jra L_1166
- L_1163:
- cmpb #0x40,d0 | infinity?
- jne L_1164
- bsrl __l_t_operr
- jra L_1166
- L_1164:
- cmpb #0x60,d0 | NaN?
- jne L_1165
- bsrl __l_mon_nan
- jra L_1166
- L_1165:
- bsrl __l_sgetmand | assuming a denorm...
- L_1166:
- 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_fgetmand
- __l_fgetmand:
- 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_1167
- bsrl __l_sgetman | normalized (regular) number
- jra L_116B
- L_1167:
- cmpb #0x20,d0 | zero?
- jne L_1168
- bsrl __l_szero
- jra L_116B
- L_1168:
- cmpb #0x40,d0 | infinity?
- jne L_1169
- bsrl __l_t_operr
- jra L_116B
- L_1169:
- cmpb #0x60,d0 | NaN?
- jne L_116A
- bsrl __l_mon_nan
- jra L_116B
- L_116A:
- bsrl __l_sgetmand | assuming a denorm...
- L_116B:
- 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_fgetmanx
- __l_fgetmanx:
- 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_116C
- bsrl __l_sgetman | normalized (regular) number
- jra L_116G
- L_116C:
- cmpb #0x20,d0 | zero?
- jne L_116D
- bsrl __l_szero
- jra L_116G
- L_116D:
- cmpb #0x40,d0 | infinity?
- jne L_116E
- bsrl __l_t_operr
- jra L_116G
- L_116E:
- cmpb #0x60,d0 | NaN?
- jne L_116F
- bsrl __l_mon_nan
- jra L_116G
- L_116F:
- bsrl __l_sgetmand | assuming a denorm...
- L_116G:
- 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_flogns and __l_flognx 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_sslogn
- | xref __l_t_dz2
- | xref __l_sopr_inf
- | xref __l_mon_nan
- | xref __l_sslognd
- .globl __l_flogns
- __l_flogns:
- 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_1172
- bsrl __l_sslogn | normalized (regular) number
- jra L_1176
- L_1172:
- cmpb #0x20,d0 | zero?
- jne L_1173
- bsrl __l_t_dz2
- jra L_1176
- L_1173:
- cmpb #0x40,d0 | infinity?
- jne L_1174
- bsrl __l_sopr_inf
- jra L_1176
- L_1174:
- cmpb #0x60,d0 | NaN?
- jne L_1175
- bsrl __l_mon_nan
- jra L_1176
- L_1175:
- bsrl __l_sslognd | assuming a denorm...
- L_1176:
- 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_flognd
- __l_flognd:
- 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_1177
- bsrl __l_sslogn | normalized (regular) number
- jra L_117B
- L_1177:
- cmpb #0x20,d0 | zero?
- jne L_1178
- bsrl __l_t_dz2
- jra L_117B
- L_1178:
- cmpb #0x40,d0 | infinity?
- jne L_1179
- bsrl __l_sopr_inf
- jra L_117B
- L_1179:
- cmpb #0x60,d0 | NaN?
- jne L_117A
- bsrl __l_mon_nan
- jra L_117B
- L_117A:
- bsrl __l_sslognd | assuming a denorm...
- L_117B:
- 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_flognx
- __l_flognx:
- 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_117C
- bsrl __l_sslogn | normalized (regular) number
- jra L_117G
- L_117C:
- cmpb #0x20,d0 | zero?
- jne L_117D
- bsrl __l_t_dz2
- jra L_117G
- L_117D:
- cmpb #0x40,d0 | infinity?
- jne L_117E
- bsrl __l_sopr_inf
- jra L_117G
- L_117E:
- cmpb #0x60,d0 | NaN?
- jne L_117F
- bsrl __l_mon_nan
- jra L_117G
- L_117F:
- bsrl __l_sslognd | assuming a denorm...
- L_117G:
- 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_flog2s and __l_flog2x 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_sslog2
- | xref __l_t_dz2
- | xref __l_sopr_inf
- | xref __l_mon_nan
- | xref __l_sslog2d
- .globl __l_flog2s
- __l_flog2s:
- 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_1182
- bsrl __l_sslog2 | normalized (regular) number
- jra L_1186
- L_1182:
- cmpb #0x20,d0 | zero?
- jne L_1183
- bsrl __l_t_dz2
- jra L_1186
- L_1183:
- cmpb #0x40,d0 | infinity?
- jne L_1184
- bsrl __l_sopr_inf
- jra L_1186
- L_1184:
- cmpb #0x60,d0 | NaN?
- jne L_1185
- bsrl __l_mon_nan
- jra L_1186
- L_1185:
- bsrl __l_sslog2d | assuming a denorm...
- L_1186:
- 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_flog2d
- __l_flog2d:
- 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_1187
- bsrl __l_sslog2 | normalized (regular) number
- jra L_118B
- L_1187:
- cmpb #0x20,d0 | zero?
- jne L_1188
- bsrl __l_t_dz2
- jra L_118B
- L_1188:
- cmpb #0x40,d0 | infinity?
- jne L_1189
- bsrl __l_sopr_inf
- jra L_118B
- L_1189:
- cmpb #0x60,d0 | NaN?
- jne L_118A
- bsrl __l_mon_nan
- jra L_118B
- L_118A:
- bsrl __l_sslog2d | assuming a denorm...
- L_118B:
- 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_flog2x
- __l_flog2x:
- 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_118C
- bsrl __l_sslog2 | normalized (regular) number
- jra L_118G
- L_118C:
- cmpb #0x20,d0 | zero?
- jne L_118D
- bsrl __l_t_dz2
- jra L_118G
- L_118D:
- cmpb #0x40,d0 | infinity?
- jne L_118E
- bsrl __l_sopr_inf
- jra L_118G
- L_118E:
- cmpb #0x60,d0 | NaN?
- jne L_118F
- bsrl __l_mon_nan
- jra L_118G
- L_118F:
- bsrl __l_sslog2d | assuming a denorm...
- L_118G:
- 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_flog10s and __l_flog10x 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_sslog10
- | xref __l_t_dz2
- | xref __l_sopr_inf
- | xref __l_mon_nan
- | xref __l_sslog10d
- .globl __l_flog10s
- __l_flog10s:
- 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_1192
- bsrl __l_sslog10 | normalized (regular) number
- jra L_1196
- L_1192:
- cmpb #0x20,d0 | zero?
- jne L_1193
- bsrl __l_t_dz2
- jra L_1196
- L_1193:
- cmpb #0x40,d0 | infinity?
- jne L_1194
- bsrl __l_sopr_inf
- jra L_1196
- L_1194:
- cmpb #0x60,d0 | NaN?
- jne L_1195
- bsrl __l_mon_nan
- jra L_1196
- L_1195:
- bsrl __l_sslog10d | assuming a denorm...
- L_1196:
- 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_flog10d
- __l_flog10d:
- 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_1197
- bsrl __l_sslog10 | normalized (regular) number
- jra L_119B
- L_1197:
- cmpb #0x20,d0 | zero?
- jne L_1198
- bsrl __l_t_dz2
- jra L_119B
- L_1198:
- cmpb #0x40,d0 | infinity?
- jne L_1199
- bsrl __l_sopr_inf
- jra L_119B
- L_1199:
- cmpb #0x60,d0 | NaN?
- jne L_119A
- bsrl __l_mon_nan
- jra L_119B
- L_119A:
- bsrl __l_sslog10d | assuming a denorm...
- L_119B:
- 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_flog10x
- __l_flog10x:
- 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_119C
- bsrl __l_sslog10 | normalized (regular) number
- jra L_119G
- L_119C:
- cmpb #0x20,d0 | zero?
- jne L_119D
- bsrl __l_t_dz2
- jra L_119G
- L_119D:
- cmpb #0x40,d0 | infinity?
- jne L_119E
- bsrl __l_sopr_inf
- jra L_119G
- L_119E:
- cmpb #0x60,d0 | NaN?
- jne L_119F
- bsrl __l_mon_nan
- jra L_119G
- L_119F:
- bsrl __l_sslog10d | assuming a denorm...
- L_119G:
- 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_flognp1s and __l_flognp1x 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_sslognp1
- | xref __l_szero
- | xref __l_sopr_inf
- | xref __l_mon_nan
- | xref __l_slognp1d
- .globl __l_flognp1s
- __l_flognp1s:
- 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_1202
- bsrl __l_sslognp1 | normalized (regular) number
- jra L_1206
- L_1202:
- cmpb #0x20,d0 | zero?
- jne L_1203
- bsrl __l_szero
- jra L_1206
- L_1203:
- cmpb #0x40,d0 | infinity?
- jne L_1204
- bsrl __l_sopr_inf
- jra L_1206
- L_1204:
- cmpb #0x60,d0 | NaN?
- jne L_1205
- bsrl __l_mon_nan
- jra L_1206
- L_1205:
- bsrl __l_slognp1d | assuming a denorm...
- L_1206:
- 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_flognp1d
- __l_flognp1d:
- 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_1207
- bsrl __l_sslognp1 | normalized (regular) number
- jra L_120B
- L_1207:
- cmpb #0x20,d0 | zero?
- jne L_1208
- bsrl __l_szero
- jra L_120B
- L_1208:
- cmpb #0x40,d0 | infinity?
- jne L_1209
- bsrl __l_sopr_inf
- jra L_120B
- L_1209:
- cmpb #0x60,d0 | NaN?
- jne L_120A
- bsrl __l_mon_nan
- jra L_120B
- L_120A:
- bsrl __l_slognp1d | assuming a denorm...
- L_120B:
- 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_flognp1x
- __l_flognp1x:
- 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_120C
- bsrl __l_sslognp1 | normalized (regular) number
- jra L_120G
- L_120C:
- cmpb #0x20,d0 | zero?
- jne L_120D
- bsrl __l_szero
- jra L_120G
- L_120D:
- cmpb #0x40,d0 | infinity?
- jne L_120E
- bsrl __l_sopr_inf
- jra L_120G
- L_120E:
- cmpb #0x60,d0 | NaN?
- jne L_120F
- bsrl __l_mon_nan
- jra L_120G
- L_120F:
- bsrl __l_slognp1d | assuming a denorm...
- L_120G:
- 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_fints and __l_fintx 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_l_sint
- | xref __l_szero
- | xref __l_sinf
- | xref __l_mon_nan
- | xref __l_l_sintd
- .globl __l_fints
- __l_fints:
- 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_1212
- bsrl __l_l_sint | normalized (regular) number
- jra L_1216
- L_1212:
- cmpb #0x20,d0 | zero?
- jne L_1213
- bsrl __l_szero
- jra L_1216
- L_1213:
- cmpb #0x40,d0 | infinity?
- jne L_1214
- bsrl __l_sinf
- jra L_1216
- L_1214:
- cmpb #0x60,d0 | NaN?
- jne L_1215
- bsrl __l_mon_nan
- jra L_1216
- L_1215:
- bsrl __l_l_sintd | assuming a denorm...
- L_1216:
- 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_fintd
- __l_fintd:
- 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_1217
- bsrl __l_l_sint | normalized (regular) number
- jra L_121B
- L_1217:
- cmpb #0x20,d0 | zero?
- jne L_1218
- bsrl __l_szero
- jra L_121B
- L_1218:
- cmpb #0x40,d0 | infinity?
- jne L_1219
- bsrl __l_sinf
- jra L_121B
- L_1219:
- cmpb #0x60,d0 | NaN?
- jne L_121A
- bsrl __l_mon_nan
- jra L_121B
- L_121A:
- bsrl __l_l_sintd | assuming a denorm...
- L_121B:
- 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_fintx
- __l_fintx:
- 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_121C
- bsrl __l_l_sint | normalized (regular) number
- jra L_121G
- L_121C:
- cmpb #0x20,d0 | zero?
- jne L_121D
- bsrl __l_szero
- jra L_121G
- L_121D:
- cmpb #0x40,d0 | infinity?
- jne L_121E
- bsrl __l_sinf
- jra L_121G
- L_121E:
- cmpb #0x60,d0 | NaN?
- jne L_121F
- bsrl __l_mon_nan
- jra L_121G
- L_121F:
- bsrl __l_l_sintd | assuming a denorm...
- L_121G:
- 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_fintrzs and __l_fintrzx 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_l_sintrz
- | xref __l_szero
- | xref __l_sinf
- | xref __l_mon_nan
- | xref __l_snzrinx
- .globl __l_fintrzs
- __l_fintrzs:
- 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_1222
- bsrl __l_l_sintrz | normalized (regular) number
- jra L_1226
- L_1222:
- cmpb #0x20,d0 | zero?
- jne L_1223
- bsrl __l_szero
- jra L_1226
- L_1223:
- cmpb #0x40,d0 | infinity?
- jne L_1224
- bsrl __l_sinf
- jra L_1226
- L_1224:
- cmpb #0x60,d0 | NaN?
- jne L_1225
- bsrl __l_mon_nan
- jra L_1226
- L_1225:
- bsrl __l_snzrinx | assuming a denorm...
- L_1226:
- 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_fintrzd
- __l_fintrzd:
- 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_1227
- bsrl __l_l_sintrz | normalized (regular) number
- jra L_122B
- L_1227:
- cmpb #0x20,d0 | zero?
- jne L_1228
- bsrl __l_szero
- jra L_122B
- L_1228:
- cmpb #0x40,d0 | infinity?
- jne L_1229
- bsrl __l_sinf
- jra L_122B
- L_1229:
- cmpb #0x60,d0 | NaN?
- jne L_122A
- bsrl __l_mon_nan
- jra L_122B
- L_122A:
- bsrl __l_snzrinx | assuming a denorm...
- L_122B:
- 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_fintrzx
- __l_fintrzx:
- 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_122C
- bsrl __l_l_sintrz | normalized (regular) number
- jra L_122G
- L_122C:
- cmpb #0x20,d0 | zero?
- jne L_122D
- bsrl __l_szero
- jra L_122G
- L_122D:
- cmpb #0x40,d0 | infinity?
- jne L_122E
- bsrl __l_sinf
- jra L_122G
- L_122E:
- cmpb #0x60,d0 | NaN?
- jne L_122F
- bsrl __l_mon_nan
- jra L_122G
- L_122F:
- bsrl __l_snzrinx | assuming a denorm...
- L_122G:
- 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
- |
- | DYADIC.GEN 1.2 4/30/91
- |
- | DYADIC.GEN --- generic DYADIC 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 a6@(USER_FPCR) 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 updating of the fpsr if you only care about
- | the result.
- | 4. Remove the __l_frems and __l_fremx entry points if your compiler
- | treats everything as doubles.
- | 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_prem
- | xref __l_tag
- .globl __l_frems
- __l_frems:
- link a6,#-LOCAL_SIZE
- moveml d0-d1/a0-a1,a6@(USER_DA)
- fmovemx fp0-fp3,a6@(USER_FP0)
- fmoveml fpsr/fpcr,a6@(USER_FPCR) /* | user's rounding mode/precision */
- fmovel #0,fpcr | force rounding mode/prec to extended,rn
- |
- | copy, convert and tag input arguments
- |
- fmoves a6@(8),fp0
- fmovex fp0,a6@(FPTEMP)
- lea a6@(FPTEMP),a0
- bsrl __l_tag
- moveb d0,a6@(DTAG)
- fmoves a6@(12),fp0
- fmovex fp0,a6@(ETEMP)
- lea a6@(ETEMP),a0
- bsrl __l_tag
- moveb d0,a6@(STAG)
- bsrl __l_prem
- fmovel fpsr,d0 | update status register
- orb a6@(FPSR_AEXCEPT),d0 | add previously accrued exceptions
- swap d0
- orb a6@(FPSR_QBYTE),d0 | pickup sign of quotient byte
- swap d0
- 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_fremd
- __l_fremd:
- link a6,#-LOCAL_SIZE
- moveml d0-d1/a0-a1,a6@(USER_DA)
- fmovemx fp0-fp3,a6@(USER_FP0)
- fmoveml fpsr/fpcr,a6@(USER_FPCR) /* | user's rounding mode/precision */
- fmovel #0,fpcr | force rounding mode/prec to extended,rn
- |
- | copy, convert and tag input arguments
- |
- fmoved a6@(8),fp0
- fmovex fp0,a6@(FPTEMP)
- lea a6@(FPTEMP),a0
- bsrl __l_tag
- moveb d0,a6@(DTAG)
- fmoved a6@(16),fp0
- fmovex fp0,a6@(ETEMP)
- lea a6@(ETEMP),a0
- bsrl __l_tag
- moveb d0,a6@(STAG)
- bsrl __l_prem
- fmovel fpsr,d0 | update status register
- orb a6@(FPSR_AEXCEPT),d0 | add previously accrued exceptions
- swap d0
- orb a6@(FPSR_QBYTE),d0 | pickup sign of quotient byte
- swap d0
- 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_fremx
- __l_fremx:
- link a6,#-LOCAL_SIZE
- moveml d0-d1/a0-a1,a6@(USER_DA)
- fmovemx fp0-fp3,a6@(USER_FP0)
- fmoveml fpsr/fpcr,a6@(USER_FPCR) /* | user's rounding mode/precision */
- fmovel #0,fpcr | force rounding mode/prec to extended,rn
- |
- | copy, convert and tag input arguments
- |
- fmovex a6@(8),fp0
- fmovex fp0,a6@(FPTEMP)
- lea a6@(FPTEMP),a0
- bsrl __l_tag
- moveb d0,a6@(DTAG)
- fmovex a6@(20),fp0
- fmovex fp0,a6@(ETEMP)
- lea a6@(ETEMP),a0
- bsrl __l_tag
- moveb d0,a6@(STAG)
- bsrl __l_prem
- fmovel fpsr,d0 | update status register
- orb a6@(FPSR_AEXCEPT),d0 | add previously accrued exceptions
- swap d0
- orb a6@(FPSR_QBYTE),d0 | pickup sign of quotient byte
- swap d0
- 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
- |
- | DYADIC.GEN 1.2 4/30/91
- |
- | DYADIC.GEN --- generic DYADIC 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 a6@(USER_FPCR) 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 updating of the fpsr if you only care about
- | the result.
- | 4. Remove the __l_fmods and __l_fmodx entry points if your compiler
- | treats everything as doubles.
- | 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_pmod
- | xref __l_tag
- .globl __l_fmods
- __l_fmods:
- link a6,#-LOCAL_SIZE
- moveml d0-d1/a0-a1,a6@(USER_DA)
- fmovemx fp0-fp3,a6@(USER_FP0)
- fmoveml fpsr/fpcr,a6@(USER_FPCR) /* | user's rounding mode/precision */
- fmovel #0,fpcr | force rounding mode/prec to extended,rn
- |
- | copy, convert and tag input arguments
- |
- fmoves a6@(8),fp0
- fmovex fp0,a6@(FPTEMP)
- lea a6@(FPTEMP),a0
- bsrl __l_tag
- moveb d0,a6@(DTAG)
- fmoves a6@(12),fp0
- fmovex fp0,a6@(ETEMP)
- lea a6@(ETEMP),a0
- bsrl __l_tag
- moveb d0,a6@(STAG)
- bsrl __l_pmod
- fmovel fpsr,d0 | update status register
- orb a6@(FPSR_AEXCEPT),d0 | add previously accrued exceptions
- swap d0
- orb a6@(FPSR_QBYTE),d0 | pickup sign of quotient byte
- swap d0
- 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_fmodd
- __l_fmodd:
- link a6,#-LOCAL_SIZE
- moveml d0-d1/a0-a1,a6@(USER_DA)
- fmovemx fp0-fp3,a6@(USER_FP0)
- fmoveml fpsr/fpcr,a6@(USER_FPCR) /* | user's rounding mode/precision */
- fmovel #0,fpcr | force rounding mode/prec to extended,rn
- |
- | copy, convert and tag input arguments
- |
- fmoved a6@(8),fp0
- fmovex fp0,a6@(FPTEMP)
- lea a6@(FPTEMP),a0
- bsrl __l_tag
- moveb d0,a6@(DTAG)
- fmoved a6@(16),fp0
- fmovex fp0,a6@(ETEMP)
- lea a6@(ETEMP),a0
- bsrl __l_tag
- moveb d0,a6@(STAG)
- bsrl __l_pmod
- fmovel fpsr,d0 | update status register
- orb a6@(FPSR_AEXCEPT),d0 | add previously accrued exceptions
- swap d0
- orb a6@(FPSR_QBYTE),d0 | pickup sign of quotient byte
- swap d0
- 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_fmodx
- __l_fmodx:
- link a6,#-LOCAL_SIZE
- moveml d0-d1/a0-a1,a6@(USER_DA)
- fmovemx fp0-fp3,a6@(USER_FP0)
- fmoveml fpsr/fpcr,a6@(USER_FPCR) /* | user's rounding mode/precision */
- fmovel #0,fpcr | force rounding mode/prec to extended,rn
- |
- | copy, convert and tag input arguments
- |
- fmovex a6@(8),fp0
- fmovex fp0,a6@(FPTEMP)
- lea a6@(FPTEMP),a0
- bsrl __l_tag
- moveb d0,a6@(DTAG)
- fmovex a6@(20),fp0
- fmovex fp0,a6@(ETEMP)
- lea a6@(ETEMP),a0
- bsrl __l_tag
- moveb d0,a6@(STAG)
- bsrl __l_pmod
- fmovel fpsr,d0 | update status register
- orb a6@(FPSR_AEXCEPT),d0 | add previously accrued exceptions
- swap d0
- orb a6@(FPSR_QBYTE),d0 | pickup sign of quotient byte
- swap d0
- 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
- |
- | DYADIC.GEN 1.2 4/30/91
- |
- | DYADIC.GEN --- generic DYADIC 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 a6@(USER_FPCR) 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 updating of the fpsr if you only care about
- | the result.
- | 4. Remove the __l_fscales and __l_fscalex entry points if your compiler
- | treats everything as doubles.
- | 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_pscale
- | xref __l_tag
- .globl __l_fscales
- __l_fscales:
- link a6,#-LOCAL_SIZE
- moveml d0-d1/a0-a1,a6@(USER_DA)
- fmovemx fp0-fp3,a6@(USER_FP0)
- fmoveml fpsr/fpcr,a6@(USER_FPCR) /* | user's rounding mode/precision */
- fmovel #0,fpcr | force rounding mode/prec to extended,rn
- |
- | copy, convert and tag input arguments
- |
- fmoves a6@(8),fp0
- fmovex fp0,a6@(FPTEMP)
- lea a6@(FPTEMP),a0
- bsrl __l_tag
- moveb d0,a6@(DTAG)
- fmoves a6@(12),fp0
- fmovex fp0,a6@(ETEMP)
- lea a6@(ETEMP),a0
- bsrl __l_tag
- moveb d0,a6@(STAG)
- bsrl __l_pscale
- fmovel fpsr,d0 | update status register
- orb a6@(FPSR_AEXCEPT),d0 | add previously accrued exceptions
- swap d0
- orb a6@(FPSR_QBYTE),d0 | pickup sign of quotient byte
- swap d0
- 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_fscaled
- __l_fscaled:
- link a6,#-LOCAL_SIZE
- moveml d0-d1/a0-a1,a6@(USER_DA)
- fmovemx fp0-fp3,a6@(USER_FP0)
- fmoveml fpsr/fpcr,a6@(USER_FPCR) /* | user's rounding mode/precision */
- fmovel #0,fpcr | force rounding mode/prec to extended,rn
- |
- | copy, convert and tag input arguments
- |
- fmoved a6@(8),fp0
- fmovex fp0,a6@(FPTEMP)
- lea a6@(FPTEMP),a0
- bsrl __l_tag
- moveb d0,a6@(DTAG)
- fmoved a6@(16),fp0
- fmovex fp0,a6@(ETEMP)
- lea a6@(ETEMP),a0
- bsrl __l_tag
- moveb d0,a6@(STAG)
- bsrl __l_pscale
- fmovel fpsr,d0 | update status register
- orb a6@(FPSR_AEXCEPT),d0 | add previously accrued exceptions
- swap d0
- orb a6@(FPSR_QBYTE),d0 | pickup sign of quotient byte
- swap d0
- 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_fscalex
- __l_fscalex:
- link a6,#-LOCAL_SIZE
- moveml d0-d1/a0-a1,a6@(USER_DA)
- fmovemx fp0-fp3,a6@(USER_FP0)
- fmoveml fpsr/fpcr,a6@(USER_FPCR) /* | user's rounding mode/precision */
- fmovel #0,fpcr | force rounding mode/prec to extended,rn
- |
- | copy, convert and tag input arguments
- |
- fmovex a6@(8),fp0
- fmovex fp0,a6@(FPTEMP)
- lea a6@(FPTEMP),a0
- bsrl __l_tag
- moveb d0,a6@(DTAG)
- fmovex a6@(20),fp0
- fmovex fp0,a6@(ETEMP)
- lea a6@(ETEMP),a0
- bsrl __l_tag
- moveb d0,a6@(STAG)
- bsrl __l_pscale
- fmovel fpsr,d0 | update status register
- orb a6@(FPSR_AEXCEPT),d0 | add previously accrued exceptions
- swap d0
- orb a6@(FPSR_QBYTE),d0 | pickup sign of quotient byte
- swap d0
- 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_fabss and __l_fabsx 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_sabs
- | xref __l_sabs
- | xref __l_sabs
- | xref __l_sabs
- | xref __l_sabs
- .globl __l_fabss
- __l_fabss:
- 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_1262
- bsrl __l_sabs | normalized (regular) number
- jra L_1266
- L_1262:
- cmpb #0x20,d0 | zero?
- jne L_1263
- bsrl __l_sabs
- jra L_1266
- L_1263:
- cmpb #0x40,d0 | infinity?
- jne L_1264
- bsrl __l_sabs
- jra L_1266
- L_1264:
- cmpb #0x60,d0 | NaN?
- jne L_1265
- bsrl __l_sabs
- jra L_1266
- L_1265:
- bsrl __l_sabs | assuming a denorm...
- L_1266:
- 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_fabsd
- __l_fabsd:
- 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_1267
- bsrl __l_sabs | normalized (regular) number
- jra L_126B
- L_1267:
- cmpb #0x20,d0 | zero?
- jne L_1268
- bsrl __l_sabs
- jra L_126B
- L_1268:
- cmpb #0x40,d0 | infinity?
- jne L_1269
- bsrl __l_sabs
- jra L_126B
- L_1269:
- cmpb #0x60,d0 | NaN?
- jne L_126A
- bsrl __l_sabs
- jra L_126B
- L_126A:
- bsrl __l_sabs | assuming a denorm...
- L_126B:
- 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_fabsx
- __l_fabsx:
- 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_126C
- bsrl __l_sabs | normalized (regular) number
- jra L_126G
- L_126C:
- cmpb #0x20,d0 | zero?
- jne L_126D
- bsrl __l_sabs
- jra L_126G
- L_126D:
- cmpb #0x40,d0 | infinity?
- jne L_126E
- bsrl __l_sabs
- jra L_126G
- L_126E:
- cmpb #0x60,d0 | NaN?
- jne L_126F
- bsrl __l_sabs
- jra L_126G
- L_126F:
- bsrl __l_sabs | assuming a denorm...
- L_126G:
- 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_fnegs and __l_fnegx 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_sneg
- | xref __l_sneg
- | xref __l_sneg
- | xref __l_sneg
- | xref __l_sneg
- .globl __l_fnegs
- __l_fnegs:
- 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_1272
- bsrl __l_sneg | normalized (regular) number
- jra L_1276
- L_1272:
- cmpb #0x20,d0 | zero?
- jne L_1273
- bsrl __l_sneg
- jra L_1276
- L_1273:
- cmpb #0x40,d0 | infinity?
- jne L_1274
- bsrl __l_sneg
- jra L_1276
- L_1274:
- cmpb #0x60,d0 | NaN?
- jne L_1275
- bsrl __l_sneg
- jra L_1276
- L_1275:
- bsrl __l_sneg | assuming a denorm...
- L_1276:
- 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_fnegd
- __l_fnegd:
- 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_1277
- bsrl __l_sneg | normalized (regular) number
- jra L_127B
- L_1277:
- cmpb #0x20,d0 | zero?
- jne L_1278
- bsrl __l_sneg
- jra L_127B
- L_1278:
- cmpb #0x40,d0 | infinity?
- jne L_1279
- bsrl __l_sneg
- jra L_127B
- L_1279:
- cmpb #0x60,d0 | NaN?
- jne L_127A
- bsrl __l_sneg
- jra L_127B
- L_127A:
- bsrl __l_sneg | assuming a denorm...
- L_127B:
- 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_fnegx
- __l_fnegx:
- 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_127C
- bsrl __l_sneg | normalized (regular) number
- jra L_127G
- L_127C:
- cmpb #0x20,d0 | zero?
- jne L_127D
- bsrl __l_sneg
- jra L_127G
- L_127D:
- cmpb #0x40,d0 | infinity?
- jne L_127E
- bsrl __l_sneg
- jra L_127G
- L_127E:
- cmpb #0x60,d0 | NaN?
- jne L_127F
- bsrl __l_sneg
- jra L_127G
- L_127F:
- bsrl __l_sneg | assuming a denorm...
- L_127G:
- 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_fsqrts and __l_fsqrtx 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_ssqrt
- | xref __l_ssqrt
- | xref __l_ssqrt
- | xref __l_ssqrt
- | xref __l_ssqrt
- .globl __l_fsqrts
- __l_fsqrts:
- 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_1282
- bsrl __l_ssqrt | normalized (regular) number
- jra L_1286
- L_1282:
- cmpb #0x20,d0 | zero?
- jne L_1283
- bsrl __l_ssqrt
- jra L_1286
- L_1283:
- cmpb #0x40,d0 | infinity?
- jne L_1284
- bsrl __l_ssqrt
- jra L_1286
- L_1284:
- cmpb #0x60,d0 | NaN?
- jne L_1285
- bsrl __l_ssqrt
- jra L_1286
- L_1285:
- bsrl __l_ssqrt | assuming a denorm...
- L_1286:
- 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_fsqrtd
- __l_fsqrtd:
- 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_1287
- bsrl __l_ssqrt | normalized (regular) number
- jra L_128B
- L_1287:
- cmpb #0x20,d0 | zero?
- jne L_1288
- bsrl __l_ssqrt
- jra L_128B
- L_1288:
- cmpb #0x40,d0 | infinity?
- jne L_1289
- bsrl __l_ssqrt
- jra L_128B
- L_1289:
- cmpb #0x60,d0 | NaN?
- jne L_128A
- bsrl __l_ssqrt
- jra L_128B
- L_128A:
- bsrl __l_ssqrt | assuming a denorm...
- L_128B:
- 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_fsqrtx
- __l_fsqrtx:
- 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_128C
- bsrl __l_ssqrt | normalized (regular) number
- jra L_128G
- L_128C:
- cmpb #0x20,d0 | zero?
- jne L_128D
- bsrl __l_ssqrt
- jra L_128G
- L_128D:
- cmpb #0x40,d0 | infinity?
- jne L_128E
- bsrl __l_ssqrt
- jra L_128G
- L_128E:
- cmpb #0x60,d0 | NaN?
- jne L_128F
- bsrl __l_ssqrt
- jra L_128G
- L_128F:
- bsrl __l_ssqrt | assuming a denorm...
- L_128G:
- 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
- |
- | DYADIC.GEN 1.2 4/30/91
- |
- | DYADIC.GEN --- generic DYADIC 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 a6@(USER_FPCR) 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 updating of the fpsr if you only care about
- | the result.
- | 4. Remove the __l_fadds and __l_faddx entry points if your compiler
- | treats everything as doubles.
- | 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_sadd
- | xref __l_tag
- .globl __l_fadds
- __l_fadds:
- link a6,#-LOCAL_SIZE
- moveml d0-d1/a0-a1,a6@(USER_DA)
- fmovemx fp0-fp3,a6@(USER_FP0)
- fmoveml fpsr/fpcr,a6@(USER_FPCR) /* | user's rounding mode/precision */
- fmovel #0,fpcr | force rounding mode/prec to extended,rn
- |
- | copy, convert and tag input arguments
- |
- fmoves a6@(8),fp0
- fmovex fp0,a6@(FPTEMP)
- lea a6@(FPTEMP),a0
- bsrl __l_tag
- moveb d0,a6@(DTAG)
- fmoves a6@(12),fp0
- fmovex fp0,a6@(ETEMP)
- lea a6@(ETEMP),a0
- bsrl __l_tag
- moveb d0,a6@(STAG)
- bsrl __l_sadd
- fmovel fpsr,d0 | update status register
- orb a6@(FPSR_AEXCEPT),d0 | add previously accrued exceptions
- swap d0
- orb a6@(FPSR_QBYTE),d0 | pickup sign of quotient byte
- swap d0
- 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_faddd
- __l_faddd:
- link a6,#-LOCAL_SIZE
- moveml d0-d1/a0-a1,a6@(USER_DA)
- fmovemx fp0-fp3,a6@(USER_FP0)
- fmoveml fpsr/fpcr,a6@(USER_FPCR) /* | user's rounding mode/precision */
- fmovel #0,fpcr | force rounding mode/prec to extended,rn
- |
- | copy, convert and tag input arguments
- |
- fmoved a6@(8),fp0
- fmovex fp0,a6@(FPTEMP)
- lea a6@(FPTEMP),a0
- bsrl __l_tag
- moveb d0,a6@(DTAG)
- fmoved a6@(16),fp0
- fmovex fp0,a6@(ETEMP)
- lea a6@(ETEMP),a0
- bsrl __l_tag
- moveb d0,a6@(STAG)
- bsrl __l_sadd
- fmovel fpsr,d0 | update status register
- orb a6@(FPSR_AEXCEPT),d0 | add previously accrued exceptions
- swap d0
- orb a6@(FPSR_QBYTE),d0 | pickup sign of quotient byte
- swap d0
- 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_faddx
- __l_faddx:
- link a6,#-LOCAL_SIZE
- moveml d0-d1/a0-a1,a6@(USER_DA)
- fmovemx fp0-fp3,a6@(USER_FP0)
- fmoveml fpsr/fpcr,a6@(USER_FPCR) /* | user's rounding mode/precision */
- fmovel #0,fpcr | force rounding mode/prec to extended,rn
- |
- | copy, convert and tag input arguments
- |
- fmovex a6@(8),fp0
- fmovex fp0,a6@(FPTEMP)
- lea a6@(FPTEMP),a0
- bsrl __l_tag
- moveb d0,a6@(DTAG)
- fmovex a6@(20),fp0
- fmovex fp0,a6@(ETEMP)
- lea a6@(ETEMP),a0
- bsrl __l_tag
- moveb d0,a6@(STAG)
- bsrl __l_sadd
- fmovel fpsr,d0 | update status register
- orb a6@(FPSR_AEXCEPT),d0 | add previously accrued exceptions
- swap d0
- orb a6@(FPSR_QBYTE),d0 | pickup sign of quotient byte
- swap d0
- 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
- |
- | DYADIC.GEN 1.2 4/30/91
- |
- | DYADIC.GEN --- generic DYADIC 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 a6@(USER_FPCR) 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 updating of the fpsr if you only care about
- | the result.
- | 4. Remove the __l_fsubs and __l_fsubx entry points if your compiler
- | treats everything as doubles.
- | 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_ssub
- | xref __l_tag
- .globl __l_fsubs
- __l_fsubs:
- link a6,#-LOCAL_SIZE
- moveml d0-d1/a0-a1,a6@(USER_DA)
- fmovemx fp0-fp3,a6@(USER_FP0)
- fmoveml fpsr/fpcr,a6@(USER_FPCR) /* | user's rounding mode/precision */
- fmovel #0,fpcr | force rounding mode/prec to extended,rn
- |
- | copy, convert and tag input arguments
- |
- fmoves a6@(8),fp0
- fmovex fp0,a6@(FPTEMP)
- lea a6@(FPTEMP),a0
- bsrl __l_tag
- moveb d0,a6@(DTAG)
- fmoves a6@(12),fp0
- fmovex fp0,a6@(ETEMP)
- lea a6@(ETEMP),a0
- bsrl __l_tag
- moveb d0,a6@(STAG)
- bsrl __l_ssub
- fmovel fpsr,d0 | update status register
- orb a6@(FPSR_AEXCEPT),d0 | add previously accrued exceptions
- swap d0
- orb a6@(FPSR_QBYTE),d0 | pickup sign of quotient byte
- swap d0
- 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_fsubd
- __l_fsubd:
- link a6,#-LOCAL_SIZE
- moveml d0-d1/a0-a1,a6@(USER_DA)
- fmovemx fp0-fp3,a6@(USER_FP0)
- fmoveml fpsr/fpcr,a6@(USER_FPCR) /* | user's rounding mode/precision */
- fmovel #0,fpcr | force rounding mode/prec to extended,rn
- |
- | copy, convert and tag input arguments
- |
- fmoved a6@(8),fp0
- fmovex fp0,a6@(FPTEMP)
- lea a6@(FPTEMP),a0
- bsrl __l_tag
- moveb d0,a6@(DTAG)
- fmoved a6@(16),fp0
- fmovex fp0,a6@(ETEMP)
- lea a6@(ETEMP),a0
- bsrl __l_tag
- moveb d0,a6@(STAG)
- bsrl __l_ssub
- fmovel fpsr,d0 | update status register
- orb a6@(FPSR_AEXCEPT),d0 | add previously accrued exceptions
- swap d0
- orb a6@(FPSR_QBYTE),d0 | pickup sign of quotient byte
- swap d0
- 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_fsubx
- __l_fsubx:
- link a6,#-LOCAL_SIZE
- moveml d0-d1/a0-a1,a6@(USER_DA)
- fmovemx fp0-fp3,a6@(USER_FP0)
- fmoveml fpsr/fpcr,a6@(USER_FPCR) /* | user's rounding mode/precision */
- fmovel #0,fpcr | force rounding mode/prec to extended,rn
- |
- | copy, convert and tag input arguments
- |
- fmovex a6@(8),fp0
- fmovex fp0,a6@(FPTEMP)
- lea a6@(FPTEMP),a0
- bsrl __l_tag
- moveb d0,a6@(DTAG)
- fmovex a6@(20),fp0
- fmovex fp0,a6@(ETEMP)
- lea a6@(ETEMP),a0
- bsrl __l_tag
- moveb d0,a6@(STAG)
- bsrl __l_ssub
- fmovel fpsr,d0 | update status register
- orb a6@(FPSR_AEXCEPT),d0 | add previously accrued exceptions
- swap d0
- orb a6@(FPSR_QBYTE),d0 | pickup sign of quotient byte
- swap d0
- 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
- |
- | DYADIC.GEN 1.2 4/30/91
- |
- | DYADIC.GEN --- generic DYADIC 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 a6@(USER_FPCR) 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 updating of the fpsr if you only care about
- | the result.
- | 4. Remove the __l_fmuls and __l_fmulx entry points if your compiler
- | treats everything as doubles.
- | 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_smul
- | xref __l_tag
- .globl __l_fmuls
- __l_fmuls:
- link a6,#-LOCAL_SIZE
- moveml d0-d1/a0-a1,a6@(USER_DA)
- fmovemx fp0-fp3,a6@(USER_FP0)
- fmoveml fpsr/fpcr,a6@(USER_FPCR) /* | user's rounding mode/precision */
- fmovel #0,fpcr | force rounding mode/prec to extended,rn
- |
- | copy, convert and tag input arguments
- |
- fmoves a6@(8),fp0
- fmovex fp0,a6@(FPTEMP)
- lea a6@(FPTEMP),a0
- bsrl __l_tag
- moveb d0,a6@(DTAG)
- fmoves a6@(12),fp0
- fmovex fp0,a6@(ETEMP)
- lea a6@(ETEMP),a0
- bsrl __l_tag
- moveb d0,a6@(STAG)
- bsrl __l_smul
- fmovel fpsr,d0 | update status register
- orb a6@(FPSR_AEXCEPT),d0 | add previously accrued exceptions
- swap d0
- orb a6@(FPSR_QBYTE),d0 | pickup sign of quotient byte
- swap d0
- 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_fmuld
- __l_fmuld:
- link a6,#-LOCAL_SIZE
- moveml d0-d1/a0-a1,a6@(USER_DA)
- fmovemx fp0-fp3,a6@(USER_FP0)
- fmoveml fpsr/fpcr,a6@(USER_FPCR) /* | user's rounding mode/precision */
- fmovel #0,fpcr | force rounding mode/prec to extended,rn
- |
- | copy, convert and tag input arguments
- |
- fmoved a6@(8),fp0
- fmovex fp0,a6@(FPTEMP)
- lea a6@(FPTEMP),a0
- bsrl __l_tag
- moveb d0,a6@(DTAG)
- fmoved a6@(16),fp0
- fmovex fp0,a6@(ETEMP)
- lea a6@(ETEMP),a0
- bsrl __l_tag
- moveb d0,a6@(STAG)
- bsrl __l_smul
- fmovel fpsr,d0 | update status register
- orb a6@(FPSR_AEXCEPT),d0 | add previously accrued exceptions
- swap d0
- orb a6@(FPSR_QBYTE),d0 | pickup sign of quotient byte
- swap d0
- 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_fmulx
- __l_fmulx:
- link a6,#-LOCAL_SIZE
- moveml d0-d1/a0-a1,a6@(USER_DA)
- fmovemx fp0-fp3,a6@(USER_FP0)
- fmoveml fpsr/fpcr,a6@(USER_FPCR) /* | user's rounding mode/precision */
- fmovel #0,fpcr | force rounding mode/prec to extended,rn
- |
- | copy, convert and tag input arguments
- |
- fmovex a6@(8),fp0
- fmovex fp0,a6@(FPTEMP)
- lea a6@(FPTEMP),a0
- bsrl __l_tag
- moveb d0,a6@(DTAG)
- fmovex a6@(20),fp0
- fmovex fp0,a6@(ETEMP)
- lea a6@(ETEMP),a0
- bsrl __l_tag
- moveb d0,a6@(STAG)
- bsrl __l_smul
- fmovel fpsr,d0 | update status register
- orb a6@(FPSR_AEXCEPT),d0 | add previously accrued exceptions
- swap d0
- orb a6@(FPSR_QBYTE),d0 | pickup sign of quotient byte
- swap d0
- 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
- |
- | DYADIC.GEN 1.2 4/30/91
- |
- | DYADIC.GEN --- generic DYADIC 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 a6@(USER_FPCR) 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 updating of the fpsr if you only care about
- | the result.
- | 4. Remove the __l_fdivs and __l_fdivx entry points if your compiler
- | treats everything as doubles.
- | 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_sdiv
- | xref __l_tag
- .globl __l_fdivs
- __l_fdivs:
- link a6,#-LOCAL_SIZE
- moveml d0-d1/a0-a1,a6@(USER_DA)
- fmovemx fp0-fp3,a6@(USER_FP0)
- fmoveml fpsr/fpcr,a6@(USER_FPCR) /* | user's rounding mode/precision */
- fmovel #0,fpcr | force rounding mode/prec to extended,rn
- |
- | copy, convert and tag input arguments
- |
- fmoves a6@(8),fp0
- fmovex fp0,a6@(FPTEMP)
- lea a6@(FPTEMP),a0
- bsrl __l_tag
- moveb d0,a6@(DTAG)
- fmoves a6@(12),fp0
- fmovex fp0,a6@(ETEMP)
- lea a6@(ETEMP),a0
- bsrl __l_tag
- moveb d0,a6@(STAG)
- bsrl __l_sdiv
- fmovel fpsr,d0 | update status register
- orb a6@(FPSR_AEXCEPT),d0 | add previously accrued exceptions
- swap d0
- orb a6@(FPSR_QBYTE),d0 | pickup sign of quotient byte
- swap d0
- 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_fdivd
- __l_fdivd:
- link a6,#-LOCAL_SIZE
- moveml d0-d1/a0-a1,a6@(USER_DA)
- fmovemx fp0-fp3,a6@(USER_FP0)
- fmoveml fpsr/fpcr,a6@(USER_FPCR) /* | user's rounding mode/precision */
- fmovel #0,fpcr | force rounding mode/prec to extended,rn
- |
- | copy, convert and tag input arguments
- |
- fmoved a6@(8),fp0
- fmovex fp0,a6@(FPTEMP)
- lea a6@(FPTEMP),a0
- bsrl __l_tag
- moveb d0,a6@(DTAG)
- fmoved a6@(16),fp0
- fmovex fp0,a6@(ETEMP)
- lea a6@(ETEMP),a0
- bsrl __l_tag
- moveb d0,a6@(STAG)
- bsrl __l_sdiv
- fmovel fpsr,d0 | update status register
- orb a6@(FPSR_AEXCEPT),d0 | add previously accrued exceptions
- swap d0
- orb a6@(FPSR_QBYTE),d0 | pickup sign of quotient byte
- swap d0
- 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_fdivx
- __l_fdivx:
- link a6,#-LOCAL_SIZE
- moveml d0-d1/a0-a1,a6@(USER_DA)
- fmovemx fp0-fp3,a6@(USER_FP0)
- fmoveml fpsr/fpcr,a6@(USER_FPCR) /* | user's rounding mode/precision */
- fmovel #0,fpcr | force rounding mode/prec to extended,rn
- |
- | copy, convert and tag input arguments
- |
- fmovex a6@(8),fp0
- fmovex fp0,a6@(FPTEMP)
- lea a6@(FPTEMP),a0
- bsrl __l_tag
- moveb d0,a6@(DTAG)
- fmovex a6@(20),fp0
- fmovex fp0,a6@(ETEMP)
- lea a6@(ETEMP),a0
- bsrl __l_tag
- moveb d0,a6@(STAG)
- bsrl __l_sdiv
- fmovel fpsr,d0 | update status register
- orb a6@(FPSR_AEXCEPT),d0 | add previously accrued exceptions
- swap d0
- orb a6@(FPSR_QBYTE),d0 | pickup sign of quotient byte
- swap d0
- 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
- | end