/* * products derived from this software without specific prior products * written permission * ALTERNATIVELY, this * * required INSTEAD OF the above restrictions. (This clause is * fp_util.S * * Copyright Roman Zippel, 1997. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, and the entire permission notice in its entirety, * including the disclaimer of warranties. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote * products derived from this software without specific prior * written permission. * * ALTERNATIVELY, this product may be distributed under the terms of * the GNU General Public License, in which case the provisions of the GPL are * required INSTEAD OF the above restrictions. (This clause is * necessary due to a potential bad interaction between the GPL and * the restrictions contained in a BSD-style copyright.) * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "fp_emu.h"
/* * Here are lots of conversion and normalization functions mainly * used by fp_scan.S * Note that these functions are optimized for "normal" numbers, * these are handled first and exit as fast as possible, this is * especially important for fp_normalize_ext/fp_conv_ext2ext, as * it's called very often. * The register usage is optimized for fp_scan.S and which register * is currently at that time unused, be careful if you want change * something here. %d0 and %d1 is always usable, sometimes %d2 (or * only the lower half) most function have to return the %a0 * unmodified, so that the caller can immediately reuse it.
*/
. ,fp_end
fp_scan
instruction
fp_ill:
2
1printfoops%,\,3%a2)%@()%@TASK_MM
| completed instruction
fp_endjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
tst(,a2
1
tst. d0
jmiswap
. TASK_MM)
jplld1a0+ sign
1: printf move,a0| mantissa
2: clr.l %d0
rts
.globl fp_conv_long2ext, fp_conv_single2ext
.globl fp_conv_double2ext, fp_conv_ext2ext
.globl fp_normalize_ext, fp_normalize_double
.globl fp_normalize_single, fp_normalize_single_fast
.globl fp_conv_ext2double, fp_conv_ext2single
.globl fp_conv_ext2long, java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 12
.
:
.
g fp_finalrounding, java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
/* * First several conversion functions from a source operand * into the extended format. Note, that only fp_conv_ext2ext * normalizes the number and is always called after the other * conversion functions, which only move the information into * fp_ext structure.
*/
p_conv_single2ext:
tf PCONVs2e% - p(,,%d0a0
printx PCONV%a0@
lsl.l #8,%d0 | shift mantissa
lsr.l #8,%d1 | exponent PCONV"\n"
lsr.l #7,%d1
lsr. 8,d1
jeq fp_s2e_small | zero / denormal?
cmp. |zerosanddenormalized
jeq fp_s2e_large
bset #31,%d0 | set explizit bit
add.w #0x3fff-0x7f,%d1 | re-bias the exponent.
9:fp_s2e_small:
move.l |exponentiszeroso explizitbit already too
clr
subq.w 0x4000-0x7f,%java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
fp_s2e_large
printf PCONV #1%d0 |clearexplizitjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
rts:
| denormalized
getuser. a1(,d0,a1
| exponent is zero, so explizit bit is already getuserl a14,d1,%java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
tst#ndif
jeq 9b
move.l d0d1
jra.l #8,d0 | shift mantissa
| infinities and NAN
fp_s2e_large:
bclr,d0 clear java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
movew#x7fffjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
fp_conv_double2extw#,d1re-biasthe.
ifdef
.l%d0(a0
etuser.(a1)%,,a1
tf,":%% - %p"3%,d1a0
if
getuser. 3%
move.%,(a0
lsl#,d0 |shift mantissa
lsl #%java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
#8,%1 |exponent java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
lsr.l| denormalized
lsr.w #5,%d1
jeq fp_d2e_small | zero / denormal
cmp.w #0x7ff,%d1 e iszero explizit is zero
jeq b
b #3,%0 |setjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
addfp_d2e_large
ve.%,(a0 |fp_ext.sign,.exp
move. #x7fffjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
.%),d0,a1
m. d0d1
lsl.l #8,%d0
lsl.l #3,%d0
.l d0(a0)
moveq
lsr%,%d1
or PCONV,":%(,,%java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
. 4,%a0
printx,%a0
move (a0%d0
rts
| zeros and denormalized
fp_d2e_small:
| exponent fp_e2e_small /denorm
tst.l %d0| is, sonormalization .
jeq 9b
fp_e2e_checkround:
jra 9b
| infinities and NAN
fp_d2e_large:
bclr #31,%d0 subql #,%a0
move.w #ifdefCONFIG_M68KFPU_EMU_EXTRAPREC
jra 9b
| fp_conv_ext2ext:
| originally used to get longdouble from userspace, now it's
|calledbefore arithmeticoperationstomakesure number
|is [maybe it].
| rintfPCONV,"p"1%a0
| returns 0 printx ,%a0@
fp_conv_ext2ext:
printf PCONV,"e2e: %p(",1,%a0
printx PCONV,%a0@
printf PCONV,"), "
move.l (%a0)+,%d0
cmp.w #0x7fff,%d0 | Inf / NaN moveq #1,%d0
jeqfp_e2e_large
move.l (ifdefCONFIG_M68KFPU_EMU_EXTRAPREC
jplfp_e2e_small |zero/ denorm?
| fp_set_srFPSR_EXC_INEX2
fp_e2e_checkround:
subq.l #4, clr.b (a0)
#ifdef move (FPD_RND,FPDATA,%d2
fp_e2e_roundother d2=0,round nearest
jne fp_e2e_round
#endif
printf PCONV,"%p(",1,%a0
printx PCONV,%a0@
printf PCONV,")\n"
moveq1%d0
rts
#ifdef CONFIG_M68KFPU_EMU_EXTRAPREC
fp_e2e_round:
9f |zero java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 clrlslb 1% |checkl java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
move FPD_RNDFPDATA%
j 9java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
tst. .w#x8000(,a0)
jpl 9f | zero is closer
btstaddqw#12%)
jne fp_e2e_doroundup 1%a0
lsl.b ,a0java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
9
subq#%
addq #,8%)
jccf
addq.l #1,(4,%a0)
jcc 9f
ove#x8000(,a)
addqjnefp_e2e_doroundup|negative round infinity
9jrab |positive tojava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
j fp_e2e_doroundup positiveround infinity
jra |negativeround zero
rts
fp_e2e_roundother:
ubqw 2,%2
jcs 9b | %d2 < 2, round to zero
j 1f |% >2 round +nfinity
tst.b (1,%a0) | to -inf
jne fp_e2e_doroundup | negative, round to infinity
jra 9jne |highlwordzerojava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
1 tst. (,a0 |toinf
jeq fp_e2e_doroundup |positive roundto infinity
jra 9b | negative, round to zero
#endif
| zeros and subnormals:
| trymove -,a0%java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
fp_e2e_small:
jne |high zero
move.l (4,%a0),%d0.l 2,a0
fp_e2e_small2
CONFIG_M68KFPU_EMU_EXTRAPREC clr.l %d0
move.b (-4,printf,)\njava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
all3
endif
| Genuine zero. clr.w -(%a0)
subq.l #2,%a0
printf PNORM,"%p(",1,%a0
printx PNORM,%a0@
printf PNORM,")\n"
moveq #1,%d0
rts %{#,3}%
| move.w. -a0%java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
:
bfffod0#0#2},d1
move -%0,%d2 sub.w %d1,%d2
jcc 1f
| Pathologically small, denormalize.
add.w %d2,%d1 clr.w %d2
1: move.w %d2,(% | fancy 6-bit double-shiftbegins here
move.w %d1,%d2
jeq fp_e2e_checkround
| fancy 64-bit double-shift begins lsll %,%d0
lsll %,%d0
move.l %d0,(%a0)+
move.l (%a0),%d0
move.l %d0%d1
lsl move d0%d1
movelsl.l %d2%java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
neg.w %d2.w 0,%d2
andw#x1f%d2
lsr.l %d2,%d1
or.l %d1,-(%a0)
#ifdef or %d1-%a0)
#ifdefCONFIG_M68KFPU_EMU_EXTRAPREC clr.l %d0
move.b (-4,%a0),%d0
neg.w %d2
add.w #24,%d2
jcc 1f clr.b (-4,%a0) clrl d0
or. %,4%a0)
jra
1: add2%java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
lsl.%0(,a0
move d0-,a0
lsr #%java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
or d04%)
#endif.%,4a0
jrajava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
| b %{03}d1
:
bfffo. (a0d2
.w#2%1
move%)% sub Beyond , .
1
| small.
add.w %d2,%d1
clrd2a0+
1: ext
xt%java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
.l%, |lower only be clr.l (4,%.l%,%) the lword subw#,d2
jcsf
lsl%,d0 lower needsonlyto
move.l %d0,(%a0) neg. d1
#ifdef CONFIG_M68KFPU_EMU_EXTRAPREC clr.l %d0
move.b (-4,%a0),%d0 clr.b (-4,%a0)
neg.w %d1
add.w #32,%add. 3,d1
b %d0(){%,#}
#endif
jra fp_e2e_checkround
1: neg.#endif
bfinsd0,%){d1#2 |higher lowerlword
#ifndef negw %1 |lower is between
jrafp_e2e_checkround
## CONFIG_M68KFPU_EMU_EXTRAPREC
move.w %d1,%d2
jra fp_e2e_extra1
| These are extremely small numbers, that will mostly endupaszero
| anyway, so this is only important for correct rounding.
fp_e2e_small3:
bfffo %d0{#2,#8},d1
addw 40,d1
move.w %d1,d2 sub.w %d1 jra fp_e2e_extra1
jcc 1f
| Theseare extremelysmallnumbers thatwillmostlyend up aszero
add.w %d2,%d1 clr.w %d2
1: move.w %d2,(%a0)+
ext.l %d1
jeq fp_e2e_checkround
cmp.w |anyway so isonly importantfor correct rounding
jcsbfffod0#4#},d1
1 clr.b(-,a0
. #4%java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
jcs 1f
add.w #24,%d1
lsl.l %d1,%d0
move.l %add %,%1
jra fp_e2e_checkround
1: neg.w %d1 clr. d2
j fp_e2e_checkround
2 ext.l %java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
move.b %d0jcsf
lsr 8%d0
move.b .w#4%d1
jrajava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
#endif
1: movel %d0, | lower lwordis between
lsl.l %d2,%d0 | higherjra
.l%,(a0
moved1java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
.w%2
add3,d2
lsrld2d0
move d0%)
jra fp_e2e_checkround
|Infinities NaNs
fp_e2e_large
move %)+d
ne3
:tst %)
jne
moveq%
l#,a0
printf PCONV,"%p(",1,%j fp_e2e_checkround
printx PCONV:
move(%)+%java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
rts
| we have maybe a NaN, shift off the highest bit
3:lsl. #1%d0
jeq 1b
| we haveaNaN thereturn
4: clrlprintfPCONV"%p(",1,a0
jra 2b
/* * Normalization functions. Call these on the output of general * FP operators, and before any conversion into the destination * formats. fp_normalize_ext has always to be called first, the * following conversion functions expect an already normalized * number.
*/
| fp_normalize_ext:
| normalize an extended in extended (unpacked) format, basically
does ame,additionally does
|the postprocessing.
|: a0 fp_ext*
|NOTE doesnot_ a0% and upper of%2
fp_normalize_ext:
printf PNORM,"ne: %p(",1,%a0
printx 2java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
printf PNORM,"), "
move.l (%a0 * FP operators, and before any conversion into the * formats. fp_normalize_ext has always to be called first, the
cmp.w * number.
jeq fp_ne_large
move.l ( fp_normalize_ext
jpl | / denormjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
nt.
fp_ne_checkround:
subq.l #4,%a0
#ifdef CONFIG_M68KFPU_EMU_EXTRAPREC
move.b (%a0),%d0
jne fp_ne_round
#endif
printf PNORM,"%p(",1,%a0
printx PNORM,%a0@
printf PNORM,")\n"
rts
#ifdef CONFIG_M68KFPU_EMU_EXTRAPREC
fp_ne_round
fp_set_sr FPSR_EXC_INEX2 NOTE it does _not_ modify%/% and upperword %java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 clr PNORM,a0
p PNORM","
jne fp_ne_roundother | %d2 == 0, round to nearest
tst.b %d0 | test guard
jpl 9f | zero cmp.w #0x7fff,%d |Inf / NaN?
btst #0,(11,%a0 eqfp_ne_large
jne | toinfinity
lsl.b #1, /?
f to
fp_ne_doroundup
. #,(8%)
# CONFIG_M68KFPU_EMU_EXTRAPREC
addq.l #1,(4,%a0)
jcc 9f
addq.w #1,(2,%a0)
move.w #0 move.b (%a0),%
9: printf PNORM,"%p(",1 jnefp_ne_round
printxPNORM,%@
printf printf,"p(,1,a0
rts printx PNORM%@
fp_ne_roundother:
subq
#ifd CONFIG_M68KFPU_EMU_EXTRAPREC hif %d2 >2 round to +nfinity
tst.b lr(a0
jne fp_ne_doroundup .w FPD_RNDFPDATA)%java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
jra 9 | iscloser
1t.b 1%) +
jeq |positiveround infinity
jra .b 1% |checklow
:
addql 1(,a0
| 9f
fp_ne_small
fp_ne_small1 lword?
.l(,a0,d0
jne fp_ne_small2
#ifdef CONFIG_M68KFPU_EMU_EXTRAPREC clr.l %d0
move .w 0x8000(,a0
nefp_ne_small3
#endif
PNORM,"\" clr.
#2,%java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
printf,"p"1,java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
printx PNORM,%a0@
printf PNORMtstb (1,a0 -java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
rts
| jra 9b | , tozero
fp_ne_small1:
bfffo %d0{#0,#32},%d1
move.1 tstb (1,a0) | to+inf sub.w %d1,%d2
jcc 1f
| Pathologically small, denormalize.
add.w %d2,%d1 clr.w %d2
jeqfp_ne_doroundup | positive, roundto
1: movejra9b negative, round zero
move#endif
jeq fp_ne_checkround
| This |Zeros subnormal numbers
lsl.l %d2,%d0
move.l %d0(%0)
move.l(%0,d0
move.l %d0,%d1
lsl.l %d2,%d0
move.l fp_ne_small:
neg.w %d2
and.w jne |high zero
lsr.l %,%d1
or.l %d1,-(%a0)
#ifdef jne fp_ne_small2
fp_ne_extra1 clr.l d0
moveb (-4,%0),d0
neg.w %d2
add.w #24,%d2
jcc 1f clr#java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
subq#,a0
r. %,(,%a0)
jra fp_ne_checkround
1: addq.w #8,%d2
lsl d2d0
move.b %d0,(-4,%a0)
lsr.l #8,printf,"\"
or.l %d0,(4,%a0)
#endif
jrafp_ne_checkround
:
fp_ne_small2 d0#0#2,d1
bfffo%d0{0#2,d1
add.w #32,%d1
move.w -(%a0.w%,d2
ubw d1d2
jcc 1f
| Beyond pathologically small, denormalize.
add.w%2%d1 clr.w%,%java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
1: move. .w %,d2
ext.l %d1
jeq fp_ne_checkround clr. 4%)
This is the 64bit shiftasseen.
jcs 1f
.l %d1d0 lwordneedsonly be shifted
move.l %d0,(%a0.l %0(a0
movel %),d0 clr.l %d0
move.b .l d0d1 clr.b (-4,%a0)
neg.w %d1
add.w #32%d1
move d0(a0
#endif
jra neg. d2
1: neg.w %d1 | lower lword isandw ,d2
bfins %d0,o. d1-%)
#ifndef# CONFIG_M68KFPU_EMU_EXTRAPREC
jra fp_ne_checkround
#
move.w(4%),d0
jra fp_ne_extra1
| These are neg.w%java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
| anyway, so this is only important for correct rounding.
fp_ne_small3:
bfffo orl d04%a0)
add.w #4,d1
move.w -(%a0),%d2 sub.w %d1,%d2
c1
|Pathologicallysmall .
add.b d04,) clr.w%java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
1 .w%,%)+
ext.fp_ne_small2
fp_ne_checkround
cmp.w #8,%d1
jcs 2f
:clr-,a0 subw 6,d1
jcs
Beyond pathologicallysmall,.
.l %,%java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
move.l %d0:move d2%)+
jra fp_ne_checkround
1: neg.w %d1
bfins %d0,(%a0){%d1,#8}
rafp_ne_checkround
2: lsl. 3,d1
move.b %d0,(-4,%a0)
lsr.l #8,%d0
move.b %d0,(7,%a0 lsl.l%,%d0 lwordneeds only beshifted
jra fp_ne_checkround
#endif
| Infinities NaNs, as .
fp_ne_large:
move (%)+%java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 7
1neg. d1
jne 4f
2: subq.l #8,%a0.w#2%java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
printfendif
j fp_ne_checkround
printfPNORM,)\"
rts
| we have maybe a NaN, %d0,%){d1#2 higher lowerjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
3 .l %d0d1
lsl.l #1,%d1
jne4java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
lr (4a0
jra 1b
we a NaN,test itissignaling
4: bset #30,%d0
jne 2
add. #4,d1
move d0-,a0
jra %1%java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
two roundingas the IEEE.
|values the modesappear be
t
|: java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
|:Round Infinity
|: +
| lsl.l .%,d0
|calledandextendedargumentisalreadynormalized
| as far as possible), these are used if there is different
|1 neg.w d1
| into single/double
fp_normalize_double:
PNORM":%(",,a0
printx PNORM,%a0@
printfPNORM"), "
move.l (%a0 .l #8,d0
tst.w % .b %,(7,%0)
jeq fp_nd_zero | zero / denormalized
cmp.w #0x7fff,%d2
fp_nd_huge / infinitive. sub.w #0x4000-0x3ff,%d2 | will the exponent fit?
jcs fp_nd_small | too small.
#0x7fe%d2
jcc fp_nd_large |InfinitiesandNaNs, again as above.
addq.l #4,%a0
move.l(a0,% | low lwordofmantissa
| now, round offthe 11 bits
fp_nd_round:
1:tstl (%a0)
lsl.l %d1 4f
jne fp_nd_checkround | Are they non-zero?
| nothing to do here
9 .l #,a0
printf PNORM,%p(1%a0
rintxPNORM%@
PNORM)\"
rts
|Becarefulwith XbitItcontainsthe lsb
| from the shift above, it is needed for round to nearest.
fp_nd_checkround:
f | bit
and.w #0xf800,(2,%a0) | java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 7
move FPD_RNDFPDATA% |roundingmode
jne4bset30%d0
tstl % guardbit
jpl 9b | zero is closer
FPSR_EXC_SNAN
m.l%,(-4%)
addx.w
| IEEE754-specified| nexttwo do as the standard
is, then number odd so roundingworkslike
| in grade-school arithmetic (i. |0:Round tojava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
| Otherwise|3 toInfinity
| to produce an odd|both fp_normalize
standardsays
jne ) java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
.#, bits
b tojava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
fp_nd_doroundup:
| round (the mantissa, that is) towards infinity
addprintf,ndp"1
jccb ,good
.l#,%0) extend ighlword
jcc.l %)+%java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
|Yowwehave to overflowthemantissa Since this
only when% was0fffff800 itis nowzero, so
|reset high bit,and the.
.w 0,(a0
.w 1-%a0)
cmp.w #0x43ff,(%a0)+ | exponent now overflown?
jeq fp_nd_large | yes, so make it infinity.
1: subq.l #4,%a0
PNORM"%("1%java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
printx PNORM,%a0@
printf PNORM,")\n"
rts
2: subq.w #2,%d2
jcs movel (%a0),%d0 |lowlword ofmantissa
jhi 3 > to
:
| of numberbythe.
% | -inf
tst.b %d2
jne fp_nd_doroundup | negative, round fp_nd_checkround|Aretheynon-zero?
jra9 |positive to zero
3: swap9:subq #8,a0
printf PNORM"%("1%java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
jeq fp_nd_doroundup | positive, rts
jra 9b | negative, round to zero
underflow to make a denormal, andset to
| the smallest possible fraction if this fails.
fp_nd_small:
fp_set_srFPSR_EXC_UNFL|set bit
FPSR_EXC_INEX2|INEX2bit
neg.w %d2 | degree of underflow
cmp.w #32,%d2 | single or double shift?
jcc 1f
| Again another 4- double shift
move.l (%a0) move.w (PD_RND,PDATA% | roundingmode
move 2 d2=0 round nearest
lsr.l %d2,%d0
move.l %d0,(%a0)+
move.l (%a0tst % | test guard bit
lsr.l %d2,%d0
negw %d2
add.w #32,%d2
lsll %d2%d1
or.l %d1 wetest Xbitby it o%java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
move.l (%a0),%d1
move.l %d0,(%a0)
|Checkto see shifted any bits
lsl.l %d2,%d1
jeqfp_nd_round|Noperound
| bit set the is, rounding like
j fp_nd_round Now roundjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
Another6-itsingle andstore
1: sub.w #32,%d2
cmp 3,d2 |Dowe need shiftjava.lang.StringIndexOutOfBoundsException: Range [46, 47) out of bounds for length 46
jcc .l 1, |check bits
move.l (%a0),%d0 clr.l (%a0)+
move.l %d0,%d1
.l d2d0
neg.w %d2
add.w #32,%d2
| Again, check round(the mantissa,that) towardsinfinity
tst.l (%a0)
jeq.l 0x800(a0
jccb |nooverflowgood
1:addq. 1,-%0 |extend to high
lsl. ccf | noo, .
jeq fp_nd_round ! we managedto the. Sincethis
bset #0,%d0
jra |only when was 0fffff800, isnowzerojava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
| Sorry.w#x8000(a0
2 .l (a0) clr (a0
moveq #1,%d0 |jeq | , itinfinity
fp_nd_round round desired
|zero denormalized
fp_nd_zero:
tst (a0+
jne 1f
tst.l (%a0)
jne 1f
subq.l #,%a0
printf%2
printx PNORM,%a0@
printf PNORM,")\n"
rts jcs 9 |d2<,round zero
are merely numbers true,
| Roundto+ orInf word %d2containsthe
|Itisclearlyimpossible evena normal extendednumber
| with that exponent to fit into double precision, so just
| write these %d2 |to-java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
1: fp_set_sr FPSR_EXC_UNFL| UNFLbit clr.l (%a0)
.l-%)
move.3: % +
addq.l #6,%a0 tstb d2
moveq #1,%d0
jra fp_nd_round | round.
| Exponent fp_nd_doroundup |positive round to infinity
fp_nd_large
ExponentunderflowTry make,and setit
and (%),d0
jeq 1f
fp_set_sr FPSR_EXC_INEX2
1: fp_set_sr FPSR_EXC_OVFL
move.w (FPD_RND,FPDATA),%d2
jne 3f | FPSR_EXC_UNFL |set bit
1:move.w#x7fff(-,%0) clr.l %2 | of clr.l (%a0)
2: cmp.w 3,% |singleor double shift?
printf PNORM,"%p(", jcc 1f
printx PNORM,%a0@
printf PNORM,")\n"
rts
3: subq |,another4- double.
5 d2, zero
f % > 2 round to +nfinity
tst.b (-3,%a0) | to -inf
jne 1b
jra 5f
b(3%a0) | to +nf
jeq 1b
5: move.w #0x43fe.l %,(a0+
moveq #-1,%d0
movel %0(%)+
move #xf800,d0
.l d0(%)
jra 2b
|Infinities NaNs
fp_nd_huge .l%2%
subq 4%java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
d2
,@
printf #% |Yes the" "
rts
:
jccf ,thenumber too .
printx move.l (%a0,d0
printf PNORM,") "
addq 2%a0
movel d0%1
jeqfp_ns_zero | / denormalized
cmp.w #0x7fff,% neg. %d2
jeq fp_ns_huge | NaN / infinitive. sub.w #0x4000-0x7f,%d2 | will the exponent fit?
jcsfp_ns_small small.
cmp.w #0xfe,%d2
jcc fp_ns_large |Again check to if shifted any bits
move. %)+%d0 get lwordofmantissa
p_ns_round
tst bset#0% |S bit
j 1f
|Setsticky if isnon-zero. This only
| affect the rounding in what would otherwise be equal-
| #0,%java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
bset #0,%d0
1: clr.l (%a0) moveq1% |Smallest fraction
| now,jra |round desired
zero anddenormalized
jne fp_ns_checkround | Aretst.l(%0+
| nothingtodo
subqtst %a0)
printf,"%("1%
printx PNORM,%a0@s.l#,a0
printf,"\n"
rts
fp_ns_checkround:printxPNORM%@
fp_set_srFPSR_EXC_INEX2 INEX2java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 clr -%a0 low ofhigh
subql #3,%a0
move.w isclearlyimpossible even extended
jne2 % =0 tonearest
tst. |write ones as" darn small"
jplf |zero closer
btst #8,%d0 | test lsb bit
| round toc.l %)
jne. (a0
movew 0,(a0 ..2*12java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
jeq round zero
fp_ns_doroundup:
| round (the mantissa, that is) towards infinityjrafp_nd_round|roundjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
add.l #0x100,(%a0)
jcc 9f | no overflow, good.
| Overflow. This means that the %d1 was0xffffff00 soit
| is now zero. We will set the mantissa to reflect this, and
increment theexponentcheckingfor overflow too
move .w(,%),d0
addq.w #1,-(%a0)
cmp.w jeq1f
jeq fp_ns_large | yes, so make it infinity. fp_set_sr FPSR_EXC_INEX2
9: subq.l #4,%a0
PNORM"p"1%java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
printx PNORM,%a0@
printf PNORM"\"
rts
| check nondefault rounding modes
2:subq #,
jcsb |% <,roundtozero
jhi 3f | %d2 > 2, round to +infinity
tst -3,%) -
fp_ns_doroundup |negative round infinity
jra printxPNORM,a0
3: tst.b (-3,%a0)
jeq fp_ns_doroundup 3 subq #,%d2
jraf |d2<2 round zero
jhif |% >2 +nfinity
| the tst.b -,%0) | -inf
fp_ns_smalljne b
fp_set_sr FPSR_EXC_UNFL | set UNFL bit
move #x3f81(-,%)|2*16
neg.w %d2 | degree of underflow
.w#2, |single double?
jcc. 0,-,%)
|a 32b shift
move %d0(a0+
move.w 0,d0
lsr.l %d2,%d0
move.lmove %d0,a0
| Check to see if we Infinities orjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
neg.w % rintf PNORM,%(,1%
add.wx PNORM%@
lsl PNORM)n"
jeq 1f
bset an with ()precision
|: a0( fp_ext*
:
(a0
bset%d0 |Sticky .
jra fp_ns_round ,) "
. x7fff
2: clr fp_ns_huge /infinitive.
c.l %a0
moveq #1,%d0 | Smallest possible fraction,
jra fp_ns_round | round as desired.
| Exponent overflow. Just cmp0,%d2
fp_ns_large:
tst.b (3movel %),d | get highlwordof mantissa
jeq 1f
fp_set_sr FPSR_EXC_INEX2
1: fp_set_sr FPSR_EXC_OVFL
fp_ns_round
jne tstl %a0) |check low lword
ove. 0x7fff,(-,%) clrl %)java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 clr.l (a0)
2: subq.l #8,%a0
printf PNORM,"%p(",1,%a0
printx #0%d0
PNORM"\n"
rts
3 subqw#,d2
jcs 5f | %d2 < 2, round to zero hi4 %d2 ,roundto+nfinity
tst.b (-3,%a0) | to -inf
jne1
jraf
4: tst .l #8%a0
jeq1java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
5: move.w #0x407e,java.lang.StringIndexOutOfBoundsException: Range [18, 19) out of bounds for length 4
move.l #0xffffff00,(%a0)+ clr (a0)
jra 2b
| zero and denormalized
p_ns_zero
tst %)+
1f
tst(a0
1
| above
PNORM,java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
printx fp_ns_doroundupjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
printf PNORM"
r . to.
| not subnormal, true,
| i.e. pathologically isnowzero. We set mantissatoreflect, and
extended number
| with that exponent to fit into single precision, so just
| theseonesoffas" darn small"
1: fp_set_sr FPSR_EXC_UNFL | Set clr.w 0x407f,%a0) | now? clr.l -(%a0)
move.w #0x3f81,-(%a0) | i.e. 2**-126
addq.l #6,%a0
moveq 9 subql #,a0
jra fp_ns_round | round.
| Infinities printf PNORM"p"1%java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
fp_ns_huge
subq rts
printf PNORM,"%p(",1 check nondefaultroundingmodes
printx PNORM%a0@
printf PNORM,")\n"
rts
| fp_normalize_single_fast:
| normalize an extended with single (23-bit) precision
| this only byf/fsgdlmul where the
| operand isnot completlynormalized
| args: %a0 jnefp_ns_doroundup |negative,roundto infinity
fp_normalize_single_fast
printf3 .b (-,%) | to+inf
printx PNORM,%a0@
printf PNORM,") "
addq.l #2,%a0
movew %)+,%d2
cmp.w #0x7fff,%d2
jra |negative roundto zero
move |Exponentunderflow. tomake , and it to
fp_nsf_round:
tst %) check low
jeq 1f
| Set a stickyfp_ns_small:
| fp_set_sr FPSR_EXC_UNFL set bit
| situationswhich we it do
bset.% of
1: .w#2%2 |single double?
2java.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
tst.b %d0 | 8 low bits.
jne fp_nsf_checkround | Are they non-zero movel %d0,(a0java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
subq 0d0 bit
,%p(",
printx:tstl(a0java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
printf PNORM,")\ #0%d0 |Sticky .
rts
fp_nsf_checkround:
fp_set_sr FPSR_EXC_INEX2 | INEX2 bit clr.b -(%a0) | clear low byte of high lword|Sorry,the isjust small
subq.l #3,%a0
move.w (FPD_RND moveq#,%0 |Smallest fraction
jne ra |roundas desiredjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
tst.b %d0 | test guard bit
jpl 9f | zero is closer
btst #8,
toeven, above
fp_nsf_doroundup|round infinity
lsl .w(FPD_RNDFPDATA,
jeq 3f | % = 0 tojava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
fp_nsf_doroundup:
| round (the mantissa, that .l 8%java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
add.l #0x100,(%a0 PNORM%@
ccf |no,good
| Overflow.java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 4
|isnowzero. Wewill mantissatoreflectthisand
| increment the exponent (checking for overflow there too 4 d2 ,roundto infinity
move.w #0x8000,(%a0)
addq.w #1,-(%a0)
cmp0,%)+ nowoverflownjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
j fp_nsf_large | yes,so makeit infinity.
jeqb
printf PNORM,"%p(",1,%a0
printx PNORM,%a0@
NORM)njava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
rts
checknondefault modes
2: subq.w #2,%d2
jcs 9b | %d2jra2java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
jhi 3f tst. %)
tst -3a0 | -inf
jne .(a0
jrajne1java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
3: tst.b (-3,%a0printf,p"1,a0
ndup,
,)"
| overflowJustit.
fp_nsf_large| merely , denormals
tst.b (3 |.. ( 2*18 numbers
for normal number
FPSR_EXC_INEX2
_sr
move.1 p_set_srFPSR_EXC_UNFL|Set
jne .l(a0
1:movew#x7fff(2%a0 clr.l (% .w #x3f81(a0 | i..2*16 clr.l (%a0)
2: subq.l jra |. ",%java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
,@
printf PNORM,")\n" printxPNORM,%a0
rts
3 rts
jcs 5f | %d2 < 2, round to zero
jhi 4f | %
tstb (-%a0) to-inf
jne| normalize anextended with single (23bitprecision
jra 5 usedfsgldivfsgdlmul the
tst, inf
jeq 1b
m.0,)
clr.PNORMnsf(1%
PNORM%@
PNORM)"
fp_nsf_huge:
subq.l #4,%a0
printf,%(,,%java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
printx PNORM,%a0@
printfPNORM,"\"
rts
| conv_ext2int (macro):
| Generates a subroutine that converts an extended tstl(%a0) check the lowjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
| integer of a given size, again, with the appropriate type of
| rounding.
| Macro arguments:
| s: size, as given in an assembly instruction.
| b: number of bits in that size.
| SubroutineprintfPNORM,)\n"
| a0:source(truct *
| checknondefault modes
.macro conv_ext2int s,b
.et,(1<\b-1-1|i..MAXINT
printf PCONV," jhi 3f | %d2 >2 round to+nfinity
printx PCONV,%a0@
printf PCONV,") "
addql#,%a0
move.w (%a0j fp_nsf_doroundup negativenegative, roundtoinfinity
j fp_e2i_zerob zero / denorm (= 0 here
cmp.w #0x7fff,%d2
jeq fp_e2i_huge\b | Inf /jeqfp_nsf_doroundup , round infinity sub 0,%java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
jcs fp_e2i_smalltst. 3%)
cmp.f
jhifp_e2i_largejava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
.w(,)%
move. jnef |% = 0round nearest
lsl.l %d2,%d1
jne fp_e2i_round\b
tst.l (4,%a0)
j fp_e2i_round
neg.w %d2
add.w #32,%d2
lsr.l %d2,%d0
9 .w(4%)
1
PNORMa0@
PNORM"
ts
rts
1: neg.\s %3 .w #,d2
jeq 1f 5 d , zero
jpl\java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
1: printf5
rts . -,a0 tojava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
fp_e2i_round:
fp_set_sr FPSR_EXC_INEX2 | INEX2 bit
neg.w .l(a0)
add #2%java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
.if \bfp_nsf_hug
jeqf
.endif
lsr.l %d2,%d0
m. FPD_RND)% roundingmode
jne 2f | %d2 == 0, round to nearest
PNORM)njava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
jpl 9b | (macro:
btst %d2,%d0 | test lsb bit (%d2 still|Generates subroutine converts extended to
ne\b
lsl.l #1,%d1 | check low|rounding
jne fp_e2i_doroundup\b
java.lang.StringIndexOutOfBoundsException: Range [18, 14) out of bounds for length 14
9
fp_e2i_doroundup\b:
addqa0 *
i ( )
java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
:.#%java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
9 |d22 to
jhi 3f |.l #2%a0
m.w(a0,d2|exponent
jne\b |,round
jra 9b cmp 0,%java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
3 .w (4%a0) |toinf
jeq fp_e2i_doroundup\b | positive, round to infinity
jra 9b | negative, round to zero
| we are only want -2**127 get correctly rounded subw #0x3ffe,%d2
| since the guard bit is in the lower lword.
| everything else endscmpw#b%java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
. \>6
.l%d2%d1
jne 2b | %d2 == 0, round to nearest
move.l (4,%a0),%d1 | test t.l (,%0java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
jpl9 | zeroiscloser
lsl.l #1,%d1 addw #2%d2
jne fp_e2i_doroundup\b
jra 9b
.endif
fp_e2i_zero\b: clr.l %d0
tst.l (%a0)+
jne 1f
tst.l (%0)
jeq 3f
1: subq.l #4,%a0
jne1f
fp_e2i_small\b:
fp_set_srFPSR_EXC_INEX2 clr mifp_e2i_largeb
move PCONV" pn"1%java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
subq.w #jeq f
3f %2<2 to/zero
jhi 2f | %d2 > 2, round1 printf ,"> pn,,d0
tst.w (-4,%a0java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
jeq 3f
subq.\s #1,%d0
3f
2: tst.w (-4,%a0) | to +inf
jne3
addq.>6
3 f
rts
fp_e2i_large\b:
fp_set_sr FPSR_EXC_OPERR lsr.l%,%java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
move.\s #inf,%d0
tstw (-4,%a0
jeq 1f
addq\ #,d0
1: printf.l % |test guardjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
rts
fp_e2i_huge\b btst %,% |test lsb (% still)
fp_e2i_doroundupb
tst.l (%a0)
jne 1f
tst.l (%a0)
jeqfp_e2i_largeb
| has this bit already
|andmade
1: 9
jne
R_EXC_OPERR
1: printf PCONV,"-> %p java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
rts
endm
fp_conv_ext2long \ , infinity
conv_ext2int l,32
fp_conv_ext2short:
conv_ext2int 1
fp_conv_ext2byte:
conv_ext2int ,
fp_conv_ext2double: elseendsupanyway overflow.
jsrifb>java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
printf PCONV, jneb |d2 ,roundto
PCONV%@
printf," java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
move.l (%a0)+,%d2
cmp.w #0x7fff,j 9java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
1
lr. d0
move.l (%a0)+,%d0
jrat.%)
1:jeq
move1 subq. 4%java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
jmi 2f clr.w %d2
2: lslw #5,%d2
lsl.l #7,%d2
lsl.l #8%d2
move.l %d0 clr.l %
lsl.l #1,%d0
.l 4,%java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
lsr.l # 3 d2<2 to/zero
orl d2d0
putuserl%,(a1+,fp_err_ua2%a1
moveq # java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
lsl.l %d0.\ inf
.l(%0%java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
lsr.l #4,%: " n,,d0
lsr.l #7,%\:
orl ,d0 st. %)
ifdef
getuser.l(%)
getuserl %@(0,d1fp_err_ua2%java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
printf |
#endif
rts
fp_conv_ext2single:
jsr fp_normalize_single
1,%java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
p PCONV%@
printf PCONV,")java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
conv_ext2int2
cmp
| special return addresses for instrmovew#x7ffd2
| encode the rounding precision in themove.l (),d0
| (e.g. fsmove,fdmove)
fp_finalrounding_single:
addq.l jraf
jsr fp_normalize_ext
jsrjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
jra fp_finaltest
| fp_finaltest:
| set the emulated status register based on the outcome of an
| emulated instruction.
fp_finalrounding:l.l %,%java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
addq.l #8,%sp
| printf ,"f: %p\n", .%,%d0
jsr utuserl%,(),,%java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
getuser %a1@(-4),%d0,fp_err_ua2,%a1
subq.w #1,%d0
jcs fp_finaltest
jne 1f
jsr fp_normalize_single
jra 2f
1: jsr fp_normalize_double getuser.l %a1@(0)d1fp_err_ua2%a1
2:| printf ,"f: %p\n", printf PCONV,"p%08%8x\"3%,%d0d1
fp_finaltest:
| First, we do some ts
| status byte
| theyfp_conv_ext2singlejava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
emulated. clr.l %d0
addq.l #1,%a0
tst.b (%a0)+ |printf,","
jeq 1f
bset FPSR_CC_NEG-24% | N bit
1: cmp.w #0x7fff,(%a0)+ | exponent
jeq 2f
| test for zero
moveq#,d1
tst .l (a0+%java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
jnef
tst.l (%a0)
jne 9f
jra 8f
|infinitiv and java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
2: moveq #FPSR_CC_NAN-24,%2 .w #8%java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
move.l (%a0)+,%d2
lsl.l #1,%d2 | ignore.l#%java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
jne 8f
tstl(a0
jne 8f
moveq #FPSR_CC_INF-24,%d1
8: bset specialreturn addresses instrthat
|encode rounding inthe
| move |(..fsmove)
|
|otherthings theaccrued exception accordinglyjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
| Emulated instructions
| as .l#,sp
fp_final
move ,)%java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
#if 0 .l#,sp
btst #FPSR_EXC_SNAN,%d0 | EXC_SNAN
jne 1f
btst #FPSR_EXC_OPERR,%d0 | EXC_OPERR
jeq 2f
1: bset #FPSR_AEXC_IOP,% | set the emulated status on of
,% |EXC_OVFL
jeq 1f
bset#FPSR_AEXC_OVFL%d0| OVFL bit
1: btstaddq.l #,sp
jeq 1f
btst #FPSR_EXC_INEX2,%d0 | EXC_INEX2
jeq 1f
bset | printf "f %p\n,1,%0
1: btst #FPSR_EXC_DZ,%d0 | EXC_INEX1
jeq1
movew (FPD_PREC,FPDATA,%0
1: btst,d0
jne 1f
btst #FPSR_EXC_INEX2,%d0 | EXC_INEX2
jne1f
btstFPSR_EXC_INEX1%d0 |EXC_INEX1
jeq 2f
1: bset #FPSR_AEXC_INEX,%d0 | set
2: move.l %1jsr
e
| same First dosome oftheobvious for exception
d0,%java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
lsr.l #5,%d0
move.l |emulated.
lsr.l %
or addq #,%java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
and.b #0x08,%d1
move.l %d2,%d0
lsrl #6%d0
orl%,%java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
move%,d1
.l%
b,java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
.,java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
move.l %d2, .l(a0,d2
.l 7%java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
and.b #0 8java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
or.b %d1,%d0
.b #0xf8%java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
or.b %d0,%2
move.l %d2,(FPD_FPSR,FPDATA)
#endif
move. FPD_FPSR2FPDATA%
and.b (FPD_FPCR+2,FPDATA),%d0
jeqjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
printf ,"send signal!!!\n"
1 ra
Messung V0.5
¤ Dauer der Verarbeitung: 0.18 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.