Lines Matching refs:result

437 set neg_bit,		0x3			# negative result
438 set z_bit, 0x2 # zero result
439 set inf_bit, 0x1 # infinite result
440 set nan_bit, 0x0 # NAN result
450 set inex2_bit, 1 # inexact result 2
451 set inex1_bit, 0 # inexact result 1
589 # store_fpreg() - store opclass 0 or 2 result to FP regfile #
612 # On the 060, if an FP overflow is present as the result of any #
616 # default result should be for the operation. This default result is #
622 # the default result (only if the instruction is opclass 3). For #
628 # through the "callout" _real_inex() regardless of whether the result #
715 # the operation has been emulated. the result is in fp0.
717 # we must save the default result regardless of whether
829 # store_fpreg() - store opclass 0 or 2 result to FP regfile #
852 # On the 060, if an FP underflow is present as the result of any #
856 # default result should be for the operation. This default result is #
862 # the default result (only if the instruction is opclass 3). For #
867 # but the inexact exception was enabled and the result was inexact, #
961 # The `060 FPU multiplier hardware is such that if the result of a
968 # special case will simply exit gracefully with the correct result.
994 # The `060 FPU multiplier hardware is such that if the result of a
1022 # The `060 FPU multiplier hardware is such that if the result of a
1104 # store_fpreg() - store opclass 0 or 2 result to FP regfile #
1138 # - Correct result has been stored as appropriate #
1149 # instruction type. Once the instruction has been emulated and result #
1164 # as the result of emulation, then an exit either occurs through #
1327 # fcmp and ftst do not store any result.
1334 bsr.l store_fpreg # store the result
1355 # branch to _real_inex() (even if the result was exact!);
1357 # save the result in the proper fp reg (unless the op is fcmp or ftst);
1495 # the src operand is in FP_SRC. Call _fout() to write out the result and
1587 # the extended precision result is still in fp0. but, we need to save it
1603 # now, copy the result to the proper place on the stack
1621 # if a disabled overflow occurred and inexact was enabled but the result
1755 # the extended precision result is still in fp0. but, we need to save it
1777 # now, copy the result to the proper place on the stack
1872 # fcmp and ftst do not store any result.
1879 bsr.l store_fpreg # store the result
1933 # branch to _real_inex() (even if the result was exact!);
1935 # save the result in the proper fp reg (unless the op is fcmp or ftst);
2148 # now, copy the result to the proper place on the stack
2188 # can store the default result where the exception frame was.
2204 # now, we copy the default result to its proper location
2228 # can store the default result where the exception frame was.
2244 # now, we copy the default result to its proper location
2268 # can store the default result where the exception frame was.
2284 # now, we copy the default result to its proper location
2375 # store_fpreg() - store opclass 0 or 2 result to FP regfile #
2399 # - None (correct result has been stored as appropriate) #
2411 # word. If no FP exception should be reported ads a result of the #
2412 # emulation, then the result is stored to the destination register and #
2414 # signalled as a result of emulation, then an fsave state frame #
2423 # as a result of this operation emulation. A Trace exception can be #
2445 # "callout" returns a failing result indicating an access error, then #
2560 clr.b STORE_FLG(%a6) # clear "store result" boolean
2585 # store a result. then, only fcmp will branch back and pick up a dst operand.
2586 st STORE_FLG(%a6) # don't store a final result
2623 # now, we save the result, unless, of course, the operation was ftst or fcmp.
2626 tst.b STORE_FLG(%a6) # does this op store a result?
2631 bsr.l store_fpreg # store the result
3096 # operr result out to memory or data register file as it should. #
3099 # _mem_write() "callout" routines that may return a failing result. #
3151 # the hardware does not save the default result to memory on enabled
3206 mov.b L_SCR1(%a6),%d0 # load positive default result
3209 mov.l EXC_EA(%a6),%a0 # pass: <ea> of default result
3210 bsr.l _dmem_write_byte # write the default result
3218 bsr.l store_dreg_b # store result to regfile
3222 mov.w L_SCR1(%a6),%d0 # load positive default result
3225 mov.l EXC_EA(%a6),%a0 # pass: <ea> of default result
3226 bsr.l _dmem_write_word # write the default result
3234 bsr.l store_dreg_w # store result to regfile
3238 mov.l L_SCR1(%a6),%d0 # load positive default result
3241 mov.l EXC_EA(%a6),%a0 # pass: <ea> of default result
3242 bsr.l _dmem_write_long # write the default result
3250 bsr.l store_dreg_l # store result to regfile
3286 # SNAN result out to memory or data register file as it should. #
3289 # _mem_write() "callout" routines that may return a failing result. #
3347 # the hardware does not save the default result to memory on enabled
3380 mov.l EXC_EA(%a6),%a0 # pass: <ea> of default result
3381 bsr.l _dmem_write_byte # write the default result
3389 bsr.l store_dreg_b # store result to regfile
3397 mov.l EXC_EA(%a6),%a0 # pass: <ea> of default result
3398 bsr.l _dmem_write_word # write the default result
3406 bsr.l store_dreg_w # store result to regfile
3414 mov.l EXC_EA(%a6),%a0 # pass: <ea> of default result
3415 bsr.l _dmem_write_long # write the default result
3423 bsr.l store_dreg_l # store result to regfile
3435 mov.l EXC_EA(%a6),%a0 # pass: <ea> of default result
3436 bsr.l _dmem_write_long # write the default result
3452 bsr.l store_dreg_l # store result to regfile
3474 bsr.l _dmem_write # write the default result
3512 bsr.l _dmem_write # write the default result
3563 # store_fpreg() - store opclass 0 or 2 result to FP regfile #
3583 # hardware doesn't store the correct result to the destination FP #
3588 # inexact result out to memory or data register file as it should. #
3686 # the operation has been emulated. the result is in fp0.
3712 # the hardware does not save the default result to memory on enabled
3734 bsr.l fout # store the default result
3935 # store_fpreg() - store opclass 0 or 2 result to FP regfile #
3957 # - Correct result has been stored as appropriate #
3968 # handler checks to see if an exception should occur as a result of the #
3981 # instruction was "ftrapcc" and a Trap exception should result, a Trap #
4070 clr.b STORE_FLG(%a6) # clear "store result" flag
4102 bsr.l store_fpreg # store result to fp regfile
4191 # the overflow w/ exact result happened but was inexact set in the FPCR?
4354 # so that the rte will work correctly without destroying the result.
5019 # The returned result is within 1 ulp in 64 significant bit, i.e. #
5020 # within 0.5001 ulp to 53 bits if the result is subsequently #
5021 # rounded to double precision. The result is provably monotonic #
5458 bsr sto_cos # store cosine result
5531 bsr sto_cos # store cosine result
5549 bsr sto_cos # store cosine result
5562 bsr sto_cos # store cosine result
5600 fmov.x %fp0,%fp1 # save high result in fp1
5602 fsub.x %fp0,%fp1 # determine low component of result
5724 # The returned result is within 3 ulp in 64 significant bit, i.e. #
5725 # within 0.5001 ulp to 53 bits if the result is subsequently #
5726 # rounded to double precision. The result is provably monotonic #
6031 fmov.x %fp0,%fp1 # save high result in fp1
6033 fsub.x %fp0,%fp1 # determine low component of result
6154 # The returned result is within 2 ulps in 64 significant bit, #
6155 # i.e. within 0.5001 ulp to 53 bits if the result is subsequently #
6156 # rounded to double precision. The result is provably monotonic #
6604 # The returned result is within 3 ulps in 64 significant bit, #
6605 # i.e. within 0.5001 ulp to 53 bits if the result is subsequently #
6606 # rounded to double precision. The result is provably monotonic #
6705 # The returned result is within 3 ulps in 64 significant bit, #
6706 # i.e. within 0.5001 ulp to 53 bits if the result is subsequently #
6707 # rounded to double precision. The result is provably monotonic #
6801 # The returned result is within 0.85 ulps in 64 significant bit, #
6802 # i.e. within 0.5001 ulp to 53 bits if the result is subsequently #
6803 # rounded to double precision. The result is provably monotonic #
6972 # with an inexact result. Thus, 9.5 always raises the #
7044 # result. #
7610 # the result is [1.0 - 2.0). #
7649 # here, we build the result in a tmp location so as not to disturb the input
7682 # The returned result is within 3 ulps in 64 significant bit, #
7683 # i.e. within 0.5001 ulp to 53 bits if the result is subsequently #
7684 # rounded to double precision. The result is provably monotonic #
7796 # The returned result is within 3 ulps in 64 significant bit, #
7797 # i.e. within 0.5001 ulp to 53 bits if the result is subsequently #
7798 # rounded to double precision. The result is provably monotonic #
7914 # The returned result is within 3 ulps in 64 significant bit, #
7915 # i.e. within 0.5001 ulp to 53 bits if the result is subsequently #
7916 # rounded to double precision. The result is provably monotonic #
8080 # The returned result is within 2 ulps in 64 significant bit, #
8081 # i.e. within 0.5001 ulp to 53 bits if the result is subsequently #
8082 # rounded to double precision. The result is provably monotonic #
8675 # The returned result is within 3 ulps in 64 significant bit, #
8676 # i.e. within 0.5001 ulp to 53 bits if the result is subsequently #
8677 # rounded to double precision. The result is provably monotonic #
8765 # The returned result is within 1.7 ulps in 64 significant bit, #
8766 # i.e. within 0.5003 ulp to 53 bits if the result is subsequently #
8767 # rounded to double precision. The result is provably monotonic #
8929 # The returned result is within 2 ulps in 64 significant bit, #
8930 # i.e. within 0.5001 ulp to 53 bits if the result is subsequently #
8931 # rounded to double precision. The result is provably monotonic #
9392 cmpi.b %d1,&0x2 # is result log10(e)?
9460 fmovm.x (%a0,%d1.w),&0x80 # return result in fp0
9479 fmovm.x (%a0),&0x80 # return rounded result in fp0
9652 # create an fp multiply that will create the result.
10066 # as a result. trust me...
10068 # ;result of the scaling
10122 # fp0 = default result #
10183 # result precision is extended.
10190 # result precision is single or double
10198 fmovm.x (%a0),&0x80 # return default result in fp0
10210 # and return the result in fp1.
10228 # large enough to hold the range of this result. #
10230 # - Return the default result to the proper precision #
10231 # with the sign of this result being the same as that #
10233 # - t_unfl2() is provided to force the result sign to #
10234 # positive which is the desired result for fetox(). #
10240 tst.b (%a0) # is result pos or neg?
10242 bsr.l unf_sub # calc default unfl result
10243 fmovm.x (%a0),&0x80 # return default result in fp0
10248 # t_unfl2 ALWAYS tells unf_sub to create a positive result
10254 bsr.l unf_sub # calc default unfl result
10255 fmovm.x (%a0),&0x80 # return default result in fp0
10263 # large enough to hold the range of this result. #
10264 # - Return the default result to the proper precision #
10265 # with the sign of this result being the same as that #
10267 # - t_ovfl2() is provided to force the result sign to #
10268 # positive which is the desired result for fcosh(). #
10286 # result would be inexact for the given precision. make a copy of the
10320 bsr.l ovf_res # calc default ovfl result
10322 fmovm.x (%a0),&0x80 # return default result in fp0
10327 # t_ovfl2 ALWAYS tells ovf_res to create a positive result
10333 bsr.l ovf_res # calc default ovfl result
10335 fmovm.x (%a0),&0x80 # return default result in fp0
10347 # result and EXOP for us. #
10407 # unf_res(): underflow default result calculation for transcendentals #
10411 # d1.b : sign bit of result ('11111111 = (-) ; '00000000 = (+)) #
10413 # a0 : points to result (in instruction memory) #
10428 lea (tbl_unf_result.b,%pc,%d1.w*8),%a0 # grab result ptr
10648 fmov.s &0x80000000,%fp0 # return sin result in fp0
10650 bra.b sto_cos # store cosine result
10652 fmov.s &0x00000000,%fp0 # return sin result in fp0
10654 bra.b sto_cos # store cosine result
10664 bsr.l sto_cos # store cosine result
10691 # fp1 holds the result of the cosine portion of ssincos(). #
11348 # fp0 = result #
11530 # unf_res() - return default underflow result #
11531 # ovf_res() - return default overflow result #
11532 # res_qnan() - return QNAN result #
11533 # res_snan() - return SNAN result #
11541 # fp0 = result #
11549 # compute a result. Check if the regular operands would have taken #
11550 # an exception. If so, return the default overflow/underflow result #
11552 # result operand to the proper exponent. #
11606 cmp.l %d0,(tbl_fmul_ovfl.w,%pc,%d1.w*4) # would result ovfl?
11607 beq.w fmul_may_ovfl # result may rnd to overflow
11608 blt.w fmul_ovfl # result will overflow
11610 cmp.l %d0,(tbl_fmul_unfl.w,%pc,%d1.w*4) # would result unfl?
11611 beq.w fmul_may_unfl # result may rnd to no unfl
11612 bgt.w fmul_unfl # result will underflow
11616 # - the result of the multiply operation will neither overflow nor underflow.
11618 # - scale the result exponent using the scale factor. if both operands were
11636 fmovm.x &0x80,FP_SCR0(%a6) # store out result
11646 fmovm.x FP_SCR0(%a6),&0x80 # return default result in fp0
11651 # - the result of the multiply operation is an overflow.
11654 # - calculate the default result and return it in fp0.
11655 # - if overflow or inexact is enabled, we need a multiply result rounded to
11657 # result. if the original operation was single or double, we have to do another
11658 # multiply using extended precision and the correct rounding mode. the result
11683 # calculate the default result
11685 btst &neg_bit,FPSR_CC(%a6) # is result negative?
11688 bsr.l ovf_res # calculate default result
11690 fmovm.x (%a0),&0x80 # return default result in fp0
11697 # calculate a result rounded to extended precision.
11705 fmovm.x &0x80,FP_SCR0(%a6) # move result to stack
11735 # - the result of the multiply operation MAY overflow.
11738 # - calculate the default result and return it in fp0.
11753 fabs.x %fp0,%fp1 # make a copy of result
11754 fcmp.b %fp1,&0x2 # is |result| >= 2.b?
11757 # no, it didn't overflow; we have correct result
11762 # - the result of the multiply operation is an underflow.
11765 # - calculate the default result and return it in fp0.
11766 # - if overflow or inexact is enabled, we need a multiply result rounded to
11768 # result. if the original operation was single or double, we have to do another
11769 # multiply using extended precision and the correct rounding mode. the result
11796 fmovm.x &0x80,FP_SCR0(%a6) # store out result
11798 lea FP_SCR0(%a6),%a0 # pass: result addr
11800 bsr.l unf_res # calculate default result
11802 fmovm.x FP_SCR0(%a6),&0x80 # return default result in fp0
11826 fmovm.x &0x40,FP_SCR0(%a6) # save result to stack
11864 fabs.x %fp0,%fp1 # make a copy of result
11865 fcmp.b %fp1,&0x2 # is |result| > 2.b?
11870 # we still don't know if underflow occurred. result is ~ equal to 2. but,
11871 # we don't know if the result was an underflow that rounded up to a 2 or
11873 # using RZ as the rounding mode to see what the pre-rounded result is.
11889 fcmp.b %fp1,&0x2 # is |result| < 2.b?
11973 bpl.b fmul_zero_p # result ZERO is pos.
11993 fmovm.x DST(%a1),&0x80 # return INF result in fp0
11997 bpl.b fmul_inf_dst_p # result INF is pos.
11999 fabs.x %fp0 # clear result sign
12000 fneg.x %fp0 # set result sign
12004 fabs.x %fp0 # clear result sign
12010 fmovm.x SRC(%a0),&0x80 # return INF result in fp0
12014 bpl.b fmul_inf_dst_p # result INF is pos.
12026 # ovf_res() - return default overflow result #
12027 # unf_res() - return default underflow result #
12028 # res_qnan_1op() - return QNAN result #
12029 # res_snan_1op() - return SNAN result #
12036 # fp0 = result #
12044 # if the result would have overflowed/underflowed. If so, use unf_res() #
12045 # or ovf_res() to return the default result. Also return EXOP if #
12046 # exception is enabled. If no exception, return the default result. #
12085 fmovm.x SRC(%a0),&0x80 # return result in fp0
12101 fmovm.x SRC(%a0),&0x80 # return result in fp0
12116 bsr.l norm # normalize result
12165 fmovm.x &0x80,FP_SCR0(%a6) # store out result
12174 fmovm.x FP_SCR0(%a6),&0x80 # return result in fp0
12210 lea FP_SCR0(%a6),%a0 # pass: result addr
12212 bsr.l unf_res # calculate default result
12214 fmovm.x FP_SCR0(%a6),&0x80 # return default result in fp0
12219 # Therefore, we must return the result rounded to extended precision.
12261 # OVFL is not enabled; therefore, we must create the default result by
12265 btst &neg_bit,FPSR_CC(%a6) # is result negative?
12268 bsr.l ovf_res # calculate default result
12270 fmovm.x (%a0),&0x80 # return default result in fp0
12307 fabs.x %fp0,%fp1 # make a copy of result
12308 fcmp.b %fp1,&0x2 # is |result| >= 2.b?
12311 # no, it didn't overflow; we have correct result
12347 # unf_res() - return default underflow result #
12348 # ovf_res() - return default overflow result #
12349 # res_qnan() - return QNAN result #
12350 # res_snan() - return SNAN result #
12358 # fp0 = result #
12366 # compute a result. Check if the regular operands would have taken #
12367 # an exception. If so, return the default overflow/underflow result #
12369 # result operand to the proper exponent. #
12429 cmp.l %d0,(tbl_fdiv_ovfl.b,%pc,%d1.w*4) # will result overflow?
12430 ble.w fdiv_may_ovfl # result will overflow
12432 cmp.l %d0,(tbl_fdiv_unfl.w,%pc,%d1.w*4) # will result underflow?
12450 fmovm.x &0x80,FP_SCR0(%a6) # store result on stack
12460 fmovm.x FP_SCR0(%a6),&0x80 # return result in fp0
12487 fmovm.x &0x01,-(%sp) # save result to stack
12489 add.l &0xc,%sp # clear result from stack
12504 btst &neg_bit,FPSR_CC(%a6) # is result negative?
12507 bsr.l ovf_res # calculate default result
12509 fmovm.x (%a0),&0x80 # return default result in fp0
12518 fmovm.x &0x80,FP_SCR0(%a6) # move result to stack
12566 fmovm.x &0x80,FP_SCR0(%a6) # store out result
12568 lea FP_SCR0(%a6),%a0 # pass: result addr
12570 bsr.l unf_res # calculate default result
12572 fmovm.x FP_SCR0(%a6),&0x80 # return default result in fp0
12594 fmovm.x &0x40,FP_SCR0(%a6) # save result to stack
12632 fabs.x %fp0,%fp1 # make a copy of result
12633 fcmp.b %fp1,&0x1 # is |result| > 1.b?
12638 # we still don't know if underflow occurred. result is ~ equal to 1. but,
12639 # we don't know if the result was an underflow that rounded up to a 1
12642 # result is. this case should be relatively rare.
12657 fcmp.b %fp1,&0x1 # is |result| < 1.b?
12735 mov.b SRC_EX(%a0),%d0 # result sign is exclusive
12738 bpl.b fdiv_zero_load_p # result is positive
12748 # The destination was In Range and the source was a ZERO. The result,
12758 bpl.b fdiv_inf_load_p # result is positive
12759 fmov.s &0xff800000,%fp0 # make result -INF
12763 fmov.s &0x7f800000,%fp0 # make result +INF
12768 # The destination was an INF w/ an In Range or ZERO source, the result is
12771 # dst INF is set, then then j-bit of the result INF is also set).
12778 bpl.b fdiv_inf_dst_p # result is positive
12780 fmovm.x DST(%a1),&0x80 # return result in fp0
12787 fmovm.x DST(%a1),&0x80 # return result in fp0
12801 # ovf_res() - return default overflow result #
12802 # unf_res() - return default underflow result #
12803 # res_qnan_1op() - return QNAN result #
12804 # res_snan_1op() - return SNAN result #
12811 # fp0 = result #
12819 # occurred. If so, return default underflow/overflow result. Else, #
12820 # scale the result exponent and return result. FPSR gets set based on #
12821 # the result value. #
12862 fmovm.x FP_SCR0(%a6),&0x80 # return result in fp0
12883 fmovm.x FP_SCR0(%a6),&0x80 # return default result in fp0
12896 bsr.l norm # normalize result
12945 fmovm.x &0x80,FP_SCR0(%a6) # store out result
12954 fmovm.x FP_SCR0(%a6),&0x80 # return result in fp0
12990 lea FP_SCR0(%a6),%a0 # pass: result addr
12992 bsr.l unf_res # calculate default result
12994 fmovm.x FP_SCR0(%a6),&0x80 # return default result in fp0
12999 # Therefore, we must return the result rounded to extended precision.
13041 # OVFL is not enabled; therefore, we must create the default result by
13045 btst &neg_bit,FPSR_CC(%a6) # is result negative?
13048 bsr.l ovf_res # calculate default result
13050 fmovm.x (%a0),&0x80 # return default result in fp0
13087 fabs.x %fp0,%fp1 # make a copy of result
13088 fcmp.b %fp1,&0x2 # is |result| >= 2.b?
13091 # no, it didn't overflow; we have correct result
13123 # res{s,q}nan_1op() - set NAN result for monadic instruction #
13208 # res_{s,q}nan_1op() - set NAN result for monadic operation #
13215 # fp0 = result #
13268 # for DENORMs, the result will be either (+/-)ZERO or (+/-)1.
13299 fmovm.x SRC(%a0),&0x80 # return result in fp0
13314 # res_{s,q}nan_1op() - set NAN result for monadic operation #
13321 # fp0 = result #
13370 # for DENORMs, the result will be (+/-)ZERO.
13401 fmovm.x SRC(%a0),&0x80 # return result in fp0
13420 # unf_res() - calculate underflow result #
13421 # ovf_res() - calculate overflow result #
13422 # res_{s,q}nan_1op() - set NAN result for monadic operation #
13429 # fp0 = result #
13441 # to calculate the default result. Also, create the EXOP for the #
13443 # result exponent and return. #
13482 fmovm.x FP_SCR0(%a6),&0x80 # return result in fp0
13501 fmovm.x FP_SCR0(%a6),&0x80 # return default result in fp0
13514 bsr.l norm # normalize result
13563 fmovm.x &0x80,FP_SCR0(%a6) # store out result
13572 fmovm.x FP_SCR0(%a6),&0x80 # return result in fp0
13605 lea FP_SCR0(%a6),%a0 # pass: result addr
13607 bsr.l unf_res # calculate default result
13609 fmovm.x FP_SCR0(%a6),&0x80 # return default result in fp0
13614 # Therefore, we must return the result rounded to extended precision.
13656 # OVFL is not enabled; therefore, we must create the default result by
13660 btst &neg_bit,FPSR_CC(%a6) # is result negative?
13663 bsr.l ovf_res # calculate default result
13665 fmovm.x (%a0),&0x80 # return default result in fp0
13702 fabs.x %fp0,%fp1 # make a copy of result
13703 fcmp.b %fp1,&0x2 # is |result| >= 2.b?
13706 # no, it didn't overflow; we have correct result
13738 # res_qnan() - return QNAN result #
13739 # res_snan() - return SNAN result #
13932 # unf_res4() - return default underflow result for sglop #
13933 # ovf_res() - return default overflow result #
13934 # res_qnan() - return QNAN result #
13935 # res_snan() - return SNAN result #
13943 # fp0 = result #
13951 # compute a result. Check if the regular operands would have taken #
13952 # an exception. If so, return the default overflow/underflow result #
13954 # result operand to the proper exponent. #
13985 cmpi.l %d0,&0x3fff-0x7ffe # would result ovfl?
13986 beq.w fsglmul_may_ovfl # result may rnd to overflow
13987 blt.w fsglmul_ovfl # result will overflow
13989 cmpi.l %d0,&0x3fff+0x0001 # would result unfl?
13990 beq.w fsglmul_may_unfl # result may rnd to no unfl
13991 bgt.w fsglmul_unfl # result will underflow
14007 fmovm.x &0x80,FP_SCR0(%a6) # store out result
14017 fmovm.x FP_SCR0(%a6),&0x80 # return result in fp0
14043 btst &neg_bit,FPSR_CC(%a6) # is result negative?
14047 bsr.l ovf_res # calculate default result
14049 fmovm.x (%a0),&0x80 # return default result in fp0
14053 fmovm.x &0x80,FP_SCR0(%a6) # move result to stack
14082 fabs.x %fp0,%fp1 # make a copy of result
14083 fcmp.b %fp1,&0x2 # is |result| >= 2.b?
14086 # no, it didn't overflow; we have correct result
14109 fmovm.x &0x80,FP_SCR0(%a6) # store out result
14111 lea FP_SCR0(%a6),%a0 # pass: result addr
14113 bsr.l unf_res4 # calculate default result
14115 fmovm.x FP_SCR0(%a6),&0x80 # return default result in fp0
14131 fmovm.x &0x40,FP_SCR0(%a6) # save result to stack
14159 fabs.x %fp0,%fp1 # make a copy of result
14160 fcmp.b %fp1,&0x2 # is |result| > 2.b?
14165 # we still don't know if underflow occurred. result is ~ equal to 2. but,
14166 # we don't know if the result was an underflow that rounded up to a 2 or
14168 # using RZ as the rounding mode to see what the pre-rounded result is.
14184 fcmp.b %fp1,&0x2 # is |result| < 2.b?
14273 # unf_res4() - return default underflow result for sglop #
14274 # ovf_res() - return default overflow result #
14275 # res_qnan() - return QNAN result #
14276 # res_snan() - return SNAN result #
14284 # fp0 = result #
14292 # compute a result. Check if the regular operands would have taken #
14293 # an exception. If so, return the default overflow/underflow result #
14295 # result operand to the proper exponent. #
14336 cmpi.l %d0,&0x3fff-0x0000 # will result underflow?
14354 fmovm.x &0x80,FP_SCR0(%a6) # store result on stack
14364 fmovm.x FP_SCR0(%a6),&0x80 # return result in fp0
14380 fmovm.x &0x01,-(%sp) # save result to stack
14382 add.l &0xc,%sp # clear result
14396 btst &neg_bit,FPSR_CC(%a6) # is result negative
14400 bsr.l ovf_res # calculate default result
14402 fmovm.x (%a0),&0x80 # return default result in fp0
14406 fmovm.x &0x80,FP_SCR0(%a6) # move result to stack
14442 fmovm.x &0x80,FP_SCR0(%a6) # store out result
14444 lea FP_SCR0(%a6),%a0 # pass: result addr
14446 bsr.l unf_res4 # calculate default result
14448 fmovm.x FP_SCR0(%a6),&0x80 # return default result in fp0
14464 fmovm.x &0x40,FP_SCR0(%a6) # save result to stack
14495 fabs.x %fp0,%fp1 # make a copy of result
14496 fcmp.b %fp1,&0x1 # is |result| > 1.b?
14501 # we still don't know if underflow occurred. result is ~ equal to 1. but,
14502 # we don't know if the result was an underflow that rounded up to a 1
14505 # result is. this case should be relatively rare.
14519 fcmp.b %fp1,&0x1 # is |result| < 1.b?
14609 # ovf_res() - return default overflow result #
14610 # unf_res() - return default underflow result #
14611 # res_qnan() - set QNAN result #
14612 # res_snan() - set SNAN result #
14613 # res_operr() - set OPERR result #
14622 # fp0 = result #
14629 # occur. Then, check result exponent to see if exception would have #
14630 # occurred. If so, return default result and maybe EXOP. Else, insert #
14631 # the correct result exponent and return. Set FPSR bits as appropriate. #
14676 fbeq.w fadd_zero_exit # if result is zero, end now
14680 fmovm.x &0x01,-(%sp) # save result to stack
14702 fmovm.x (%sp)+,&0x80 # return result in fp0
14730 btst &neg_bit,FPSR_CC(%a6) # is result negative?
14733 bsr.l ovf_res # calculate default result
14735 fmovm.x (%a0),&0x80 # return default result in fp0
14792 fmovm.x &0x80,FP_SCR0(%a6) # store out result
14794 lea FP_SCR0(%a6),%a0 # pass: result addr
14796 bsr.l unf_res # calculate default result
14798 fmovm.x FP_SCR0(%a6),&0x80 # return default result in fp0
14818 fmovm.x &0x40,FP_SCR0(%a6) # save result to stack
14839 # result is equal to the smallest normalized number in the selected precision
14840 # if the precision is extended, this result could not have come from an
14859 # ok, so now the result has a exponent equal to the smallest normalized
14861 # 0x8000000000000000 and this mantissa is the result of rounding non-zero
14863 # now, we must determine whether the pre-rounded result was an underflow
14866 # seeing if the new result is smaller or equal to the current result.
14882 fcmp.x %fp0,%fp1 # is first result > second?
15018 # both operands are INFs. an OPERR will result if the INFs have
15062 # ovf_res() - return default overflow result #
15063 # unf_res() - return default underflow result #
15064 # res_qnan() - set QNAN result #
15065 # res_snan() - set SNAN result #
15066 # res_operr() - set OPERR result #
15075 # fp0 = result #
15082 # occur. Then, check result exponent to see if exception would have #
15083 # occurred. If so, return default result and maybe EXOP. Else, insert #
15084 # the correct result exponent and return. Set FPSR bits as appropriate. #
15129 fbeq.w fsub_zero_exit # if result zero, end now
15133 fmovm.x &0x01,-(%sp) # save result to stack
15155 fmovm.x (%sp)+,&0x80 # return result in fp0
15183 btst &neg_bit,FPSR_CC(%a6) # is result negative?
15186 bsr.l ovf_res # calculate default result
15188 fmovm.x (%a0),&0x80 # return default result in fp0
15245 fmovm.x &0x80,FP_SCR0(%a6) # store out result
15247 lea FP_SCR0(%a6),%a0 # pass: result addr
15249 bsr.l unf_res # calculate default result
15251 fmovm.x FP_SCR0(%a6),&0x80 # return default result in fp0
15271 fmovm.x &0x40,FP_SCR0(%a6) # store result to stack
15292 # result is equal to the smallest normalized number in the selected precision
15293 # if the precision is extended, this result could not have come from an
15312 # ok, so now the result has a exponent equal to the smallest normalized
15314 # 0x8000000000000000 and this mantissa is the result of rounding non-zero
15316 # now, we must determine whether the pre-rounded result was an underflow
15319 # seeing if the new result is smaller or equal to the current result.
15335 fcmp.x %fp0,%fp1 # is first result > second?
15470 # both operands are INFs. an OPERR will result if the INFs have the
15508 # unf_res() - return default underflow result #
15509 # ovf_res() - return default overflow result #
15510 # res_qnan_1op() - return QNAN result #
15511 # res_snan_1op() - return SNAN result #
15518 # fp0 = result #
15526 # compute a result. Check if the regular operands would have taken #
15527 # an exception. If so, return the default overflow/underflow result #
15529 # result operand to the proper exponent. #
15626 fmovm.x &0x80,FP_SCR0(%a6) # store out result
15635 fmovm.x FP_SCR0(%a6),&0x80 # return result in fp0
15685 fmovm.x &0x80,FP_SCR0(%a6) # store out result
15687 lea FP_SCR0(%a6),%a0 # pass: result addr
15689 bsr.l unf_res # calculate default result
15691 fmovm.x FP_SCR0(%a6),&0x80 # return default result in fp0
15696 # Therefore, we must return the result rounded to extended precision.
15738 # OVFL is not enabled; therefore, we must create the default result by
15742 btst &neg_bit,FPSR_CC(%a6) # is result negative?
15745 bsr.l ovf_res # calculate default result
15747 fmovm.x (%a0),&0x80 # return default result in fp0
15787 fmov.x %fp0,%fp1 # make a copy of result
15788 fcmp.b %fp1,&0x1 # is |result| >= 1.b?
15791 # no, it didn't overflow; we have correct result
15841 # OVFL/UNFL exceptions will result #
15894 bsr.l norm # normalize the denorm; result is new exp
15930 bsr.l norm # normalize the denorm; result is new exp
15979 # value to the previous value. Return the result. #
16106 # value to the previous value. Return the result. #
16141 # res_qnan(): return default result w/ QNAN operand for dyadic #
16142 # res_snan(): return default result w/ SNAN operand for dyadic #
16143 # res_qnan_1op(): return dflt result w/ QNAN operand for monadic #
16144 # res_snan_1op(): return dflt result w/ SNAN operand for monadic #
16154 # fp0 = default result #
16158 # nonsignalling NAN, then that NAN is returned as the result. If both #
16160 # nonsignalling NAN is returned as the result. #
16218 # res_operr(): return default result during operand error #
16227 # fp0 = default operand error result #
16230 # An nonsignalling NAN is returned as the default result when #
16685 # For the IEEE aware tests, action is only taken if the result is false.#
16958 # For the IEEE nonaware tests, we set the result based on the #
17201 # For the IEEE aware tests, we only have to set the result based on the #
17300 # For the IEEE aware tests, we only have to set the result based on the #
17453 # store_dreg_b() - store result to data register file #
17456 # _dmem_write_byte() - store result to memory #
17474 # the result is stored to the data register file or memory #
17528 # For the IEEE nonaware tests, we set the result based on the #
17778 # For the IEEE aware tests, we only have to set the result based on the #
17870 # For the IEEE aware tests, we only have to set the result based on the #
18048 # is enabled. if so, don't store result and correct stack frame
18057 # the result has been selected.
18058 # now, check to see if the result is to be stored in the data register
18062 mov.l %d0,%a0 # save result for a moment
18072 mov.l %a0,%d0 # pass result in d0
18073 bsr.l store_dreg_b # save result in regfile
18089 mov.l %a0,%d0 # pass result in d0
18091 bsr.l _dmem_write_byte # write result byte
18098 # addressing mode is post-increment. write the result byte. if the write
18102 mov.l %a0,%d0 # pass result in d0
18104 bsr.l _dmem_write_byte # write result byte
18116 # addressing mode is pre-decrement. write the result byte. if the write
18120 mov.l %a0,%d0 # pass result in d0
18122 bsr.l _dmem_write_byte # write result byte
20155 # ovf_res() - create default overflow result for sgl/dbl precision#
20156 # unf_res() - create default underflow result for sgl/dbl prec. #
20157 # dst_dbl() - create rounded dbl precision result. #
20158 # dst_sgl() - create rounded sgl precision result. #
20172 # fp0 : intermediate underflow or overflow result if #
20181 # the rounded result. Also, since exceptions are disabled, this also #
20182 # create the correct OPERR default result if appropriate. #
20192 # packed result. #
20364 # we copy the extended precision result to FP_SCR0 so that the reserved
20372 fmovm.x SRC(%a0),&0x80 # return result
20513 bsr.l unf_res # calc default underflow result
20546 tst.b 3+SRC_HI(%a0) # is result inexact?
20548 tst.l SRC_LO(%a0) # is result inexact?
20559 # overflow result. DON'T save the returned ccodes from ovf_res() since
20564 bsr.l ovf_res # calc OVFL result
20565 fmovm.x (%a0),&0x80 # load default overflow result
20597 # for the correct result.
20742 bsr.l unf_res # calc default underflow result
20780 # overflow result. DON'T save the returned ccodes from ovf_res() since
20785 bsr.l ovf_res # calc OVFL result
20786 fmovm.x (%a0),&0x80 # load default overflow result
20808 # for the correct result.
20840 # d0 = hi(double precision result) #
20841 # d1 = lo(double precision result) #
20893 or.l %d0,%d1 # put them in double result
20907 # d0 = single precision result #
21673 # _denorm(): denormalize an intermediate result #
21685 # a0 = pointer to the denormalized result #
22011 # _round(): round result according to precision/mode #
22030 # a0 = pointer to rounded result #
22035 # The result is not typed - the tag field is invalid. The #
22036 # result is still in the internal extended format. #
22038 # The INEX bit of USER_FPSR will be set if the rounded result was #
22048 # If (G,R,S == 0) then result is exact and round is done, else set
22667 # unf_res(): routine to produce default underflow result of a #
22683 # a0 = pointer to default underflow result in extended precision #
22684 # d0.b = result FPSR_cc which caller may or may not want to save #
22691 # denormalized result. #
22716 bsr.l _denorm # denorm result
22730 # result is now rounded properly. convert back to normal format
22732 tst.b FTEMP_SGN(%a0) # is "internal result" sign set?
22733 beq.b unf_res_chkifzero # no; result is positive
22734 bset &0x7, FTEMP_EX(%a0) # set result sgn
22778 bsr.l _denorm # denorm result
22790 # result is now rounded properly. convert back to normal format
22792 tst.b FTEMP_SGN(%a0) # is "internal result" sign set?
22793 beq.b unf_res4_chkifzero # no; result is positive
22794 bset &0x7,FTEMP_EX(%a0) # set result sgn
22824 # ovf_res(): routine to produce the default overflow result of #
22841 # a0 = points to extended precision result #
22845 # The default overflow result can be determined by the sign of #
22846 # the result and the rounding mode/prec in effect. These bits are #
22847 # concatenated together to create an index into the default result #
22848 # table. A pointer to the correct result is returned in a0. The #
22856 andi.w &0x10,%d1 # keep result sign
22865 and.w &0x10, %d1 # keep result sign
22873 # use the rounding mode, precision, and result sign as in index into the
22874 # two tables below to fetch the default result and the result ccodes.
22877 mov.b (tbl_ovfl_cc.b,%pc,%d0.w*1), %d0 # fetch result ccodes
22878 lea (tbl_ovfl_result.b,%pc,%d1.w*8), %a0 # return result ptr
23443 # Clean up and return with result in fp0.
23471 # FP_SCR0(a6) = bcd format result on the stack. #
23542 # result is exactly 10^LEN, decrement ILOG and divide #
23599 # a0: ptr for original operand/final result
23620 # the input and test for denormalized result.
23679 # a0: ptr for original operand/final result
23741 # a0: ptr for original operand/final result
23813 # a0: ptr for original operand/final result
23916 # a0: ptr for original operand/final result
23944 # multiplication and guarantee a result without exception.
23957 bmi.w sc_mul_err # is result is DENORM, punt!!!
24004 # a0: ptr for original operand/final result
24097 # result is exactly 10^LEN, decrement ILOG and divide
24222 # /ptr to first mantissa byte in result string
24228 # F_SCR1:x/Work area for final result
24265 addq.l &3,%a0 # a0 points to M16 byte in result
24294 # a0: ptr to result string/ptr to L_SCR1(a6)
24300 # F_SCR1:Work area for final result/BCD result
24380 # F_SCR1:BCD result with correct signs
24576 # Clean up and return with result in fp0.
24607 # result. This means the operating system wants an access error frame #