Lines Matching refs:l

920 	bsr.l		load_fpn2		# load dst into FP_DST
923 bsr.l set_tag_x # tag the operand type
926 bsr.l unnorm_fix # yes; convert to NORM,DENORM,or ZERO
932 #$# mov.l FP_SRC_EX(%a6),TRAP_SRCOP_EX(%a6)
933 #$# mov.l FP_SRC_HI(%a6),TRAP_SRCOP_HI(%a6)
934 #$# mov.l FP_SRC_LO(%a6),TRAP_SRCOP_LO(%a6)
935 #$# mov.l FP_DST_EX(%a6),TRAP_DSTOP_EX(%a6)
936 #$# mov.l FP_DST_HI(%a6),TRAP_DSTOP_HI(%a6)
937 #$# mov.l FP_DST_LO(%a6),TRAP_DSTOP_LO(%a6)
939 clr.l %d0
945 andi.l &0x00ff01ff,USER_FPSR(%a6)
947 fmov.l &0x0,%fpcr # zero current control regs
948 fmov.l &0x0,%fpsr
954 mov.l (tbl_unsupp.l,%pc,%d1.w*4),%d1 # fetch routine addr
955 jsr (tbl_unsupp.l,%pc,%d1.l*1)
958 bsr.l store_fpreg
981 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
982 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
985 #$# add.l &24,%sp
986 bra.l _fpsp_done
1224 mov.l %a0,EXC_A7(%a6) # save on stack
1231 mov.l USER_FPIAR(%a6),EXC_EXTWPTR(%a6)
1232 mov.l EXC_EXTWPTR(%a6),%a0 # fetch instruction addr
1233 addq.l &0x4,EXC_EXTWPTR(%a6) # incr instruction ptr
1234 bsr.l _imem_read_long # fetch the instruction words
1235 mov.l %d0,EXC_OPWORD(%a6) # store OPWORD and EXTWORD
1269 bsr.l set_tag_x # tag the operand type
1272 bsr.l unnorm_fix # yes; convert to NORM,DENORM,or ZERO
1333 bsr.l store_fpreg # store the result
1338 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
1339 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
1343 bra.l _fpsp_done
1384 subi.l &24,%d0 # fix offset to be 0-8
1398 mov.l %d0,-(%sp) # save d0
1399 bsr.l funimp_skew # skew sgl or dbl inputs
1400 mov.l (%sp)+,%d0 # restore d0
1405 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
1406 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
1412 bra.l _fpsp_done
1448 andi.l &0x7fffffff,LOCAL_HI(%a0) # clear j-bit
1480 tst.l LOCAL_LO(%a0) # is it a zero?
1484 bsr.l norm # normalize mantissa
1509 and.l &0xffff00ff,USER_FPSR(%a6) # zero exception field
1511 fmov.l &0x0,%fpcr # zero current control regs
1512 fmov.l &0x0,%fpsr
1521 bsr.l unnorm_fix # yes; fix it
1530 clr.l %d0
1535 mov.l (%a6),EXC_A6(%a6) # in case a6 changes
1536 bsr.l fout # call fmove out routine
1541 # OPERR : fmove.{b,w,l} out of large UNNORM
1565 mov.l EXC_A7(%a6),%a0 # restore a7
1566 mov.l %a0,%usp
1570 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
1571 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
1578 bra.l _fpsp_done
1677 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
1678 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
1688 bra.l _real_snan
1692 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
1693 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
1703 bra.l _real_operr
1709 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
1710 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
1719 bra.l _real_ovfl
1762 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
1763 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
1770 mov.l (%a6),%a6 # restore frame pointer
1772 mov.l LOCAL_SIZE+EXC_SR(%sp),LOCAL_SIZE+EXC_SR-0xc(%sp)
1773 mov.l LOCAL_SIZE+2+EXC_PC(%sp),LOCAL_SIZE+2+EXC_PC-0xc(%sp)
1774 mov.l LOCAL_SIZE+EXC_EA(%sp),LOCAL_SIZE+EXC_EA-0xc(%sp)
1777 mov.l LOCAL_SIZE+FP_SRC_EX(%sp),LOCAL_SIZE+EXC_SR+0x0(%sp)
1778 mov.l LOCAL_SIZE+FP_SRC_HI(%sp),LOCAL_SIZE+EXC_SR+0x4(%sp)
1779 mov.l LOCAL_SIZE+FP_SRC_LO(%sp),LOCAL_SIZE+EXC_SR+0x8(%sp)
1781 add.l &LOCAL_SIZE-0x8,%sp
1783 bra.l _real_unfl
1790 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
1791 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
1801 bra.l _real_inex
1831 bsr.l load_fpn2 # load dst into FP_DST
1834 bsr.l set_tag_x # tag the operand type
1837 bsr.l unnorm_fix # yes; convert to NORM,DENORM,or ZERO
1842 clr.l %d0
1850 mov.l (tbl_unsupp.l,%pc,%d1.l*4),%d1 # fetch routine addr
1851 jsr (tbl_unsupp.l,%pc,%d1.l*1)
1878 bsr.l store_fpreg # store the result
1885 mov.l EXC_A7(%a6),%a0 # update user a7
1886 mov.l %a0,%usp
1890 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
1891 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
1898 bra.l _fpsp_done # exit to os
1914 mov.l 0x4(%sp),0x10(%sp)
1915 mov.l 0x0(%sp),0xc(%sp)
1916 add.l &0xc,%sp
1921 bra.l _fpsp_done # exit to os
1962 subi.l &24,%d0 # fix offset to be 0-8
1982 mov.l EXC_A7(%a6),%a0 # update user a7
1983 mov.l %a0,%usp
1989 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
1990 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
1999 bra.l _fpsp_done
2020 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
2021 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
2028 mov.l 0x4(%sp),0x10(%sp)
2029 mov.l 0x0(%sp),0xc(%sp)
2030 add.l &0xc,%sp
2035 bra.l _fpsp_done # exit to os
2056 fmov.l %fpiar,0x8(%sp)
2058 bra.l _real_trace
2068 and.l &0xffff00ff,USER_FPSR(%a6) # zero exception field
2070 fmov.l &0x0,%fpcr # zero current control regs
2071 fmov.l &0x0,%fpsr
2074 bsr.l load_fpn1
2079 bsr.l set_tag_x # tag the operand type
2082 bsr.l unnorm_fix # yes; convert to NORM,DENORM,or ZERO
2087 clr.l %d0
2092 mov.l (%a6),EXC_A6(%a6) # in case a6 changes
2093 bsr.l fout # call fmove out routine
2111 mov.l EXC_A6(%a6),(%a6) # restore a6
2116 mov.l EXC_A7(%a6),%a0 # update user a7
2117 mov.l %a0,%usp
2121 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
2122 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
2129 bra.l _fpsp_done # exit to os
2204 mov.l LOCAL_SIZE+FP_DST_EX(%sp),LOCAL_SIZE+0x4(%sp)
2205 mov.l LOCAL_SIZE+FP_DST_HI(%sp),LOCAL_SIZE+0x8(%sp)
2206 mov.l LOCAL_SIZE+FP_DST_LO(%sp),LOCAL_SIZE+0xc(%sp)
2208 add.l &LOCAL_SIZE-0x8,%sp
2211 bra.l _real_snan
2217 mov.l EXC_A7(%a6),%a0
2218 mov.l %a0,%usp
2229 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
2230 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
2237 mov.l (%a6),%a6 # restore frame pointer
2239 mov.l LOCAL_SIZE+EXC_SR(%sp),LOCAL_SIZE+EXC_SR-0xc(%sp)
2240 mov.l LOCAL_SIZE+2+EXC_PC(%sp),LOCAL_SIZE+2+EXC_PC-0xc(%sp)
2241 mov.l LOCAL_SIZE+EXC_EA(%sp),LOCAL_SIZE+EXC_EA-0xc(%sp)
2284 mov.l LOCAL_SIZE+FP_DST_EX(%sp),LOCAL_SIZE+0x4(%sp)
2285 mov.l LOCAL_SIZE+FP_DST_HI(%sp),LOCAL_SIZE+0x8(%sp)
2286 mov.l LOCAL_SIZE+FP_DST_LO(%sp),LOCAL_SIZE+0xc(%sp)
2288 add.l &LOCAL_SIZE-0x8,%sp
2291 bra.l _real_inex
2502 andi.l &0x00ff00ff,USER_FPSR(%a6)
2508 mov.l EXC_EXTWPTR(%a6),%a0 # pass: ptr to #<data>
2510 mov.l &0xc,%d0 # pass: 12 bytes
2511 bsr.l _imem_read # read extended immediate
2513 tst.l %d1 # did ifetch fail?
2520 mov.l EXC_EXTWPTR(%a6),%a0 # pass: ptr to #<data>
2522 mov.l &0xc,%d0 # pass: 12 bytes
2523 bsr.l _imem_read # read packed operand
2525 tst.l %d1 # did ifetch fail?
2630 bsr.l store_fpreg # store the result
2633 mov.l EXC_PC(%a6),USER_FPIAR(%a6) # set FPIAR to "Current PC"
2634 mov.l EXC_EXTWPTR(%a6),EXC_PC(%a6) # set "Next PC" in exc frame
2637 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
2638 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
2645 bra.l _fpsp_done # exit to os
2665 subi.l &24,%d0 # fix offset to be 0-8
2693 mov.l EXC_PC(%a6),USER_FPIAR(%a6) # set FPIAR to "Current PC"
2694 mov.l EXC_EXTWPTR(%a6),EXC_PC(%a6) # set "Next PC" in exc frame
2697 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
2698 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
2707 bra.l _fpsp_done # exit to os
2727 mov.l (%sp),-(%sp) # shift stack frame "down"
2730 fmov.l %fpiar,0x8(%sp) # "Current PC" is in FPIAR
2732 bra.l _real_trace
2745 mov.l %usp,%a0
2746 mov.l %a0,EXC_A7(%a6) # store current a7
2747 bsr.l fmovm_dynamic # do dynamic fmovm
2748 mov.l EXC_A7(%a6),%a0 # load possibly new a7
2749 mov.l %a0,%usp # update usp
2755 mov.l %a0,EXC_A7(%a6)
2756 bsr.l fmovm_dynamic # do dynamic fmovm
2772 mov.l EXC_EXTWPTR(%a6),(EXC_PC,%a6,%d0)
2776 mov.l %a0,EXC_SR(%a6)
2779 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
2780 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
2783 mov.l (%sp)+,%sp
2784 bra.l _fpsp_done
2788 mov.l EXC_EXTWPTR(%a6),(EXC_PC-0x4,%a6,%d0)
2790 mov.l EXC_PC(%a6),(EXC_VOFF+0x2-0x4,%a6,%d0)
2793 mov.l %a0,EXC_SR(%a6)
2796 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
2797 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
2800 mov.l (%sp)+,%sp
2801 bra.l _real_trace
2809 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
2810 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
2812 mov.l (%a6),-(%sp) # make a copy of a6
2813 mov.l %d0,-(%sp) # save d0
2814 mov.l %d1,-(%sp) # save d1
2815 mov.l EXC_EXTWPTR(%a6),-(%sp) # make a copy of Next PC
2817 clr.l %d0
2819 neg.l %d0 # get negative of size
2825 mov.l EXC_PC(%a6),(EXC_VOFF-0x2,%a6,%d0)
2826 mov.l (%sp)+,(EXC_PC-0x4,%a6,%d0)
2834 mov.l (%sp)+,(EXC_PC,%a6,%d0)
2840 clr.l %d1
2846 addi.l &0xc,%d0
2851 addi.l &0xc,%d0
2856 addi.l &0xc,%d0
2861 addi.l &0xc,%d0
2866 addi.l &0xc,%d0
2871 addi.l &0xc,%d0
2876 addi.l &0xc,%d0
2882 mov.l 0x4(%sp),%d1
2883 mov.l 0x8(%sp),%d0
2884 mov.l 0xc(%sp),%a6
2885 mov.l (%sp)+,%sp
2888 beq.l _fpsp_done
2889 bra.l _real_trace
2894 bsr.l fmovm_ctrl # load ctrl regs
2898 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
2899 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
2904 mov.l EXC_EXTWPTR(%a6),EXC_PC(%a6) # set Next PC
2908 bra.l _fpsp_done # exit to os
3112 movm.l &0x0303,EXC_DREGS(%a6) # save d0-d1/a0-a1
3113 fmovm.l %fpcr,%fpsr,%fpiar,USER_FPCR(%a6) # save ctrl regs
3117 mov.l USER_FPIAR(%a6),EXC_EXTWPTR(%a6)
3119 mov.l EXC_EXTWPTR(%a6),%a0 # fetch instruction addr
3120 addq.l &0x4,EXC_EXTWPTR(%a6) # incr instruction ptr
3121 bsr.l _imem_read_long # fetch the instruction words
3122 mov.l %d0,EXC_OPWORD(%a6)
3135 bsr.l fix_skewed_ops # fix src op
3139 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
3140 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
3145 bra.l _real_operr
3208 mov.l EXC_EA(%a6),%a0 # pass: <ea> of default result
3209 bsr.l _dmem_write_byte # write the default result
3211 tst.l %d1 # did dstore fail?
3212 bne.l facc_out_b # yes
3217 bsr.l store_dreg_b # store result to regfile
3224 mov.l EXC_EA(%a6),%a0 # pass: <ea> of default result
3225 bsr.l _dmem_write_word # write the default result
3227 tst.l %d1 # did dstore fail?
3228 bne.l facc_out_w # yes
3233 bsr.l store_dreg_w # store result to regfile
3237 mov.l L_SCR1(%a6),%d0 # load positive default result
3240 mov.l EXC_EA(%a6),%a0 # pass: <ea> of default result
3241 bsr.l _dmem_write_long # write the default result
3243 tst.l %d1 # did dstore fail?
3244 bne.l facc_out_l # yes
3249 bsr.l store_dreg_l # store result to regfile
3264 # store_dreg_{b,w,l}() - store data to data regfile (opclass 3) #
3265 # facc_out_{b,w,l,d,x}() - store to mem took acc error (opcl 3) #
3379 mov.l EXC_EA(%a6),%a0 # pass: <ea> of default result
3380 bsr.l _dmem_write_byte # write the default result
3382 tst.l %d1 # did dstore fail?
3383 bne.l facc_out_b # yes
3388 bsr.l store_dreg_b # store result to regfile
3396 mov.l EXC_EA(%a6),%a0 # pass: <ea> of default result
3397 bsr.l _dmem_write_word # write the default result
3399 tst.l %d1 # did dstore fail?
3400 bne.l facc_out_w # yes
3405 bsr.l store_dreg_w # store result to regfile
3409 mov.l FP_SRC_HI(%a6),%d0 # load upper longword of SNAN
3413 mov.l EXC_EA(%a6),%a0 # pass: <ea> of default result
3414 bsr.l _dmem_write_long # write the default result
3416 tst.l %d1 # did dstore fail?
3417 bne.l facc_out_l # yes
3422 bsr.l store_dreg_l # store result to regfile
3428 mov.l FP_SRC_EX(%a6),%d0 # fetch SNAN sign
3429 andi.l &0x80000000,%d0 # keep sign
3430 ori.l &0x7fc00000,%d0 # insert new exponent,SNAN bit
3431 mov.l FP_SRC_HI(%a6),%d1 # load mantissa
3432 lsr.l &0x8,%d1 # shift mantissa for sgl
3433 or.l %d1,%d0 # create sgl SNAN
3434 mov.l EXC_EA(%a6),%a0 # pass: <ea> of default result
3435 bsr.l _dmem_write_long # write the default result
3437 tst.l %d1 # did dstore fail?
3438 bne.l facc_out_l # yes
3442 mov.l FP_SRC_EX(%a6),%d0 # fetch SNAN sign
3443 andi.l &0x80000000,%d0 # keep sign
3444 ori.l &0x7fc00000,%d0 # insert new exponent,SNAN bit
3445 mov.l %d1,-(%sp)
3446 mov.l FP_SRC_HI(%a6),%d1 # load mantissa
3447 lsr.l &0x8,%d1 # shift mantissa for sgl
3448 or.l %d1,%d0 # create sgl SNAN
3449 mov.l (%sp)+,%d1
3451 bsr.l store_dreg_l # store result to regfile
3455 mov.l FP_SRC_EX(%a6),%d0 # fetch SNAN sign
3456 andi.l &0x80000000,%d0 # keep sign
3457 ori.l &0x7ff80000,%d0 # insert new exponent,SNAN bit
3458 mov.l FP_SRC_HI(%a6),%d1 # load hi mantissa
3459 mov.l %d0,FP_SCR0_EX(%a6) # store to temp space
3460 mov.l &11,%d0 # load shift amt
3461 lsr.l %d0,%d1
3462 or.l %d1,FP_SCR0_EX(%a6) # create dbl hi
3463 mov.l FP_SRC_HI(%a6),%d1 # load hi mantissa
3464 andi.l &0x000007ff,%d1
3465 ror.l %d0,%d1
3466 mov.l %d1,FP_SCR0_HI(%a6) # store to temp space
3467 mov.l FP_SRC_LO(%a6),%d1 # load lo mantissa
3468 lsr.l %d0,%d1
3469 or.l %d1,FP_SCR0_HI(%a6) # create dbl lo
3471 mov.l EXC_EA(%a6),%a1 # pass: dst addr
3472 movq.l &0x8,%d0 # pass: size of 8 bytes
3473 bsr.l _dmem_write # write the default result
3475 tst.l %d1 # did dstore fail?
3476 bne.l facc_out_d # yes
3488 mov.l FP_SRC_HI(%a6),%d0
3490 mov.l %d0,FP_SCR0_HI(%a6)
3491 mov.l FP_SRC_LO(%a6),FP_SCR0_LO(%a6)
3496 mov.l %usp,%a0 # fetch user stack pointer
3497 mov.l %a0,EXC_A7(%a6) # save on stack for calc_ea()
3498 mov.l (%a6),EXC_A6(%a6)
3500 bsr.l _calc_ea_fout # find the correct ea,update An
3501 mov.l %a0,%a1
3502 mov.l %a0,EXC_EA(%a6) # stack correct <ea>
3504 mov.l EXC_A7(%a6),%a0
3505 mov.l %a0,%usp # restore user stack pointer
3506 mov.l EXC_A6(%a6),(%a6)
3510 movq.l &0xc,%d0 # pass: size of extended
3511 bsr.l _dmem_write # write the default result
3513 tst.l %d1 # did dstore fail?
3514 bne.l facc_out_x # yes
3519 mov.l (%a6),EXC_A6(%a6)
3521 bsr.l _calc_ea_fout # find the correct ea,update An
3522 mov.l %a0,%a1
3523 mov.l %a0,EXC_EA(%a6) # stack correct <ea>
3525 mov.l EXC_A6(%a6),(%a6)
3532 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
3533 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
3537 mov.l EXC_A6(%a6),%a6 # restore frame pointer
3539 mov.l LOCAL_SIZE+EXC_SR(%sp),LOCAL_SIZE+EXC_SR-0xc(%sp)
3540 mov.l LOCAL_SIZE+EXC_PC+0x2(%sp),LOCAL_SIZE+EXC_PC+0x2-0xc(%sp)
3541 mov.l LOCAL_SIZE+EXC_EA(%sp),LOCAL_SIZE+EXC_EA-0xc(%sp)
3543 mov.l LOCAL_SIZE+FP_SCR0_EX(%sp),LOCAL_SIZE+EXC_SR(%sp)
3544 mov.l LOCAL_SIZE+FP_SCR0_HI(%sp),LOCAL_SIZE+EXC_PC+0x2(%sp)
3545 mov.l LOCAL_SIZE+FP_SCR0_LO(%sp),LOCAL_SIZE+EXC_EA(%sp)
3547 add.l &LOCAL_SIZE-0x8,%sp
3549 bra.l _real_snan
3600 movm.l &0x0303,EXC_DREGS(%a6) # save d0-d1/a0-a1
3601 fmovm.l %fpcr,%fpsr,%fpiar,USER_FPCR(%a6) # save ctrl regs
3605 mov.l USER_FPIAR(%a6),EXC_EXTWPTR(%a6)
3607 mov.l EXC_EXTWPTR(%a6),%a0 # fetch instruction addr
3608 addq.l &0x4,EXC_EXTWPTR(%a6) # incr instruction ptr
3609 bsr.l _imem_read_long # fetch the instruction words
3610 mov.l %d0,EXC_OPWORD(%a6)
3625 fmov.l &0x0,%fpcr
3626 fmov.l FP_SRC_HI(%a6),%fp0 # load integer src
3632 bsr.l fix_skewed_ops # fix src op
3639 andi.l &0x00ff01ff,USER_FPSR(%a6) # zero all but accured field
3641 fmov.l &0x0,%fpcr # zero current control regs
3642 fmov.l &0x0,%fpsr
3649 bsr.l set_tag_x # tag the operand type
3662 bsr.l load_fpn2 # load dst into FP_DST
3665 bsr.l set_tag_x # tag the operand type
3668 bsr.l unnorm_fix # yes; convert to NORM,DENORM,or ZERO
3673 clr.l %d0
3682 mov.l (tbl_unsupp.l,%pc,%d1.w*4),%d1 # fetch routine addr
3683 jsr (tbl_unsupp.l,%pc,%d1.l*1)
3688 bsr.l store_fpreg
3692 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
3693 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
3698 bra.l _real_inex
3701 clr.l %d0
3704 andi.l &0x0000007f,%d1 # pass rom offset
3705 bsr.l smovcr
3909 mov.l %a0,%d0 # pass amt to inc by
3910 bsr.l inc_areg # inc addr register
3912 mov.l EXC_EA(%a6),%a0 # stacked <ea> is correct
3963 mov.l %d0,%d1 # make a copy
3966 andi.l &0x7,%d1 # extract reg field
3974 mov.l EXC_EA(%a6),%a0 # stacked <ea> is correct
3982 mov.l EXC_EA(%a6),%a0
3997 addi.l &0xc,EXC_DREGS+0x8(%a6)
4000 addi.l &0xc,EXC_DREGS+0xc(%a6)
4003 add.l &0xc,%a2
4006 add.l &0xc,%a3
4009 add.l &0xc,%a4
4012 add.l &0xc,%a5
4015 addi.l &0xc,EXC_A6(%a6)
4019 addi.l &0xc,EXC_A7(%a6)
4027 mov.l EXC_EA(%a6),%a0
4028 sub.l &0x8,%a0
4029 sub.l &0x8,EXC_EA(%a6)
4044 mov.l %a0,EXC_DREGS+0x8(%a6)
4047 mov.l %a0,EXC_DREGS+0xc(%a6)
4050 mov.l %a0,%a2
4053 mov.l %a0,%a3
4056 mov.l %a0,%a4
4059 mov.l %a0,%a5
4062 mov.l %a0,EXC_A6(%a6)
4065 mov.l %a0,EXC_A7(%a6)
4273 bsr.l fetch_dreg # fetch reg string
4275 andi.l &0x000000ff,%d0 # keep only lo byte
4277 mov.l %d0,-(%sp) # save strg
4279 mov.l %d0,-(%sp) # save size
4280 bsr.l fmovm_calc_ea # calculate <ea>
4281 mov.l (%sp)+,%d0 # restore size
4282 mov.l (%sp)+,%d1 # restore strg
5132 mov.l EXC_EXTWPTR(%a6),%a0 # fetch instruction addr
5133 addq.l &0x4,EXC_EXTWPTR(%a6) # incr instruction ptr
5134 bsr.l _imem_read_long
5136 tst.l %d1 # did ifetch fail?
5137 bne.l fcea_iacc # yes
5142 mov.l EXC_EXTWPTR(%a6),%a0 # fetch instruction addr
5143 addq.l &0x2,EXC_EXTWPTR(%a6) # incr instruction ptr
5144 bsr.l _imem_read_word
5146 tst.l %d1 # did ifetch fail?
5147 bne.l fcea_iacc # yes
5149 ext.l %d0 # sign extend bd
5152 add.l %d0,%d3 # base += bd
5163 mov.l EXC_EXTWPTR(%a6),%a0 # fetch instruction addr
5164 addq.l &0x4,EXC_EXTWPTR(%a6) # incr instruction ptr
5165 bsr.l _imem_read_long
5167 tst.l %d1 # did ifetch fail?
5168 bne.l fcea_iacc # yes
5173 mov.l EXC_EXTWPTR(%a6),%a0 # fetch instruction addr
5174 addq.l &0x2,EXC_EXTWPTR(%a6) # incr instruction ptr
5175 bsr.l _imem_read_word
5177 tst.l %d1 # did ifetch fail?
5178 bne.l fcea_iacc # yes
5180 ext.l %d0 # sign extend od
5184 clr.l %d0
5187 mov.l %d0,%d4
5192 mov.l %d3,%a0
5193 bsr.l _dmem_read_long
5195 tst.l %d1 # did dfetch fail?
5198 add.l %d2,%d0 # <ea> += index
5199 add.l %d4,%d0 # <ea> += od
5203 add.l %d2,%d3 # preindexing
5204 mov.l %d3,%a0
5205 bsr.l _dmem_read_long
5207 tst.l %d1 # did dfetch fail?
5210 add.l %d4,%d0 # ea += od
5214 add.l %d2,%d3 # ea = (base + bd) + index
5215 mov.l %d3,%d0
5217 mov.l %d0,%a0
5219 movm.l (%sp)+,&0x003c # restore d2-d5
5224 mov.l %d3,%a0
5226 movm.l (%sp)+,&0x003c # restore d2-d5
5228 bra.l iea_dacc
5231 movm.l (%sp)+,&0x003c # restore d2-d5
5232 bra.l iea_iacc
5235 bsr.l restore
5240 bsr.l restore
5244 mov.l L_SCR1(%a6),%a0
5245 bra.l iea_dacc
5249 # fmovm_ctrl(): emulate fmovm.l of control registers instr #
5534 andi.l &0x7fff,%d1 # extract operand's exponent
5598 mov.l &0x3fff,%d0
5599 sub.l %d1,%d0 # scale = BIAS + (-exp)
5600 asr.l &0x1,%d0 # divide scale factor by 2
5620 add.l &0x3fff,%d0
5621 asr.l &0x1,%d0 # divide scale factor by 2
5661 andi.l &0x7fff,%d1 # extract operand's exponent
5853 bsr.l dnrm_lp # denormalize the number
5861 mov.l &0x20000000, %d0 # set sticky bit in return value
5863 clr.l FTEMP_HI(%a0) # set d1 = 0 (ms mantissa)
5864 clr.l FTEMP_LO(%a0) # set d2 = 0 (ms mantissa)
5890 mov.l FTEMP_LO(%a0), FTEMP_LO2(%a6) # make FTEMP_LO copy
5891 mov.l %d0, GRS(%a6) # place g,r,s after it
5897 mov.l %d1, %d0 # copy the denorm threshold
5910 mov.l GRS(%a6), %d0 # restore original g,r,s
5937 mov.l %d2, -(%sp) # create temp storage
5940 mov.l &32, %d0
5953 mov.l %d2, FTEMP_HI(%a0) # store new FTEMP_HI
5954 mov.l %d1, FTEMP_LO(%a0) # store new FTEMP_LO
5961 and.l &0xe0000000, %d0 # clear all but G,R,S
5962 mov.l (%sp)+, %d2 # restore temp register
5989 mov.l %d2, -(%sp) # create temp storage
5993 mov.l &0x20, %d0
6010 mov.l %d1, %d0 # move new G,R,S to %d0
6014 mov.l %d1, %d0 # move new G,R,S to %d0
6018 clr.l FTEMP_HI(%a0) # store FTEMP_HI = 0
6019 mov.l %d2, FTEMP_LO(%a0) # store FTEMP_LO
6020 and.l &0xe0000000, %d0 # clear all but G,R,S
6022 mov.l (%sp)+,%d2 # restore temp register
6044 clr.l FTEMP_HI(%a0) # clear hi(mantissa)
6045 clr.l FTEMP_LO(%a0) # clear lo(mantissa)
6046 mov.l &0x20000000, %d0 # set sticky bit
6070 mov.l FTEMP_HI(%a0), %d0 # fetch hi(mantissa)
6071 mov.l %d0, %d1 # make a copy
6072 and.l &0xc0000000, %d0 # extract G,R
6073 and.l &0x3fffffff, %d1 # extract other bits
6098 mov.l FTEMP_HI(%a0), %d0 # fetch hi(mantissa)
6099 and.l &0x80000000, %d0 # extract R bit
6100 lsr.l &0x1, %d0 # shift high bit into R bit
6101 and.l &0x7fffffff, %d1 # extract other bits
6107 tst.l FTEMP_LO(%a0) # were any bits shifted off?
6213 # If sign of fp number = 1 (negative), then add 1 to l. #
6219 mov.l &0xffffffff, %d0 # force g,r,s to be all f's
6356 movm.l &0x3000, -(%sp) # make some temp registers {d2/d3}
6375 mov.l &30, %d2 # of the sgl prec. limits
6376 lsl.l %d2, %d3 # shift g-r bits to MSB of d3
6377 mov.l FTEMP_HI(%a0), %d2 # get word 2 for s-bit test
6378 and.l &0x0000003f, %d2 # s bit is the or of all other
6380 tst.l FTEMP_LO(%a0) # test lower mantissa
6382 tst.l %d0 # test original g,r,s
6400 mov.l &30, %d2 # of the dbl prec. limits
6401 lsl.l %d2, %d3 # shift g-r bits to the MSB of d3
6402 mov.l FTEMP_LO(%a0), %d2 # get lower mantissa for s-bit test
6403 and.l &0x000001ff, %d2 # s bit is the or-ing of all
6405 tst.l %d0 # test word original g,r,s
6412 mov.l %d3, %d0 # return grs to d0
6414 movm.l (%sp)+, &0xc # restore scratch registers {d2/d3}
6623 tst.l FTEMP_HI(%a0)
6625 tst.l FTEMP_LO(%a0)
6636 tst.l FTEMP_HI(%a0)
6638 tst.l FTEMP_LO(%a0)
6648 tst.l FTEMP_LO(%a0)
6650 mov.l FTEMP_HI(%a0), %d0
6651 and.l &0x7fffffff, %d0 # msb is a don't care!
6823 mov.l %d1, -(%sp) # save rnd prec,mode on stack
6833 mov.l %a0, -(%sp) # save operand ptr during calls
6835 mov.l 0x4(%sp),%d0 # pass rnd prec.
6838 bsr.l _denorm # denorm result
6840 mov.l (%sp),%a0
6848 bsr.l _round # round the denorm
6850 mov.l (%sp)+, %a0
6861 clr.l %d0
6862 tst.l FTEMP_HI(%a0) # is value now a zero?
6864 tst.l FTEMP_LO(%a0)
6881 add.l &0x4, %sp # clear stack
6887 mov.l %d1,-(%sp) # save rnd prec,mode on stack
6897 mov.l %a0,-(%sp) # save operand ptr during calls
6899 clr.l %d0 # force rnd prec = ext
6900 bsr.l _denorm # denorm result
6902 mov.l (%sp),%a0
6908 bsr.l _round # round the denorm
6910 mov.l (%sp)+,%a0
6921 clr.l %d0
6922 tst.l FTEMP_HI(%a0) # is value now a zero?
6924 tst.l FTEMP_LO(%a0)
6941 add.l &0x4,%sp # clear stack
7080 # it's b,w,l,s,d,x, or p in size. b,w,l can be stored to either a data #
7130 fmov.l %d0,%fpcr # insert rnd prec,mode
7134 fmov.l &0x0,%fpcr # clear FPCR
7135 fmov.l %fpsr,%d1 # fetch FPSR
7142 mov.l EXC_EA(%a6),%a0 # stacked <ea> is correct
7143 bsr.l _dmem_write_byte # write byte
7145 tst.l %d1 # did dstore fail?
7146 bne.l facc_out_b # yes
7153 bsr.l store_dreg_b
7157 mov.l SRC_EX(%a0),%d1
7158 andi.l &0x80000000,%d1 # keep DENORM sign
7159 ori.l &0x00800000,%d1 # make smallest sgl
7176 fmov.l %d0,%fpcr # insert rnd prec:mode
7180 fmov.l &0x0,%fpcr # clear FPCR
7181 fmov.l %fpsr,%d1 # fetch FPSR
7188 mov.l EXC_EA(%a6),%a0 # stacked <ea> is correct
7189 bsr.l _dmem_write_word # write word
7191 tst.l %d1 # did dstore fail?
7192 bne.l facc_out_w # yes
7199 bsr.l store_dreg_w
7203 mov.l SRC_EX(%a0),%d1
7204 andi.l &0x80000000,%d1 # keep DENORM sign
7205 ori.l &0x00800000,%d1 # make smallest sgl
7210 # fmove.l out ###################################################
7222 fmov.l %d0,%fpcr # insert rnd prec:mode
7224 fmov.l %fp0,%d0 # exec move out w/ correct rnd mode
7226 fmov.l &0x0,%fpcr # clear FPCR
7227 fmov.l %fpsr,%d1 # fetch FPSR
7235 mov.l EXC_EA(%a6),%a0 # stacked <ea> is correct
7236 bsr.l _dmem_write_long # write long
7238 tst.l %d1 # did dstore fail?
7239 bne.l facc_out_l # yes
7246 bsr.l store_dreg_l
7250 mov.l SRC_EX(%a0),%d1
7251 andi.l &0x80000000,%d1 # keep DENORM sign
7252 ori.l &0x00800000,%d1 # make smallest sgl
7287 bsr.l _dmem_write # write ext prec number to memory
7289 tst.l %d1 # did dstore fail?
7449 tst.l SRC_LO(%a0) # is result inexact?
7457 mov.l %a0,-(%sp)
7464 mov.l L_SCR3(%a6),%d0 # pass: sgl prec,rnd mode
7465 bsr.l ovf_res # calc OVFL result
7473 mov.l EXC_EA(%a6),%a0 # stacked <ea> is correct
7474 bsr.l _dmem_write_long # write long
7476 tst.l %d1 # did dstore fail?
7477 bne.l facc_out_l # yes
7484 bsr.l store_dreg_l
7490 addq.l &0x4,%sp
7506 mov.l SRC_HI(%a0),FP_SCR0_HI(%a6) # copy hi(man)
7507 mov.l SRC_LO(%a0),FP_SCR0_LO(%a6) # copy lo(man)
7509 fmov.l L_SCR3(%a6),%fpcr # set FPCR
7512 fmov.l &0x0,%fpcr # clear FPCR
7522 mov.l (%sp)+,%a0
7525 mov.l SRC_HI(%a0),FP_SCR0_HI(%a6)
7526 mov.l SRC_LO(%a0),FP_SCR0_LO(%a6)
7532 bsr.l norm
7533 neg.l %d0
7540 mov.l (%sp)+,%a0 # restore a0
7543 mov.l SRC_HI(%a0),FP_SCR0_HI(%a6)
7544 mov.l SRC_LO(%a0),FP_SCR0_LO(%a6)
7558 clr.l %d0 # pass: zero g,r,s
7559 bsr.l _round # round the DENORM
7575 mov.l %d0,L_SCR3(%a6) # save rnd prec,mode on stack
7599 fmov.l L_SCR3(%a6),%fpcr # set FPCR
7600 fmov.l &0x0,%fpsr # clear FPSR
7604 fmov.l &0x0,%fpcr # clear FPCR
7605 fmov.l %fpsr,%d0 # save FPSR
7609 mov.l EXC_EA(%a6),%a1 # pass: dst addr
7611 movq.l &0x8,%d0 # pass: opsize is 8 bytes
7612 bsr.l _dmem_write # store dbl fop to memory
7614 tst.l %d1 # did dstore fail?
7615 bne.l facc_out_d # yes
7678 mov.l %a0,-(%sp)
7685 mov.l L_SCR3(%a6),%d0 # pass: dbl prec,rnd mode
7686 bsr.l ovf_res # calc OVFL result
7690 mov.l EXC_EA(%a6),%a1 # pass: dst addr
7692 movq.l &0x8,%d0 # pass: opsize is 8 bytes
7693 bsr.l _dmem_write # store dbl fop to memory
7695 tst.l %d1 # did dstore fail?
7696 bne.l facc_out_d # yes
7701 addq.l &0x4,%sp
7717 mov.l SRC_HI(%a0),FP_SCR0_HI(%a6) # copy hi(man)
7718 mov.l SRC_LO(%a0),FP_SCR0_LO(%a6) # copy lo(man)
7720 fmov.l L_SCR3(%a6),%fpcr # set FPCR
7723 fmov.l &0x0,%fpcr # clear FPCR
7769 clr.l %d0 # clear d0
7778 lsl.l &0x4,%d0 # d0 in proper place for dbl prec exp
7783 mov.l FTEMP_HI(%a0),%d1 # get ms mantissa
7785 or.l %d1,%d0 # put these bits in ms word of double
7786 mov.l %d0,L_SCR1(%a6) # put the new exp back on the stack
7787 mov.l FTEMP_HI(%a0),%d1 # get ms mantissa
7788 mov.l &21,%d0 # load shift count
7789 lsl.l %d0,%d1 # put lower 11 bits in upper bits
7790 mov.l %d1,L_SCR2(%a6) # build lower lword in memory
7791 mov.l FTEMP_LO(%a0),%d1 # get ls mantissa
7793 mov.l L_SCR2(%a6),%d1
7794 or.l %d0,%d1 # put them in double result
7795 mov.l L_SCR1(%a6),%d0
7834 clr.l %d0
7843 lsl.l &0x7,%d0 # shift it into single exp bits
7848 mov.l FTEMP_HI(%a0),%d1 # get ms mantissa
7849 andi.l &0x7fffff00,%d1 # get upper 23 bits of ms
7850 lsr.l &0x8,%d1 # and put them flush right
7851 or.l %d1,%d0 # put these bits in ms word of single
7856 bsr.l _calc_ea_fout # fetch the <ea>
7857 mov.l %a0,-(%sp)
7871 bsr.l fetch_dreg # fetch Dn w/ k-factor
7879 mov.l %d0,-(%sp)
7915 mov.l (%sp)+,%a1 # pass: dst addr
7916 mov.l &0xc,%d0 # pass: opsize is 12 bytes
7921 bsr.l _dmem_write # write ext prec number to memory
7923 tst.l %d1 # did dstore fail?
8010 mov.l %d0,L_SCR3(%a6) # store rnd info
8020 mov.l DST_HI(%a1),FP_SCR1_HI(%a6)
8021 mov.l DST_LO(%a1),FP_SCR1_LO(%a6)
8024 mov.l SRC_HI(%a0),FP_SCR0_HI(%a6)
8025 mov.l SRC_LO(%a0),FP_SCR0_LO(%a6)
8027 bsr.l scale_to_zero_src # scale src exponent
8028 mov.l %d0,-(%sp) # save scale factor 1
8030 bsr.l scale_to_zero_dst # scale dst exponent
8032 add.l %d0,(%sp) # SCALE_FACTOR = scale1 + scale2
8036 mov.l (%sp)+,%d0 # load S.F.
8037 cmp.l %d0,(tbl_fmul_ovfl.w,%pc,%d1.w*4) # would result ovfl?
8041 cmp.l %d0,(tbl_fmul_unfl.w,%pc,%d1.w*4) # would result unfl?
8138 mov.l %d2,-(%sp) # save d2
8141 andi.l &0x7fff,%d1 # strip sign
8142 sub.l %d0,%d1 # add scale factor
8143 subi.l &0x6000,%d1 # subtract bias
8148 mov.l (%sp)+,%d2 # restore d2
8155 mov.l L_SCR3(%a6),%d1
8157 fmov.l %d1,%fpcr # set FPCR
8161 fmov.l &0x0,%fpcr # clear FPCR
8174 fmov.l L_SCR3(%a6),%fpcr # set FPCR
8175 fmov.l &0x0,%fpsr # clear FPSR
8179 fmov.l %fpsr,%d1 # save status
8180 fmov.l &0x0,%fpcr # clear FPCR
8182 or.l %d1,USER_FPSR(%a6) # save INEX2,N
8212 fmov.l &rz_mode*0x10,%fpcr # set FPCR
8213 fmov.l &0x0,%fpsr # clear FPSR
8217 fmov.l %fpsr,%d1 # save status
8218 fmov.l &0x0,%fpcr # clear FPCR
8220 or.l %d1,USER_FPSR(%a6) # save INEX2,N
8230 mov.l L_SCR3(%a6),%d1 # pass: rnd prec,mode
8231 bsr.l unf_res # calculate default result
8242 mov.l L_SCR3(%a6),%d1
8248 fmov.l L_SCR3(%a6),%fpcr # set FPCR
8251 fmov.l &0x0,%fpsr # clear FPSR
8255 fmov.l &0x0,%fpcr # clear FPCR
8258 mov.l %d2,-(%sp) # save d2
8260 mov.l %d1,%d2 # make a copy
8261 andi.l &0x7fff,%d1 # strip sign
8263 sub.l %d0,%d1 # add scale factor
8264 addi.l &0x6000,%d1 # add bias
8268 mov.l (%sp)+,%d2 # restore d2
8273 mov.l L_SCR3(%a6),%d1
8275 fmov.l %d1,%fpcr # set FPCR
8285 fmov.l L_SCR3(%a6),%fpcr # set FPCR
8286 fmov.l &0x0,%fpsr # clear FPSR
8290 fmov.l %fpsr,%d1 # save status
8291 fmov.l &0x0,%fpcr # clear FPCR
8293 or.l %d1,USER_FPSR(%a6) # save INEX2,N
8309 mov.l L_SCR3(%a6),%d1
8313 fmov.l %d1,%fpcr # set FPCR
8314 fmov.l &0x0,%fpsr # clear FPSR
8318 fmov.l &0x0,%fpcr # clear FPCR
8390 bra.l res_operr
8392 bra.l res_snan
8394 bra.l res_qnan
8495 mov.l %d0,L_SCR3(%a6) # store rnd info
8544 mov.l SRC_HI(%a0),FP_SCR0_HI(%a6)
8545 mov.l SRC_LO(%a0),FP_SCR0_LO(%a6)
8547 bsr.l norm # normalize result
8570 mov.l SRC_HI(%a0),FP_SCR0_HI(%a6)
8571 mov.l SRC_LO(%a0),FP_SCR0_LO(%a6)
8572 bsr.l scale_to_zero_src # calculate scale factor
8574 cmpi.l %d0,&0x3fff-0x3f80 # will move in underflow?
8576 cmpi.l %d0,&0x3fff-0x407e # will move in overflow?
8584 fmov.l &0x0,%fpsr # clear FPSR
8585 fmov.l L_SCR3(%a6),%fpcr # set FPCR
8589 fmov.l %fpsr,%d1 # save FPSR
8590 fmov.l &0x0,%fpcr # clear FPCR
8592 or.l %d1,USER_FPSR(%a6) # save INEX2,N
8595 mov.l %d2,-(%sp) # save d2
8599 andi.l &0x7fff,%d1 # strip sign
8600 sub.l %d0,%d1 # add scale factor
8604 mov.l (%sp)+,%d2 # restore d2
8613 mov.l SRC_HI(%a0),FP_SCR0_HI(%a6)
8614 mov.l SRC_LO(%a0),FP_SCR0_LO(%a6)
8615 bsr.l scale_to_zero_src # calculate scale factor
8617 cmpi.l %d0,&0x3fff-0x3c00 # will move in underflow?
8619 cmpi.l %d0,&0x3fff-0x43fe # will move in overflow?
8642 mov.l L_SCR3(%a6),%d1 # pass: rnd prec,mode
8643 bsr.l unf_res # calculate default result
8653 mov.l FP_SCR0_HI(%a6),FP_SCR1_HI(%a6)
8654 mov.l FP_SCR0_LO(%a6),FP_SCR1_LO(%a6)
8657 mov.l %d2,-(%sp) # save d2
8659 andi.l &0x7fff,%d1 # strip sign
8660 sub.l %d0,%d1 # subtract scale factor
8662 addi.l &0x6000,%d1 # add new bias
8667 mov.l (%sp)+,%d2 # restore d2
8674 fmov.l &0x0,%fpsr # clear FPSR
8675 fmov.l L_SCR3(%a6),%fpcr # set FPCR
8679 fmov.l &0x0,%fpcr # clear FPCR
8680 fmov.l %fpsr,%d1 # save FPSR
8682 or.l %d1,USER_FPSR(%a6) # save INEX2,N
8685 or.l &ovfl_inx_mask,USER_FPSR(%a6) # set ovfl/aovfl/ainex
8698 mov.l L_SCR3(%a6),%d0 # pass: prec,mode
8699 bsr.l ovf_res # calculate default result
8754 beq.l res_snan_1op
8756 beq.l res_qnan_1op
8828 mov.l %d0,L_SCR3(%a6) # store rnd info
8842 mov.l DST_HI(%a1),FP_SCR1_HI(%a6)
8843 mov.l DST_LO(%a1),FP_SCR1_LO(%a6)
8846 mov.l SRC_HI(%a0),FP_SCR0_HI(%a6)
8847 mov.l SRC_LO(%a0),FP_SCR0_LO(%a6)
8849 bsr.l scale_to_zero_src # scale src exponent
8850 mov.l %d0,-(%sp) # save scale factor 1
8852 bsr.l scale_to_zero_dst # scale dst exponent
8854 neg.l (%sp) # SCALE FACTOR = scale1 - scale2
8855 add.l %d0,(%sp)
8859 mov.l (%sp)+,%d0 # load S.F.
8860 cmp.l %d0,(tbl_fdiv_ovfl.b,%pc,%d1.w*4) # will result overflow?
8863 cmp.l %d0,(tbl_fdiv_unfl.w,%pc,%d1.w*4) # will result underflow?
8870 fmov.l L_SCR3(%a6),%fpcr # save FPCR
8871 fmov.l &0x0,%fpsr # clear FPSR
8875 fmov.l %fpsr,%d1 # save FPSR
8876 fmov.l &0x0,%fpcr # clear FPCR
8878 or.l %d1,USER_FPSR(%a6) # save INEX2,N
8882 mov.l %d2,-(%sp) # store d2
8884 mov.l %d1,%d2 # make a copy
8885 andi.l &0x7fff,%d1 # strip sign
8887 sub.l %d0,%d1 # add scale factor
8890 mov.l (%sp)+,%d2 # restore d2
8900 mov.l (%sp)+,%d0 # restore scale factor
8904 mov.l %d0,-(%sp) # save scale factor
8908 fmov.l L_SCR3(%a6),%fpcr # set FPCR
8909 fmov.l &0x0,%fpsr # set FPSR
8913 fmov.l %fpsr,%d0
8914 fmov.l &0x0,%fpcr
8916 or.l %d0,USER_FPSR(%a6) # save INEX,N
8920 add.l &0xc,%sp # clear result from stack
8921 andi.l &0x7fff,%d0 # strip sign
8922 sub.l (%sp),%d0 # add scale factor
8923 cmp.l %d0,(tbl_fdiv_ovfl2.b,%pc,%d1.w*4)
8925 mov.l (%sp)+,%d0
8928 or.l &ovfl_inx_mask,USER_FPSR(%a6) # set ovfl/aovfl/ainex
8937 mov.l L_SCR3(%a6),%d0 # pass prec:rnd
8938 bsr.l ovf_res # calculate default result
8944 mov.l L_SCR3(%a6),%d1
8951 mov.l %d2,-(%sp) # save d2
8954 andi.l &0x7fff,%d1 # strip sign
8955 sub.l %d0,%d1 # add scale factor
8956 subi.l &0x6000,%d1 # subtract bias
8961 mov.l (%sp)+,%d2 # restore d2
8968 mov.l L_SCR3(%a6),%d1
8970 fmov.l %d1,%fpcr # set FPCR
8974 fmov.l &0x0,%fpcr # clear FPCR
8982 fmov.l &rz_mode*0x10,%fpcr # set FPCR
8983 fmov.l &0x0,%fpsr # clear FPSR
8987 fmov.l %fpsr,%d1 # save status
8988 fmov.l &0x0,%fpcr # clear FPCR
8990 or.l %d1,USER_FPSR(%a6) # save INEX2,N
9000 mov.l L_SCR3(%a6),%d1 # pass: rnd prec,mode
9001 bsr.l unf_res # calculate default result
9012 mov.l L_SCR3(%a6),%d1
9016 fmov.l L_SCR3(%a6),%fpcr # set FPCR
9019 fmov.l &0x0,%fpsr # clear FPSR
9023 fmov.l &0x0,%fpcr # clear FPCR
9026 mov.l %d2,-(%sp) # save d2
9028 mov.l %d1,%d2 # make a copy
9029 andi.l &0x7fff,%d1 # strip sign
9031 sub.l %d0,%d1 # add scale factoer
9032 addi.l &0x6000,%d1 # add bias
9036 mov.l (%sp)+,%d2 # restore d2
9041 mov.l L_SCR3(%a6),%d1
9043 fmov.l %d1,%fpcr # set FPCR
9053 fmov.l L_SCR3(%a6),%fpcr # set FPCR
9054 fmov.l &0x0,%fpsr # clear FPSR
9058 fmov.l %fpsr,%d1 # save status
9059 fmov.l &0x0,%fpcr # clear FPCR
9061 or.l %d1,USER_FPSR(%a6) # save INEX2,N
9077 mov.l L_SCR3(%a6),%d1
9081 fmov.l %d1,%fpcr # set FPCR
9082 fmov.l &0x0,%fpsr # clear FPSR
9086 fmov.l &0x0,%fpcr # clear FPCR
9158 bra.l res_qnan
9160 bra.l res_snan
9162 bra.l res_operr
9269 mov.l %d0,L_SCR3(%a6) # store rnd info
9285 mov.l SRC_HI(%a0),FP_SCR0_HI(%a6)
9286 mov.l SRC_LO(%a0),FP_SCR0_LO(%a6)
9306 mov.l SRC_HI(%a0),FP_SCR0_HI(%a6)
9307 mov.l SRC_LO(%a0),FP_SCR0_LO(%a6)
9327 bsr.l norm # normalize result
9350 mov.l SRC_HI(%a0),FP_SCR0_HI(%a6)
9351 mov.l SRC_LO(%a0),FP_SCR0_LO(%a6)
9352 bsr.l scale_to_zero_src # calculate scale factor
9354 cmpi.l %d0,&0x3fff-0x3f80 # will move in underflow?
9356 cmpi.l %d0,&0x3fff-0x407e # will move in overflow?
9364 fmov.l &0x0,%fpsr # clear FPSR
9365 fmov.l L_SCR3(%a6),%fpcr # set FPCR
9369 fmov.l %fpsr,%d1 # save FPSR
9370 fmov.l &0x0,%fpcr # clear FPCR
9372 or.l %d1,USER_FPSR(%a6) # save INEX2,N
9375 mov.l %d2,-(%sp) # save d2
9379 andi.l &0x7fff,%d1 # strip sign
9380 sub.l %d0,%d1 # add scale factor
9384 mov.l (%sp)+,%d2 # restore d2
9393 mov.l SRC_HI(%a0),FP_SCR0_HI(%a6)
9394 mov.l SRC_LO(%a0),FP_SCR0_LO(%a6)
9395 bsr.l scale_to_zero_src # calculate scale factor
9397 cmpi.l %d0,&0x3fff-0x3c00 # will move in underflow?
9399 cmpi.l %d0,&0x3fff-0x43fe # will move in overflow?
9422 mov.l L_SCR3(%a6),%d1 # pass: rnd prec,mode
9423 bsr.l unf_res # calculate default result
9433 mov.l FP_SCR0_HI(%a6),FP_SCR1_HI(%a6)
9434 mov.l FP_SCR0_LO(%a6),FP_SCR1_LO(%a6)
9437 mov.l %d2,-(%sp) # save d2
9438 mov.l %d1,%d2 # make a copy
9439 andi.l &0x7fff,%d1 # strip sign
9441 sub.l %d0,%d1 # subtract scale factor
9442 addi.l &0x6000,%d1 # add new bias
9447 mov.l (%sp)+,%d2 # restore d2
9454 fmov.l &0x0,%fpsr # clear FPSR
9455 fmov.l L_SCR3(%a6),%fpcr # set FPCR
9459 fmov.l &0x0,%fpcr # clear FPCR
9460 fmov.l %fpsr,%d1 # save FPSR
9462 or.l %d1,USER_FPSR(%a6) # save INEX2,N
9465 or.l &ovfl_inx_mask,USER_FPSR(%a6) # set ovfl/aovfl/ainex
9478 mov.l L_SCR3(%a6),%d0 # pass: prec,mode
9479 bsr.l ovf_res # calculate default result
9534 beq.l res_snan_1op
9536 beq.l res_qnan_1op
9671 fmov.l %d0,%fpcr # set FPCR
9672 fmov.l &0x0,%fpsr # clear FPSR
9676 fmov.l &0x0,%fpcr # clear FPCR
9677 fmov.l %fpsr,%d0 # save FPSR
9678 or.l %d0,USER_FPSR(%a6) # set exception bits
9693 beq.l res_snan_1op
9694 bra.l res_qnan_1op # weed out QNAN
10105 mov.l %d2,-(%sp) # save d2
10107 mov.l %d1,%d2 # make a copy
10108 andi.l &0x7fff,%d1 # strip sign
10110 sub.l %d0,%d1 # add scale factor
10111 subi.l &0x6000,%d1 # subtract bias
10116 mov.l (%sp)+,%d2 # restore d2
10123 fmov.l &0x0,%fpsr # clear FPSR
10124 fmov.l L_SCR3(%a6),%fpcr # set FPCR
10128 fmov.l %fpsr,%d1 # save status
10129 fmov.l &0x0,%fpcr # clear FPCR
10131 or.l %d1,USER_FPSR(%a6) # save INEX2,N
10297 mov.l SRC_HI(%a0),%d0
10299 mov.l %d0,FP_SCR0_HI(%a6)
10300 mov.l SRC_LO(%a0),FP_SCR0_LO(%a6)
10305 mov.l DST_EX(%a1),FP_SCR0_EX(%a6)
10306 mov.l DST_HI(%a1),%d0
10308 mov.l %d0,FP_SCR0_HI(%a6)
10309 mov.l DST_LO(%a1),FP_SCR0_LO(%a6)
10316 mov.l DST_HI(%a1),%d0
10318 mov.l %d0,FP_SCR1_HI(%a6)
10319 mov.l SRC_HI(%a0),%d0
10321 mov.l %d0,FP_SCR0_HI(%a6)
10322 mov.l DST_LO(%a1),FP_SCR1_LO(%a6)
10323 mov.l SRC_LO(%a0),FP_SCR0_LO(%a6)
10525 fmov.l &rz_mode*0x10,%fpcr # set FPCR
10526 fmov.l &0x0,%fpsr # clear FPSR
10530 fmov.l %fpsr,%d1 # save status
10531 fmov.l &0x0,%fpcr # clear FPCR
10533 or.l %d1,USER_FPSR(%a6) # save INEX2,N
10543 mov.l L_SCR3(%a6),%d1 # pass: rnd prec,mode
10544 bsr.l unf_res4 # calculate default result
10555 fmov.l L_SCR3(%a6),%fpcr # set FPCR
10556 fmov.l &0x0,%fpsr # clear FPSR
10560 fmov.l &0x0,%fpcr # clear FPCR
10563 mov.l %d2,-(%sp) # save d2
10565 mov.l %d1,%d2 # make a copy
10566 andi.l &0x7fff,%d1 # strip sign
10568 sub.l %d0,%d1 # add scale factor
10569 addi.l &0x6000,%d1 # add bias
10573 mov.l (%sp)+,%d2 # restore d2
10580 fmov.l L_SCR3(%a6),%fpcr # set FPCR
10581 fmov.l &0x0,%fpsr # clear FPSR
10585 fmov.l %fpsr,%d1 # save status
10586 fmov.l &0x0,%fpcr # clear FPCR
10588 or.l %d1,USER_FPSR(%a6) # save INEX2,N
10604 mov.l L_SCR3(%a6),%d1
10608 fmov.l %d1,%fpcr # set FPCR
10609 fmov.l &0x0,%fpsr # clear FPSR
10613 fmov.l &0x0,%fpcr # clear FPCR
10685 bra.l res_operr
10687 bra.l res_snan
10689 bra.l res_qnan
10691 bra.l fmul_zero
10693 bra.l fmul_inf_src
10695 bra.l fmul_inf_dst
11977 mov.l %d0,L_SCR3(%a6) # store rnd info
11987 bmi.l res_operr # yes
11992 fmov.l L_SCR3(%a6),%fpcr # set FPCR
11993 fmov.l &0x0,%fpsr # clear FPSR
11997 fmov.l %fpsr,%d1
11998 or.l %d1,USER_FPSR(%a6) # set N,INEX
12004 bmi.l res_operr # yes
12010 mov.l SRC_HI(%a0),FP_SCR0_HI(%a6)
12011 mov.l SRC_LO(%a0),FP_SCR0_LO(%a6)
12013 bsr.l scale_sqrt # calculate scale factor
12029 mov.l SRC_HI(%a0),FP_SCR0_HI(%a6)
12030 mov.l SRC_LO(%a0),FP_SCR0_LO(%a6)
12032 bsr.l scale_sqrt # calculate scale factor
12034 cmpi.l %d0,&0x3fff-0x3f81 # will move in underflow?
12037 cmpi.l %d0,&0x3fff-0x407f # will move in overflow?
12045 fmov.l &0x0,%fpsr # clear FPSR
12046 fmov.l L_SCR3(%a6),%fpcr # set FPCR
12050 fmov.l %fpsr,%d1 # save FPSR
12051 fmov.l &0x0,%fpcr # clear FPCR
12053 or.l %d1,USER_FPSR(%a6) # save INEX2,N
12056 mov.l %d2,-(%sp) # save d2
12059 mov.l %d1,%d2 # make a copy
12060 andi.l &0x7fff,%d1 # strip sign
12061 sub.l %d0,%d1 # add scale factor
12065 mov.l (%sp)+,%d2 # restore d2
12074 mov.l SRC_HI(%a0),FP_SCR0_HI(%a6)
12075 mov.l SRC_LO(%a0),FP_SCR0_LO(%a6)
12077 bsr.l scale_sqrt # calculate scale factor
12079 cmpi.l %d0,&0x3fff-0x3c01 # will move in underflow?
12082 cmpi.l %d0,&0x3fff-0x43ff # will move in overflow?
12187 mov.l %d2,-(%sp) # save d2
12189 mov.l %d1,%d2 # make a copy
12190 andi.l &0x7fff,%d1 # strip sign
12192 sub.l %d0,%d1 # add scale factor
12193 subi.l &0x6000,%d1 # subtract bias
12198 mov.l (%sp)+,%d2 # restore d2
12208 fmov.l &0x0,%fpsr # clear FPSR
12209 fmov.l L_SCR3(%a6),%fpcr # set FPCR
12213 fmov.l %fpsr,%d1 # save status
12214 fmov.l &0x0,%fpcr # clear FPCR
12216 or.l %d1,USER_FPSR(%a6) # save INEX2,N
12920 mov.l &0xc,%d0 # packed is 12 bytes
12921 bsr.l _dcalc_ea # fetch <ea>; correct An
12924 mov.l &0xc,%d0 # pass: 12 bytes
12925 bsr.l _dmem_read # read packed operand
12927 tst.l %d1 # did dfetch fail?
12928 bne.l facc_in_x # yes
13034 mov.l 0x8(%a0),FP_SCR0_LO(%a6)
13038 movm.l &0x3c00,-(%sp) # save d2-d5
13062 mov.l &EDIGITS,%d2 # # of nibbles (digits) in fraction part
13063 mov.l &ESTRT,%d3 # counter to pick up digits
13064 mov.l (%a0),%d4 # get first word of bcd
13065 clr.l %d1 # zero d1 for accumulator
13067 mulu.l &0xa,%d1 # mul partial product by one digit place
13069 add.l %d0,%d1 # d1 = d1 + d0
13345 mov.l (%a0),%d4 # reload 1st bcd word to d4
13346 asl.l &2,%d2 # format d2 to be
13348 add.l %d0,%d2 # in d2 as index into RTABLE
13349 lea.l RTABLE(%pc),%a1 # load rtable base
13351 clr.l %d3 # clear d3 to force no exc and extended
13353 fmov.l %d3,%fpcr # write new FPCR
13354 asr.l &1,%d0 # write correct PTENxx table
13356 lea.l PTENRP(%pc),%a1 # it is RP
13359 asr.l &1,%d0 # keep checking
13361 lea.l PTENRM(%pc),%a1 # it is RM
13364 lea.l PTENRN(%pc),%a1 # it is RN
13366 mov.l %d1,%d0 # copy exp to d0;use d0
13368 neg.l %d0 # invert it
13369 or.l &0x40000000,(%a0) # and set SE bit
13371 clr.l %d3 # table index
13374 asr.l &1,%d0 # shift next bit into carry
13378 add.l &12,%d3 # inc d3 to next rtable entry
13379 tst.l %d0 # check if d0 is zero
13409 fmov.l %fpsr,%d0 # get status register
13414 add.l &0x4,%sp # clear 1 lw param
13416 movm.l (%sp)+,&0x3c # restore d2-d5
13417 fmov.l &0x0,%fpcr
13418 fmov.l &0x0,%fpsr
13572 movm.l &0x3f20,-(%sp) # {%d2-%d7/%a2}
13582 fmov.l &rm_mode*0x10,%fpcr # set RM and ext
13583 mov.l (%a0),L_SCR2(%a6) # save exponent for sign check
13584 mov.l %d0,%d7 # move k-factor to d7
13596 mov.l 4(%a0),%d1
13597 mov.l 8(%a0),%d2
13600 lsl.l &1,%d2
13601 roxl.l &1,%d1
13602 tst.l %d1
13613 mov.l %d1,4(%a0)
13614 mov.l %d2,8(%a0)
13619 mov.l (%a0),FP_SCR1(%a6) # move input to work space
13620 mov.l 4(%a0),FP_SCR1+4(%a6) # move input to work space
13621 mov.l 8(%a0),FP_SCR1+8(%a6) # move input to work space
13622 and.l &0x7fffffff,FP_SCR1(%a6) # create abs(X)
13652 mov.l &-4933,%d6 # force ILOG = -4933
13663 fmov.l %fp0,%d6 # put ILOG in d6 as a lword
13667 fmov.l %fp0,%d6 # put ILOG in d6 as a lword
13674 fmov.l &0,%fpsr # zero all of fpsr - nothing needed
13713 tst.l %d7 # branch on sign of k
13715 mov.l %d7,%d4 # if k > 0, LEN = k
13718 mov.l %d6,%d4 # first load ILOG to d4
13719 sub.l %d7,%d4 # subtract off k
13720 addq.l &1,%d4 # add in the 1
13722 tst.l %d4 # LEN check: branch on sign of LEN
13724 cmp.l %d4,&17 # test if LEN > 17
13726 mov.l &17,%d4 # set max LEN = 17
13727 tst.l %d7 # if negative, never set OPERR
13729 or.l &opaop_mask,USER_FPSR(%a6) # set OPERR & AIOP in USER_FPSR
13732 mov.l &1,%d4 # min LEN is 1
13785 tst.l %d7 # test sign of k
13787 cmp.l %d7,%d6 # test k - ILOG
13789 mov.l %d7,%d6 # if ((k<0) & (ILOG < k)) ILOG = k
13791 mov.l %d6,%d0 # calc ILOG + 1 - LEN in d0
13792 addq.l &1,%d0 # add the 1
13793 sub.l %d4,%d0 # sub off LEN
13797 tst.l %d0 # test sign of ISCALE
13800 cmp.l %d0,&0xffffecd4 # test iscale <= -4908
13802 add.l &24,%d0 # add in 24 to iscale
13803 mov.l &24,%d2 # put 24 in d2 for A9
13805 neg.l %d0 # and take abs of ISCALE
13812 tst.l L_SCR2(%a6) # test sign of original x
13922 mov.l 0x8(%a0),-(%sp) # put input op mantissa on stk
13923 mov.l 0x4(%a0),-(%sp)
13924 mov.l &0x3fff0000,-(%sp) # force exp to zero
13930 mov.l 36+8(%a1),-(%sp) # get 10^8 mantissa
13931 mov.l 36+4(%a1),-(%sp)
13932 mov.l &0x3fff0000,-(%sp) # force exp to zero
13933 mov.l 48+8(%a1),-(%sp) # get 10^16 mantissa
13934 mov.l 48+4(%a1),-(%sp)
13935 mov.l &0x3fff0000,-(%sp)# force exp to zero
13972 fmov.l %fpsr,%d0 # get FPSR
13974 lea.l FP_SCR1(%a6),%a2 # load a2 with ptr to FP_SCR1
13977 or.l &1,8(%a2) # or in 1 to lsb of mantissa
14018 movm.l &0xc0c0,-(%sp) # save regs used by sintd0 {%d0-%d1/%a0-%a1}
14019 mov.l L_SCR1(%a6),-(%sp)
14020 mov.l L_SCR2(%a6),-(%sp)
14022 lea.l FP_SCR1(%a6),%a0 # a0 is ptr to FP_SCR1(a6)
14024 tst.l L_SCR2(%a6) # test sign of original operand
14026 or.l &0x80000000,(%a0) # if neg, use -Y
14028 mov.l USER_FPSR(%a6),-(%sp)
14031 fmov.l USER_FPCR(%a6),%fpcr
14032 fmov.l &0x0,%fpsr # clear the AEXC bits!!!
14033 ## mov.l USER_FPCR(%a6),%d0 # ext prec/keep rnd mode
14034 ## andi.l &0x00000030,%d0
14035 ## fmov.l %d0,%fpcr
14037 fmov.l %fpsr,%d0
14039 ## fmov.l &0x0,%fpcr
14040 ## fmov.l %fpsr,%d0 # don't keep ccodes
14092 mov.l %d4,%d0 # put LEN in d0
14093 subq.l &1,%d0 # d0 = LEN -1
14094 clr.l %d3 # clr table index
14096 lsr.l &1,%d0 # shift next bit into carry
14100 add.l &12,%d3 # inc d3 to next pwrten table entry
14101 tst.l %d0 # test if LEN is zero
14118 subq.l &1,%d6 # subtract 1 from ILOG
14120 fmov.l &rm_mode*0x10,%fpcr # set rmode to RM
14129 addq.l &1,%d6 # and inc ILOG
14132 addq.l &1,%d6 # increment ILOG by 1
14134 fmov.l &rm_mode*0x10,%fpcr # set rmode to RM
14205 sub.l &0x3ffd,%d0 # sub bias less 2 to make fract
14206 tst.l %d0 # check if > 1
14350 mov.l &2,%d0 # move 2 in to d0 for SM
14352 tst.l %d6 # check sign of ILOG
14649 mov.l USER_FPIAR(%a6),EXC_PC(%a6) # store current PC
14652 fmovm.l USER_FPCR(%a6),%fpcr,%fpsr,%fpiar # restore ctrl regs
14653 movm.l EXC_DREGS(%a6),&0x0303 # restore d0-d1/a0-a1
14657 mov.l (%sp),-(%sp) # store SR, hi(PC)
14658 mov.l 0x8(%sp),0x4(%sp) # store lo(PC)
14659 mov.l 0xc(%sp),0x8(%sp) # store EA
14660 mov.l &0x00000001,0xc(%sp) # store FSLW
14669 bra.l _real_access
14737 sub.l %d0,%a0
14744 neg.l %d0