Lines Matching +full:1 +full:a0

14 |ROUND	idnt    2,1 | Motorola 040 Floating Point Software Package
23 | a0 points to the input operand in the internal extended format
35 | On return the value pointed to by a0 is correctly rounded,
36 | a0 is preserved and the g-r-s bits in d0 are cleared.
78 | If sign of fp number = 0 (positive), then add 1 to l.
82 tstb LOCAL_SGN(%a0) |check for sign
91 | If sign of fp number = 1 (negative), then add 1 to l.
95 tstb LOCAL_SGN(%a0) |check for sign
112 | If (g=1), then add 1 to l and if (r=s=0), then clear l
117 asll #1,%d0 |shift g-bit to c-bit
118 bcc truncate |if (g=1) then
145 cmpiw #1,%d1
148 bfextu LOCAL_HI(%a0){#24:#2},%d3 |sgl prec. g-r are 2 bits right
151 movel LOCAL_HI(%a0),%d2 |get word 2 for s-bit test
154 tstl LOCAL_LO(%a0) |test lower mantissa
160 bfextu LOCAL_LO(%a0){#21:#2},%d3 |dbl-prec. g-r are 2 bits right
163 movel LOCAL_LO(%a0),%d2 |get lower mantissa for s-bit test
179 .set ad_1_sgl,0x00000100 | constant to add 1 to l-bit in sgl prec
180 .set ad_1_dbl,0x00000800 | constant to add 1 to l-bit in dbl prec
183 |Jump table for adding 1 to the l-bit indexed by rnd prec
194 addl #ad_1_sgl,LOCAL_HI(%a0)
196 roxrw LOCAL_HI(%a0) |shift v-bit back in
197 roxrw LOCAL_HI+2(%a0) |shift v-bit back in
198 addw #0x1,LOCAL_EX(%a0) |and incr exponent
202 andiw #0xfe00,LOCAL_HI+2(%a0) |clear the l-bit
204 andil #0xffffff00,LOCAL_HI(%a0) |truncate bits beyond sgl limit
205 clrl LOCAL_LO(%a0) |clear d2
212 addql #1,LOCAL_LO(%a0) |add 1 to l-bit
214 addql #1,LOCAL_HI(%a0) |propagate carry
216 roxrw LOCAL_HI(%a0) |mant is 0 so restore v-bit
217 roxrw LOCAL_HI+2(%a0) |mant is 0 so restore v-bit
218 roxrw LOCAL_LO(%a0)
219 roxrw LOCAL_LO+2(%a0)
220 addw #0x1,LOCAL_EX(%a0) |and inc exp
224 andib #0xfe,LOCAL_LO+3(%a0) |clear the l bit
231 addl #ad_1_dbl,LOCAL_LO(%a0)
233 addql #1,LOCAL_HI(%a0) |propagate carry
235 roxrw LOCAL_HI(%a0) |mant is 0 so restore v-bit
236 roxrw LOCAL_HI+2(%a0) |mant is 0 so restore v-bit
237 roxrw LOCAL_LO(%a0)
238 roxrw LOCAL_LO+2(%a0)
239 addw #0x1,LOCAL_EX(%a0) |incr exponent
243 andiw #0xf000,LOCAL_LO+2(%a0) |clear the l-bit
246 andil #0xfffff800,LOCAL_LO(%a0) |truncate bits beyond dbl limit
275 | NRM_SET shifts and decrements until there is a 1 set in the integer
278 | NRM_ZERO shifts and decrements until there is a 1 set in the integer
289 | Distance to first 1 bit in mantissa = X
305 movew LOCAL_EX(%a0),%d0
312 movel LOCAL_HI(%a0),%d1
313 movel LOCAL_LO(%a0),%d2
315 bfffo %d1{#0:#32},%d3 |get the distance to the first 1
335 movew %d0,LOCAL_EX(%a0)
336 movel %d1,LOCAL_HI(%a0)
337 movel %d2,LOCAL_LO(%a0)
350 movew #0,LOCAL_EX(%a0) |no mantissa bits set. Set exp = 0.
359 bfffo LOCAL_HI(%a0){#0:#32},%d7 |find first 1 in ms mant to d7)
364 subw %d7,LOCAL_EX(%a0) |sub exponent by count
365 movel LOCAL_HI(%a0),%d0 |d0 has ms mant
366 movel LOCAL_LO(%a0),%d1 |d1 has ls mant
368 lsll %d7,%d0 |shift first 1 to j bit position
371 movel %d6,LOCAL_LO(%a0) |store ls mant into memory
377 movel %d0,LOCAL_HI(%a0) |store ms mant into memory
386 movew LOCAL_EX(%a0),%d0 |d0 has exponent
387 movel LOCAL_LO(%a0),%d1 |d1 has ls mant
389 bfffo %d1{#0:#32},%d7 |find first 1 in ls mant to d7)
391 lsll %d7,%d1 |shift first 1 to integer bit in ms mant
392 movew %d0,LOCAL_EX(%a0) |store ms mant
393 movel %d1,LOCAL_HI(%a0) |store exp
394 clrl LOCAL_LO(%a0) |clear ls mant
403 | a0 points to the operand to be denormalized
408 | a0 points to the denormalized result
420 btstb #6,LOCAL_EX(%a0) |check for exponents between $7fff-$4000
422 bsetb #7,LOCAL_EX(%a0) |sign extend if it is so
436 cmpil #1,%d0 |if 1 then single precision
442 subw LOCAL_EX(%a0),%d0 |diff = threshold - exp
455 subw LOCAL_EX(%a0),%d0 |diff = threshold - exp
466 tstl LOCAL_HI(%a0) |check for any bits set
468 tstl LOCAL_LO(%a0) |check for any bits set
475 movew %d1,LOCAL_EX(%a0) |load exp with threshold
476 movel #0,LOCAL_HI(%a0) |set d1 = 0 (ms mantissa)
477 movel #0,LOCAL_LO(%a0) |set d2 = 0 (ms mantissa)
488 | a0 points to the operand to be denormalized
492 | a0 points to the denormalized operand
498 | Dnrm_lp can be called with a0 pointing to ETEMP or WBTEMP and there
512 movel LOCAL_LO(%a0),FP_SCR2+LOCAL_LO(%a6)
515 subw LOCAL_EX(%a0),%d1 |d1 = threshold - uns exponent
534 movew %d0,LOCAL_EX(%a0) |exponent = denorm threshold
537 bfextu LOCAL_EX(%a0){%d0:#32},%d2
539 bfextu LOCAL_HI(%a0){%d0:#32},%d1 |d1 = new LOCAL_LO
541 movel %d2,LOCAL_HI(%a0) |store new LOCAL_HI
542 movel %d1,LOCAL_LO(%a0) |store new LOCAL_LO
563 movew %d0,LOCAL_EX(%a0) |unsigned exponent = threshold
567 bfextu LOCAL_EX(%a0){%d0:#32},%d2
569 bfextu LOCAL_HI(%a0){%d0:#32},%d1 |d1 = new G,R,S
582 clrl LOCAL_HI(%a0) |store LOCAL_HI = 0
583 movel %d2,LOCAL_LO(%a0) |store LOCAL_LO
598 movew %d0,LOCAL_EX(%a0)
599 tstw LOCAL_SGN(%a0)
602 orl #0x80000000,LOCAL_EX(%a0)
612 clrl LOCAL_HI(%a0)
613 clrl LOCAL_LO(%a0)
619 movel LOCAL_HI(%a0),%d0
625 movel LOCAL_HI(%a0),%d0
626 bfextu %d0{#1:#31},%d1
628 lsrl #1,%d0 |shift high bit into R bit
633 tstl LOCAL_LO(%a0)
644 clrl LOCAL_HI(%a0)
645 clrl LOCAL_LO(%a0)