Lines Matching defs:or

24 so long as this entire notice is retained without alteration in any modified and/or
26 No licenses are granted by implication, estoppel or otherwise under any patents
27 or trademarks of Motorola, Inc.
589 # store_fpreg() - store opclass 0 or 2 result to FP regfile #
590 # unnorm_fix() - change UNNORM operands to NORM or ZERO #
614 # exception is enabled or disabled in the FPCR. For the disabled case, #
617 # then stored in either the FP regfile, data regfile, or memory. #
674 btst &0x5,1+EXC_CMDREG(%a6) # is operation monadic or dyadic?
684 bsr.l unnorm_fix # yes; convert to NORM,DENORM,or ZERO
718 # traps are enabled or disabled.
829 # store_fpreg() - store opclass 0 or 2 result to FP regfile #
830 # unnorm_fix() - change UNNORM operands to NORM or ZERO #
854 # exception is enabled or disabled in the FPCR. For the disabled case, #
857 # then stored in either the FP regfile, data regfile, or memory. #
912 btst &0x5,1+EXC_CMDREG(%a6) # is op monadic or dyadic?
927 bsr.l unnorm_fix # yes; convert to NORM,DENORM,or ZERO
1026 # But, whether bogus or not, if inexact is enabled AND it occurred,
1104 # store_fpreg() - store opclass 0 or 2 result to FP regfile #
1105 # unnorm_fix() - change UNNORM operands to NORM or ZERO #
1141 # Two main instruction types can enter here: (1) DENORM or UNNORM #
1142 # unimplemented data types. These can be either opclass 0,2 or 3 #
1144 # also of opclasses 0,2, or 3. #
1165 # _fpsp_done() or through _real_trace() if a Trace exception is pending #
1169 # _real_unfl(), or _real_ovfl() as appropriate. PACKED opclass 3 #
1214 btst &0x5,EXC_SR(%a6) # user or supervisor mode?
1220 # if the exception is an opclass zero or two unimplemented data type
1261 # precision format if the src format was single or double and the
1262 # source data type was an INF, NAN, DENORM, or UNNORM
1266 # we don't know whether the src operand or the dst operand (or both) is the
1267 # UNNORM or DENORM. call the function that tags the operand type. if the
1268 # input is an UNNORM, then convert it to a NORM, DENORM, or ZERO.
1273 bsr.l unnorm_fix # yes; convert to NORM,DENORM,or ZERO
1282 btst &0x5,1+EXC_CMDREG(%a6) # is operation monadic or dyadic?
1293 bsr.l unnorm_fix # yes; convert to NORM,DENORM,or ZERO
1330 cmpi.b %d0,&0x38 # is instr fcmp or ftst?
1357 # save the result in the proper fp reg (unless the op is fcmp or ftst);
1376 # * this is the case where we must call _real_inex() now or else
1400 bsr.l funimp_skew # skew sgl or dbl inputs
1427 # or double precision denorm, inf, or nan, the operand needs to be
1457 or.w %d0,LOCAL_EX(%a0) # insert new exponent
1489 or.w %d0,LOCAL_EX(%a0) # insert new exponent
1515 # the src can ONLY be a DENORM or an UNNORM! so, don't make any big subroutine
1558 # on extended precision opclass three instructions using pre-decrement or
1733 mov.l %a0,%usp # to or not...
1758 # frame or it will get overwritten when the exc stack frame is shifted "down".
1827 btst &0x5,1+EXC_CMDREG(%a6) # is operation monadic or dyadic?
1838 bsr.l unnorm_fix # yes; convert to NORM,DENORM,or ZERO
1875 cmpi.b %d0,&0x38 # is instr fcmp or ftst?
1883 btst &0x5,EXC_SR(%a6) # user or supervisor?
1935 # save the result in the proper fp reg (unless the op is fcmp or ftst);
1954 # * this is the case where we must call _real_inex() now or else
1964 cmpi.b %d0,&0x6 # is exception INEX? (6 or 7)
1980 btst &0x5,EXC_SR(%a6) # user or supervisor?
2083 bsr.l unnorm_fix # yes; convert to NORM,DENORM,or ZERO
2114 btst &0x5,EXC_SR(%a6) # user or supervisor?
2298 # have to make sure that for single or double source operands that the
2375 # store_fpreg() - store opclass 0 or 2 result to FP regfile #
2376 # unnorm_fix() - change UNNORM operands to NORM or ZERO #
2403 # (1) FP Instructions using extended precision or packed immediate #
2406 # (3) The "fmovm.l" instruction w/ 2 or 3 control registers. #
2416 # FPU before exiting. In either the enabled or disabled cases, we #
2505 btst &0xa,%d0 # is src fmt x or p?
2529 # The packed operand is an INF or a NAN if the exponent field is all ones.
2531 cmpi.w %d0,&0x7fff # INF or NAN?
2532 beq.b iea_op_setsrc # operand is an INF or NAN
2562 btst &0x5,1+EXC_CMDREG(%a6) # is operation monadic or dyadic?
2580 # the operation is fsincos, ftst, or fcmp. only fcmp is dyadic
2610 # OPERR : all reg-reg or mem-reg operations that can normally operr
2623 # now, we save the result, unless, of course, the operation was ftst or fcmp.
2671 # or underflow that was disabled, then we have to force an overflow or
2737 btst &14,%d0 # ctrl or data reg
2742 btst &0x5,EXC_SR(%a6) # user or supervisor mode
2974 # the instruction is a fmovm.l with 2 or 3 registers.
3034 btst &0x5,(%sp) # user or supervisor mode?
3096 # operr result out to memory or data register file as it should. #
3132 # this would be the case for opclass two operations with a source infinity or
3133 # denorm operand in the sgl or dbl format. NANs also become skewed, but can't
3157 # operand and save the appropriate minimum or maximum integer value
3171 # the operand is either an infinity or a QNAN.
3267 # _calc_ea_fout() - fix An if <ea> is -() or ()+; also get <ea> #
3286 # SNAN result out to memory or data register file as it should. #
3294 # if the effective addressing mode was -() or ()+, then the address #
3328 # this would be the case for opclass two operations with a source infinity or
3329 # denorm operand in the sgl or dbl format. NANs also become skewed and must be
3355 # operand and save the appropriate minimum or maximum integer value
3434 or.l %d1,%d0 # create sgl SNAN
3449 or.l %d1,%d0 # create sgl SNAN
3463 or.l %d1,FP_SCR0_EX(%a6) # create dbl hi
3470 or.l %d1,FP_SCR0_HI(%a6) # create dbl lo
3481 # for extended precision, if the addressing mode is pre-decrement or
3563 # store_fpreg() - store opclass 0 or 2 result to FP regfile #
3564 # unnorm_fix() - change UNNORM operands to NORM or ZERO #
3588 # inexact result out to memory or data register file as it should. #
3656 btst &0x5,1+EXC_CMDREG(%a6) # is operation monadic or dyadic?
3669 bsr.l unnorm_fix # yes; convert to NORM,DENORM,or ZERO
3792 # in the sgl or dbl format.
3834 # appropriate "callout" (for "disabled" and "Line F") or to the #
3934 # load_fop() - load src/dst ops from memory and/or FP regfile #
3935 # store_fpreg() - store opclass 0 or 2 result to FP regfile #
3972 # exceptional or non-exceptional cases, we must check to see if the #
3988 # In any of the above scenarios, if a _mem_read() or _mem_write() #
4062 btst &22,%d0 # type 0 or 1 ?
4088 or.b STAG(%a6),%d1 # insert src optag bits
4134 btst &0x5,EXC_SR(%a6) # supervisor or user mode?
4205 # or underflow that was disabled, then we have to force an overflow or
4206 # underflow frame. the eventual overflow or underflow handler will see that
4209 # a disabled overflow or underflow has also happened.
4338 # I am assuming here that an "fs<cc>.b -(An)" or "fs<cc>.b (An)+" instruction
4386 # The ftrap<cc>, fs<cc>, or fdb<cc> is to take an enabled bsun. we must convert
4992 btst &0x5,(%sp) # user or supervisor mode?
5012 # fp0 = sin(X) or cos(X) #
5029 # 2. If |X| >= 15Pi or |X| < 2**(-40), go to 7. #
5032 # k = N mod 4, so in particular, k = 0,1,2,or 3. #
5057 # 1. If |X| >= 15Pi or |X| < 2**(-40), go to 6. #
5060 # k = N mod 4, so in particular, k = 0,1,2,or 3. #
5065 # j1 exclusive or with the l.s.b. of k. #
5265 or.l &0x3F800000,%d1 # D0 IS SGN IN SINGLE
5309 # here, the operation may underflow iff the precision is sgl or dbl.
5487 or.l &0x3F800000,%d1
5596 or.b &0x80,FP_SCR0_EX(%a6) # positive arg
5597 or.b &0x80,FP_SCR1_EX(%a6)
5649 or.l &0x5F000000,%d2 # d2 = SIGN(INARG)*2**63 IN SGL
5731 # 1. If |X| >= 15Pi or |X| < 2**(-40), go to 6. #
5734 # k = N mod 2, so in particular, k = 0 or 1. #
6027 or.b &0x80,FP_SCR0_EX(%a6) # positive arg
6028 or.b &0x80,FP_SCR1_EX(%a6)
6080 or.l &0x5F000000,%d2 # d2 = SIGN(INARG)*2**63 IN SGL
6160 # Step 1. If |X| >= 16 or |X| < 1/16, go to Step 5. #
6163 # Note that k = -4, -3,..., or 3. #
6388 or.l &0x04000000,XFRAC(%a6) # SET 6-TH BIT TO 1
6416 or.l %d1,ATANF(%a6) # ATANF IS NOW SIGN(F)*ATAN(|F|)
6675 or.l &0x3F800000,%d1 # +-1 IN SGL FORMAT
6766 tst.b (%a0) # is X positive or negative?
6798 # fp0 = exp(X) or exp(X)-1 #
6844 # or 63. #
6928 # Hence, exp(X) may overflow or underflow or neither. #
6932 # or underflow. The inexact exception is not generated in #
6969 # Notes: Exp(X) will surely overflow or underflow, depending on #
6973 # inexact together with either overflow or underflow. #
7001 # or 63. #
7352 tst.b (%a0) # is X positive or negative?
7449 or.w &0x8000,%d1 # signed/expo. of -2^(-M)
7617 # fp0 = exponent(X) or mantissa(X) #
7862 or.l &0x3F000000,%d1
7880 or.l &0x7FFB0000,%d1
7922 # 1. If |X| >= (5/2) log2 or |X| <= 2**(-40), go to 3. #
7929 # 3. (|X| <= 2**(-40) or |X| >= (5/2) log2). If |X| < 1, #
8034 or.l &0x3F800000,%d1 # SGN
8052 or.l &0x3F800000,%d1
8077 # fp0 = log(X) or log(1+X) #
8366 or.l &0x01000000,FFRAC(%a6) # GET F: ATTACH A 1 AT THE EIGHTH BIT
8533 or.l %d7,%d4 # (D3,D4,D5) normalized
8602 or.l &0x01000000,FFRAC(%a6) # F OBTAINED
8724 or.l &0x3F000000,%d1 # SIGN(X)*HALF
8762 # fp0 = log_10(X) or log_2(X) #
8926 # fp0 = 2**X or 10**X #
9182 or.l &0x00800001,%d1
9306 or.l &0x00800001,%d1
9463 # Precision is single or double
9468 # exponents out of range for single or double DO NOT cause underflow
9469 # or overflow.
9566 # >= 2^14, an overflow or underflow is returned. #
9651 # the src will force the dst to a DENORM value or worse. so, let's
9708 # The input operands X and Y can be either normalized or #
9712 # fp0 = FREM(X,Y) or FMOD(X,Y) #
9718 # signQ := signX EOR signY. Record whether MOD or REM #
9829 or.l %d7,%d4 # (D3,D4,D5) normalized
9874 or.l %d7,%d1 # (D0,D1,D2) normalized
9974 or.l %d7,%d1 # (D0,D1,D2) normalized
10045 or.l %d6,%d3 # sign and bits of Q
10049 # or.l %d3,%d6
10162 # - we only return the EXOP here if either underflow or #
10190 # result precision is single or double
10193 tst.b LOCAL_EX(%a0) # is denorm pos or neg?
10201 andi.b &0x0a,%d0 # is UNFL or INEX enabled?
10220 or.w %d0,FP_SCR0_EX(%a6) # insert new exponent
10240 tst.b (%a0) # is result pos or neg?
10343 # routine may have caused an underflow or overflow. #
10381 # an underflow or overflow exception occurred.
10400 or.l %d0,USER_FPSR(%a6)
10422 or.b %d1,%d0 # concat {sgn,mode,prec}
10548 # szr_inf(): Return +ZERO for a negative src operand or #
10558 # sopr_inf(): Return +INF for a positive src operand or #
10569 # setoxm1i(): Return minus one for a negative src operand or #
10944 or.l %d0,USER_FPSR(%a6) # store status
10969 or.l %d0,USER_FPSR(%a6) # store status
11584 or.b STAG(%a6),%d1 # combine src tags
11633 or.l %d1,USER_FPSR(%a6) # save INEX2,N
11643 or.w %d2,%d1 # concat old sign,new exp
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
11673 or.l %d1,USER_FPSR(%a6) # save INEX2,N
11677 or.l &ovfl_inx_mask,USER_FPSR(%a6) # set ovfl/aovfl/ainex
11680 andi.b &0x13,%d1 # is OVFL or INEX enabled?
11689 or.b %d0,FPSR_CC(%a6) # set INF,N if applicable
11696 # with an extra -0x6000. if the precision is single or double, we need to
11702 bne.b fmul_ovfl_ena_sd # it's sgl or dbl
11715 or.w %d2,%d1 # concat old sign,new exp
11751 or.l %d1,USER_FPSR(%a6) # save INEX2,N
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
11789 or.l %d1,USER_FPSR(%a6) # save INEX2,N
11792 andi.b &0x0b,%d1 # is UNFL or INEX enabled?
11801 or.b %d0,FPSR_CC(%a6) # unf_res2 may have set 'Z'
11813 bne.b fmul_unfl_ena_sd # no, sgl or dbl
11835 or.w %d2,%d1 # concat old sign,new exp
11862 or.l %d1,USER_FPSR(%a6) # save INEX2,N
11871 # we don't know if the result was an underflow that rounded up to a 2 or
11970 mov.b SRC_EX(%a0),%d0 # exclusive or the signs
11994 mov.b SRC_EX(%a0),%d0 # exclusive or the signs
12011 mov.b SRC_EX(%a0),%d0 # exclusive or the signs
12045 # or ovf_res() to return the default result. Also return EXOP if #
12074 bne.w fin_not_ext # no, so go handle dbl or sgl
12078 # or overflow because of rounding to the correct precision. so...
12094 bne.w fin_not_ext # no, so go handle dbl or sgl
12122 or.w %d1,%d0 # concat new exo,old sign
12128 # operand is to be rounded to single or double precision
12150 # operand will NOT overflow or underflow when moved into the fp reg file
12161 or.l %d1,USER_FPSR(%a6) # save INEX2,N
12171 or.w %d1,%d2 # concat old sign,new exponent
12203 # if underflow or inexact is enabled, then go calculate the EXOP first.
12206 andi.b &0x0b,%d1 # is UNFL or INEX enabled?
12213 or.b %d0,FPSR_CC(%a6) # unf_res may have set 'Z'
12218 # operand will underflow AND underflow or inexact is enabled.
12233 or.w %d1,%d2 # concat old sign,new exp
12251 or.l %d1,USER_FPSR(%a6) # save INEX2,N
12254 or.l &ovfl_inx_mask,USER_FPSR(%a6) # set ovfl/aovfl/ainex
12257 andi.b &0x13,%d1 # is OVFL or INEX enabled?
12269 or.b %d0,FPSR_CC(%a6) # set INF,N if applicable
12287 or.w %d2,%d1
12305 or.l %d1,USER_FPSR(%a6) # save INEX2,N
12402 or.b STAG(%a6),%d1 # combine src tags
12447 or.l %d1,USER_FPSR(%a6) # save INEX2,N
12457 or.w %d2,%d1 # concat old sign,new exp
12485 or.l %d0,USER_FPSR(%a6) # save INEX,N
12497 or.l &ovfl_inx_mask,USER_FPSR(%a6) # set ovfl/aovfl/ainex
12500 andi.b &0x13,%d1 # is OVFL or INEX enabled?
12508 or.b %d0,FPSR_CC(%a6) # set INF if applicable
12515 bne.b fdiv_ovfl_ena_sd # no, do sgl or dbl
12528 or.w %d2,%d1 # concat old sign,new exp
12559 or.l %d1,USER_FPSR(%a6) # save INEX2,N
12562 andi.b &0x0b,%d1 # is UNFL or INEX enabled?
12571 or.b %d0,FPSR_CC(%a6) # 'Z' may have been set
12583 bne.b fdiv_unfl_ena_sd # no, sgl or dbl
12603 or.w %d2,%d1 # concat old sign,new exp
12630 or.l %d1,USER_FPSR(%a6) # save INEX2,N
12640 # or a normalized number that rounded down to a 1. so, redo the entire
12736 mov.b DST_EX(%a1),%d1 # or of input signs.
12768 # The destination was an INF w/ an In Range or ZERO source, the result is
12847 bne.w fneg_not_ext # no; go handle sgl or dbl
12851 # or overflow because of rounding to the correct precision. so...
12871 bne.b fneg_not_ext # no; go handle sgl or dbl
12902 or.w %d1,%d0 # concat old sign, new exponent
12908 # operand is either single or double
12930 # operand will NOT overflow or underflow when moved in to the fp reg file
12941 or.l %d1,USER_FPSR(%a6) # save INEX2,N
12951 or.w %d1,%d2 # concat old sign,new exp
12983 # if underflow or inexact is enabled, go calculate EXOP first.
12986 andi.b &0x0b,%d1 # is UNFL or INEX enabled?
12993 or.b %d0,FPSR_CC(%a6) # unf_res may have set 'Z'
13013 or.w %d2,%d1 # concat new sign,new exp
13031 or.l %d1,USER_FPSR(%a6) # save INEX2,N
13034 or.l &ovfl_inx_mask,USER_FPSR(%a6) # set ovfl/aovfl/ainex
13037 andi.b &0x13,%d1 # is OVFL or INEX enabled?
13049 or.b %d0,FPSR_CC(%a6) # set INF,N if applicable
13067 or.w %d2,%d1 # concat sign,exp
13085 or.l %d1,USER_FPSR(%a6) # save INEX2,N
13222 # norms. Denorms are so low that the answer will either be a zero or a #
13247 or.l %d0,USER_FPSR(%a6) # set exception bits
13268 # for DENORMs, the result will be either (+/-)ZERO or (+/-)1.
13270 # so, we could either set these manually or force the DENORM
13328 # norms. Denorms are so low that the answer will either be a zero or a #
13349 or.l %d0,USER_FPSR(%a6) # set exception bits
13372 # so, we could either set these manually or force the DENORM
13440 # exponent would take an exception. If so, use unf_res() or ovf_res() #
13470 bne.b fabs_not_ext # no; go handle sgl or dbl
13474 # or overflow because of rounding to the correct precision. so...
13520 or.w %d1,%d0 # concat old sign, new exponent
13526 # operand is either single or double
13548 # operand will NOT overflow or underflow when moved in to the fp reg file
13559 or.l %d1,USER_FPSR(%a6) # save INEX2,N
13569 or.w %d1,%d2 # concat old sign,new exp
13599 # if underflow or inexact is enabled, go calculate EXOP first.
13601 andi.b &0x0b,%d1 # is UNFL or INEX enabled?
13608 or.b %d0,FPSR_CC(%a6) # set possible 'Z' ccode
13628 or.w %d2,%d1 # concat new sign,new exp
13646 or.l %d1,USER_FPSR(%a6) # save INEX2,N
13649 or.l &ovfl_inx_mask,USER_FPSR(%a6) # set ovfl/aovfl/ainex
13652 andi.b &0x13,%d1 # is OVFL or INEX enabled?
13664 or.b %d0,FPSR_CC(%a6) # set INF,N if applicable
13682 or.w %d2,%d1 # concat sign,exp
13700 or.l %d1,USER_FPSR(%a6) # save INEX2,N
13761 or.b STAG(%a6),%d1
13842 # 'N' bit for a negative QNAN or SNAN input so we must squelch it here.
13856 # If you have a DENORM and an INF or ZERO, just force the DENORM's j-bit to a one
13860 # (1) signs are (+) and the DENORM is the dst or
13965 or.b STAG(%a6),%d1
14004 or.l %d1,USER_FPSR(%a6) # save INEX2,N
14014 or.w %d2,%d1 # concat old sign,new exp
14031 or.l %d1,USER_FPSR(%a6) # save INEX2,N
14036 or.l &ovfl_inx_mask, USER_FPSR(%a6) # set ovfl/aovfl/ainex
14039 andi.b &0x13,%d1 # is OVFL or INEX enabled?
14048 or.b %d0,FPSR_CC(%a6) # set INF,N if applicable
14063 or.w %d2,%d1 # concat old sign,new exp
14080 or.l %d1,USER_FPSR(%a6) # save INEX2,N
14102 or.l %d1,USER_FPSR(%a6) # save INEX2,N
14105 andi.b &0x0b,%d1 # is UNFL or INEX enabled?
14114 or.b %d0,FPSR_CC(%a6) # 'Z' bit may have been set
14140 or.w %d2,%d1 # concat old sign,new exp
14157 or.l %d1,USER_FPSR(%a6) # save INEX2,N
14166 # we don't know if the result was an underflow that rounded up to a 2 or
14306 or.b STAG(%a6),%d1 # combine src tags
14351 or.l %d1,USER_FPSR(%a6) # save INEX2,N
14361 or.w %d2,%d1 # concat old sign,new exp
14378 or.l %d1,USER_FPSR(%a6) # save INEX,N
14389 or.w &ovfl_inx_mask,2+USER_FPSR(%a6) # set ovfl/aovfl/ainex
14392 andi.b &0x13,%d1 # is OVFL or INEX enabled?
14401 or.b %d0,FPSR_CC(%a6) # set INF if applicable
14416 or.w %d2,%d1 # concat old sign,new exp
14435 or.l %d1,USER_FPSR(%a6) # save INEX2,N
14438 andi.b &0x0b,%d1 # is UNFL or INEX enabled?
14447 or.b %d0,FPSR_CC(%a6) # 'Z' bit may have been set
14473 or.w %d2,%d1 # concat old sign, new exp
14493 or.l %d1,USER_FPSR(%a6) # save INEX2,N
14503 # or a normalized number that rounded down to a 1. so, redo the entire
14653 or.b STAG(%a6),%d1 # combine src tags
14674 or.l %d1,USER_FPSR(%a6) # save exc and ccode bits
14699 or.w %d2,%d1 # concat sign,new exp
14722 or.l &ovfl_inx_mask,USER_FPSR(%a6) # set ovfl/aovfl/ainex
14725 andi.b &0x13,%d1 # is OVFL or INEX enabled?
14734 or.b %d0,FPSR_CC(%a6) # set INF,N if applicable
14742 bne.b fadd_ovfl_ena_sd # no; prec = sgl or dbl
14749 or.w %d2,%d1 # concat sign,new exp
14785 or.l %d1,USER_FPSR(%a6) # save INEX,N
14788 andi.b &0x0b,%d1 # is UNFL or INEX enabled?
14797 or.b %d0,FPSR_CC(%a6) # 'Z' bit may have been set
14807 bne.b fadd_unfl_ena_sd # no; sgl or dbl
14826 or.w %d2,%d1 # concat sign,new exp
14864 # rounded "up" or a normalized number rounded "down".
14866 # seeing if the new result is smaller or equal to the current result.
14966 # the signs are the same. so determine whether they are positive or negative
14968 tst.b %d0 # are ZEROes positive or negative?
14976 # - Therefore, we return +ZERO if the rounding modes are RN,RZ, or RP.
14994 # one operand is a ZERO and the other is a DENORM or NORM. scale
14995 # the DENORM or NORM and jump to the regular fadd routine.
15022 mov.b SRC_EX(%a0),%d0 # exclusive or the signs
15106 or.b STAG(%a6),%d1 # combine src tags
15127 or.l %d1,USER_FPSR(%a6) # save exc and ccode bits
15152 or.w %d2,%d1 # insert new exponent
15175 or.l &ovfl_inx_mask,USER_FPSR(%a6) # set ovfl/aovfl/ainex
15178 andi.b &0x13,%d1 # is OVFL or INEX enabled?
15187 or.b %d0,FPSR_CC(%a6) # set INF,N if applicable
15202 or.w %d2,%d1 # concat sign,exp
15238 or.l %d1,USER_FPSR(%a6)
15241 andi.b &0x0b,%d1 # is UNFL or INEX enabled?
15250 or.b %d0,FPSR_CC(%a6) # 'Z' may have been set
15279 or.w %d2,%d1 # concat sgn,exp
15317 # rounded "up" or a normalized number rounded "down".
15319 # seeing if the new result is smaller or equal to the current result.
15428 # - Therefore, we return +ZERO if the rounding mode is RN,RZ, or RP
15446 # one operand is a ZERO and the other is a DENORM or a NORM.
15447 # scale the DENORM or NORM and jump to the regular fsub routine.
15474 mov.b SRC_EX(%a0),%d0 # exclusive or the signs
15559 bne.b fsqrt_not_ext # no; go handle sgl or dbl
15567 or.l %d1,USER_FPSR(%a6) # set N,INEX
15576 bne.b fsqrt_not_ext # no; go handle sgl or dbl
15587 # operand is either single or double
15611 # operand will NOT overflow or underflow when moved in to the fp reg file
15622 or.l %d1,USER_FPSR(%a6) # save INEX2,N
15632 or.w %d1,%d2 # concat old sign,new exp
15657 # the exponent is 3fff or 3ffe. if it's 3ffe, then it's a safe number
15677 or.l %d1,USER_FPSR(%a6) # save INEX2,N
15679 # if underflow or inexact is enabled, go calculate EXOP first.
15681 andi.b &0x0b,%d1 # is UNFL or INEX enabled?
15690 or.b %d0,FPSR_CC(%a6) # set possible 'Z' ccode
15710 or.w %d2,%d1 # concat new sign,new exp
15728 or.l %d1,USER_FPSR(%a6) # save INEX2,N
15731 or.l &ovfl_inx_mask,USER_FPSR(%a6) # set ovfl/aovfl/ainex
15734 andi.b &0x13,%d1 # is OVFL or INEX enabled?
15746 or.b %d0,FPSR_CC(%a6) # set INF,N if applicable
15764 or.w %d2,%d1 # concat sign,exp
15785 or.l %d1,USER_FPSR(%a6) # save INEX2,N
15817 tst.b SRC_EX(%a0) # is ZERO positive or negative?
15829 tst.b SRC_EX(%a0) # is INF positive or negative?
15858 # DST exponent was scaled by. If the SRC exponent is greater or equal, #
15909 or.w %d1,%d0 # concat {sgn,new exp}
15945 or.w %d1,%d0 # concat {sgn,new exp}
15991 or.w &0x3fff,%d0 # insert new operand's exponent(=0)
16047 btst &0x0,%d1 # is exp even or odd?
16069 btst &0x0,%d0 # is exp even or odd?
16118 or.w &0x3fff,%d0 # insert new operand's exponent(=0)
16187 or.l &nan_mask+aiop_mask+snan_mask, USER_FPSR(%a6)
16193 or.l &nan_mask, USER_FPSR(%a6)
16197 or.l &nan_mask+aiop_mask+snan_mask, USER_FPSR(%a6)
16205 or.l &aiop_mask+snan_mask, USER_FPSR(%a6)
16207 or.l &nan_mask, USER_FPSR(%a6)
16211 or.l &neg_mask, USER_FPSR(%a6)
16240 or.l &nan_mask+operr_mask+aiop_mask, USER_FPSR(%a6)
16268 # or false. #
16403 # greater than or equal:
16408 fbge.w fdbcc_ge_yes # greater than or equal?
16426 # not (greater than or equal):
16431 fbnge.w fdbcc_nge_yes # not (greater than or equal)?
16479 # less than or equal:
16484 fble.w fdbcc_le_yes # less than or equal?
16502 # not (less than or equal):
16507 fbnle.w fdbcc_nle_yes # not (less than or equal)?
16520 # greater or less than:
16525 fbgl.w fdbcc_gl_yes # greater or less than?
16537 # not (greater or less than):
16542 fbngl.w fdbcc_ngl_yes # not (greater or less than)?
16555 # greater, less, or equal:
16560 fbgle.w fdbcc_gle_yes # greater, less, or equal?
16570 # not (greater, less, or equal):
16575 fbngle.w fdbcc_ngle_yes # not (greater, less, or equal)?
16705 # unordered or less or equal:
16710 fbule.w fdbcc_ule_yes # unordered or less or equal?
16717 # ordered greater than or equal:
16722 fboge.w fdbcc_oge_yes # ordered greater than or equal?
16729 # unordered or less than:
16734 fbult.w fdbcc_ult_yes # unordered or less than?
16753 # unordered or greater or equal:
16758 fbuge.w fdbcc_uge_yes # unordered or greater than?
16765 # ordered less than or equal:
16770 fbole.w fdbcc_ole_yes # ordered greater or less than?
16777 # unordered or greater than:
16782 fbugt.w fdbcc_ugt_yes # unordered or greater than?
16789 # ordered greater or less than:
16794 fbogl.w fdbcc_ogl_yes # ordered greater or less than?
16801 # unordered or equal:
16806 fbueq.w fdbcc_ueq_yes # unordered or equal?
16897 # or false. #
17024 # greater than or equal:
17029 fbge.w ftrapcc_ge_yes # greater than or equal?
17047 # not (greater than or equal):
17052 fbnge.w ftrapcc_nge_yes # not (greater than or equal)?
17097 # less than or equal:
17102 fble.w ftrapcc_le_yes # less than or equal?
17120 # not (less than or equal):
17125 fbnle.w ftrapcc_nle_yes # not (less than or equal)?
17137 # greater or less than:
17142 fbgl.w ftrapcc_trap # greater or less than?
17153 # not (greater or less than):
17158 fbngl.w ftrapcc_ngl_yes # not (greater or less than)?
17170 # greater, less, or equal:
17175 fbgle.w ftrapcc_trap # greater, less, or equal?
17183 # not (greater, less, or equal):
17188 fbngle.w ftrapcc_ngle_yes # not (greater, less, or equal)?
17317 # unordered or less or equal:
17322 fbule.w ftrapcc_trap # unordered or less or equal?
17327 # ordered greater than or equal:
17332 fboge.w ftrapcc_trap # ordered greater than or equal?
17337 # unordered or less than:
17342 fbult.w ftrapcc_trap # unordered or less than?
17357 # unordered or greater or equal:
17362 fbuge.w ftrapcc_trap # unordered or greater than?
17367 # ordered less than or equal:
17372 fbole.w ftrapcc_trap # ordered greater or less than?
17377 # unordered or greater than:
17382 fbugt.w ftrapcc_trap # unordered or greater than?
17387 # ordered greater or less than:
17392 fbogl.w ftrapcc_trap # ordered greater or less than?
17397 # unordered or equal:
17402 fbueq.w ftrapcc_trap # unordered or equal?
17469 # or false. #
17474 # the result is stored to the data register file or memory #
17603 # greater than or equal:
17608 fbge.w fscc_ge_yes # greater than or equal?
17623 # not (greater than or equal):
17628 fbnge.w fscc_nge_yes # not (greater than or equal)?
17674 # less than or equal:
17679 fble.w fscc_le_yes # less than or equal?
17694 # not (less than or equal):
17699 fbnle.w fscc_nle_yes # not (less than or equal)?
17711 # greater or less than:
17716 fbgl.w fscc_gl_yes # greater or less than?
17728 # not (greater or less than):
17733 fbngl.w fscc_ngl_yes # not (greater or less than)?
17745 # greater, less, or equal:
17750 fbgle.w fscc_gle_yes # greater, less, or equal?
17760 # not (greater, less, or equal):
17765 fbngle.w fscc_ngle_yes # not (greater, less, or equal)?
17891 # unordered or less or equal:
17896 fbule.w fscc_ule_yes # unordered or less or equal?
17905 # ordered greater than or equal:
17910 fboge.w fscc_oge_yes # ordered greater than or equal?
17919 # unordered or less than:
17924 fbult.w fscc_ult_yes # unordered or less than?
17947 # unordered or greater or equal:
17952 fbuge.w fscc_uge_yes # unordered or greater than?
17961 # ordered less than or equal:
17966 fbole.w fscc_ole_yes # ordered greater or less than?
17975 # unordered or greater than:
17980 fbugt.w fscc_ugt_yes # unordered or greater than?
17989 # ordered greater or less than:
17994 fbogl.w fscc_ogl_yes # ordered greater or less than?
18003 # unordered or equal:
18008 fbueq.w fscc_ueq_yes # unordered or equal?
18059 # file or in memory.
18080 # if the addressing mode is post-increment or pre-decrement,
18204 # (1): postincrement or control addressing mode #
18240 btst &0x5,EXC_EXTWORD(%a6) # is it a move in or out?
18247 btst &0x4,EXC_EXTWORD(%a6) # control or predecrement?
18257 btst &0x5,EXC_SR(%a6) # user or supervisor mode?
18475 # or control bit string.
18919 btst &0xb,%d2 # is it word or long?
19015 btst &0xb,%d2 # is index word or long?
19059 btst &0xb,%d5 # is index word or long?
19140 btst &0x2,%d5 # pre or post indexing?
19378 or.w %d1,%d0 # concat mode,reg
19412 cmpi.b %d0,&0xc # is opsize ext or packed?
19564 # unnorm_fix() - convert normalized number to denorm or zero #
19589 # convert it to a DENORM or a ZERO. #
19593 # If the source operand is byte,word,long, or single, it may be #
19699 clr.b STAG(%a6) # either NORM or ZERO
19721 # LONG: can be either NORM or ZERO...
19734 # WORD: can be either NORM or ZERO...
19747 # BYTE: can be either NORM or ZERO...
19760 # SGL: can be either NORM, DENORM, ZERO, INF, QNAN or SNAN but not UNNORM
19789 # if the ea is -() or ()+, need to know # of bytes. #
19790 # (2) read it in from either user or supervisor space #
19798 clr.b STAG(%a6) # either NORM or ZERO
19984 or.w %d1, FP_SRC_EX(%a6) # {sgn,exp}
20070 or.w %d1, FP_SRC_EX(%a6) # {sgn,exp}
20150 # fout(): move from fp register to memory or data register #
20172 # fp0 : intermediate underflow or overflow result if #
20173 # OVFL/UNFL occurred for a sgl or dbl operand #
20179 # it's b,w,l,s,d,x, or p in size. b,w,l can be stored to either a data #
20180 # register or memory. The algorithm uses a standard "fmove" to create #
20183 # For sgl or dbl precision, overflow or underflow can occur. If #
20190 # word or a data register. The <ea> must be fixed as w/ extended #
20221 # is either a DENORM or a NORM.
20235 or.w %d1,2+USER_FPSR(%a6) # save new exc,accrued bits
20267 # is either a DENORM or a NORM.
20281 or.w %d1,2+USER_FPSR(%a6) # save new exc,accrued bits
20313 # is either a DENORM or a NORM.
20327 or.w %d1,2+USER_FPSR(%a6) # save new exc,accrued bits
20360 # is either a DENORM or a NORM.
20381 # in the pre-decrement case from supervisor mode or else we'll corrupt
20400 andi.b &0x0a,%d0 # is UNFL or INEX enabled?
20422 or.w %d0,FP_SCR0_EX(%a6) # insert new exponent
20440 # would cause either an underflow or overflow. these cases are handled
20468 or.w %d1,2+USER_FPSR(%a6) # set possible inex2/ainex
20537 andi.b &0x0a,%d1 # is UNFL or INEX enabled?
20587 andi.b &0x0a,%d1 # is UNFL or INEX enabled?
20678 # would cause either an underflow or overflow. these cases are handled
20706 or.w %d0,2+USER_FPSR(%a6) # set possible inex2/ainex
20758 andi.b &0x0a,%d1 # is UNFL or INEX enabled?
20798 andi.b &0x0a,%d1 # is UNFL or INEX enabled?
20884 or.l %d1,%d0 # put these bits in ms word of double
20893 or.l %d0,%d1 # put them in double result
20950 or.l %d1,%d0 # put these bits in ms word of single
20962 btst &0x4,EXC_CMDREG(%a6) # static or dynamic?
21620 # value in d0. The FP number can be DENORM or SNAN so we have to be #
21824 or.b %d2, 3+FTEMP_LO2(%a6)
21874 # subtle step here; or in the g,r,s at the bottom of FTEMP_LO to minimize
21878 or.b %d2, 3+FTEMP_LO2(%a6)
22056 or.w &inx2a_mask, 2+USER_FPSR(%a6) # set inex2/ainex
22223 bne.b ext_grs_not_ext # no; go handle sgl or dbl
22256 and.l &0x0000003f, %d2 # s bit is the or of all other
22281 and.l &0x000001ff, %d2 # s bit is the or-ing of all
22331 or.l %d3, %d0 # create hi(man)
22360 # unnorm_fix(): - changes an UNNORM to one of NORM, DENORM, or ZERO #
22373 # d0 = optype tag - is corrected to one of NORM, DENORM, or ZERO #
22374 # a0 = input operand has been converted to a norm, denorm, or #
22410 or.w %d0, %d1 # {sgn,new exp}
22684 # d0.b = result FPSR_cc which caller may or may not want to save #
22858 or.b %d0,%d1 # concat the two
22866 or.b %d0, %d1 # insert rnd mode
22868 or.b %d0, %d1 # insert rnd prec
22947 # frame w/ maybe a correction factor if the <ea> is -(an) or (an)+. #
22950 # If the packed operand is a ZERO,NAN, or INF, convert it to #
22970 # The packed operand is an INF or a NAN if the exponent field is all ones.
22972 cmpi.w %d0,&0x7fff # INF or NAN?
22974 rts # operand is an INF or NAN
23046 # Clean up and return. Check if the final mul or div was inexact. #
23119 or.l &0x40000000,%d4 # set SE in d4,
23120 or.l &0x40000000,(%a0) # and in working bcd
23215 # of 27 or less are exact, there is no need to use this routine to
23234 # and do append (+) or strip (-) zeros accordingly.
23270 or.l &0x40000000,%d4 # and set SE in d4
23271 or.l &0x40000000,(%a0) # and in memory
23409 or.l &0x40000000,(%a0) # and set SE bit
23466 # the input may be either normalized, unnormalized, or #
23478 # input. If input is unnormalized or denormalized, #
23499 # if it is a positive number, or the number of digits #
23527 # compensated for by 'or-ing' in the INEX2 flag to #
23540 # or less than LEN -1 digits, adjust ILOG and repeat from #
23726 # a positive number, or the number of digits after the
23769 or.l &opaop_mask,USER_FPSR(%a6) # set OPERR & AIOP in USER_FPSR
23807 # d2: x/0 or 24 for A9
23811 # d6: ILOG/ILOG or k if ((k<=0)&(ILOG<k))
23910 # d2: 0 or 24/unchanged
23960 or.w %d3,(%sp) # insert new exponent
23993 # for by 'or-ing' in the INEX2 flag to the lsb of Y.
24017 or.l &1,8(%a2) # or in 1 to lsb of mantissa
24066 or.l &0x80000000,(%a0) # if neg, use -Y
24078 or.w %d0,FPSR_EXCEPT(%a6)
24081 ## or.w %d0,FPSR_EXCEPT(%a6)
24095 # or less than LEN -1 digits, adjust ILOG and repeat from
24309 fbeq.w den_zero # if zero, use k-factor or 4933
24359 or.l &opaop_mask,USER_FPSR(%a6) # set OPERR & AIOP in USER_FPSR
24535 or.l %d6,%d2 # or in msbs from d3 into d2
24704 btst &0x5,(%sp) # supervisor or user mode?
24713 # if the effective addressing mode was predecrement or postincrement,
24771 cmpi.b EXC_VOFF(%a6),&0x30 # move in or out?
24774 btst &0x5,EXC_SR(%a6) # user or supervisor?