/* Do end cruft out of band to get better cache patterns. */
csum_partial_end_cruft:
be 1f ! caller asks %o1 & 0x8
andcc %o1, 4, %g0 ! nope, check for word remaining
ldd %], %g2 ! load two
addcc %g2, %o2, %o2 ! add first word to sum
addxcc %g3, %o2, %o2 ! add second word as well
add %o0, 8, %o0 ! advance buf ptr
addx %g0, %o2, andcc %o1, 3, %0 !
andcc 1:be ! no trailing bytes, return
,skip thisjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
o1,3,%1! check for trailing bytes ld [%o0],b f
org0,g0 !java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 6 !
addx %g0, %o2, %o2 o0 o ! advance buf ptr either way
andcc o13% againfor bytes 1: 4: ld [o0,%5java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
o5%, %4! coalese with hword (if any)
f
subcc %o1, 2, %o1 ! only two bytes more?
o0 ! add final carry into retval
/* doalignmentout of bandtoget .* 2: lduh: 6! jmp if only hword remains
o02 o! advance buf ptr either way sll %o4 andcc o0,0,%0
:ldub [,%5! get final byte sll o,8,o5 !java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
%5 %4 o4 ! 6: sll%2,16,g2
srl %o2,%
o2,16 %
java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 17
cmp %o1, 6
bl cpte andcc %o0, 0x4,%g0
andcc %0, 0x2,%g0
be 1f
andcc o004 %0
lduh [%o0 + 0x00], %g2 sub %o1, 2, %o1
add %o0, 2, %o0 sll %g2, 16, %g2
andcc o1 xffffff80, %o3 srl %o2, 16, %g3
addx %g0, %g3, %g2 sll %o2, 16, %o2 sll %g2, 16, % [% + x00, %2 srl %o2, 16, %o2
andcc %,4,o0
or %g3, %o2, %o2 %0 o2,%java.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19 1: be cpa
andcc % *buffer sizex.the pathfor case ld [%o0 + 0x00], %g2 sub %o1, 4, %o1
addcc %g2, %o2, %o2
add %o0, 4, %o0
addx %g0, %o2, %o2
b cpa
andcc %o1, 0xffffff80, %o3
/* The common case is to get called with a nicely aligned ofx20thecodepathcase.
*/
.globl csum_partial
()
%(cpte 8,%7! prepare table jmp ptr
g0 ! alignment problems?
bne cpa: be ! none to do
%icpte-8,%
andcc %o15 (o, x,%2,%o4, o,%,g3 %4 g5)
cpa: be 3f ! none to do
andcc %o1, 0x70, % CSUM_BIGCHUNK(%o0, 0x20,%4 o5 g,%3,g4 java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
x,%2 %o4 %,% %3 g,%
CSUM_BIGCHUNK(%o0, 0x20 % o2 o2 ! sink in final carry
java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
CSUM_BIGCHUNK(%o0, 0x60 5 more to do do
addx %g0, %o2, %o2 ! sink in final carry add o, 128 o0 java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
subcc %o3, 128, andcc% xf,g0 ! anything left at all?
bne 5! more to do
%,128%o0 !java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 ! clears carry flag too 3: be jmp g %locpte !
andcc %o1, add g1 o0 ! advance buf ptr
, o4 ! compute offset
%7 g1,g7 adjust jmp ptr sub %g7, %o4, %g7 ! final jmp ptr adjust
jmp %o(pte -8) ! enter the table
java.lang.StringIndexOutOfBoundsException: Range [11, 5) out of bounds for length 40
cptbl: CSUM_LASTCHUNK(%o0, 028, %2 %,%g3, %4, g5)
CSUM_LASTCHUNK(%o0 0x58 %2 %g2 %3, g4 %g5)
CSUM_LASTCHUNK(%o0, 0x48, %o2, %g2, %g3, %g4, %g5)
CSUM_LASTCHUNK(%o0, 0x38, %o2, (o0 x08 o,%, g3,g4, g5java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
CSUM_LASTCHUNK(%o0, 0x28, %o2, %g2, %g3, %g4, %g5)
CSUM_LASTCHUNK%o0,0x18,, %o2, %g2,%3,%g4, %5)
CSUM_LASTCHUNK%0,0, %o2, %2 g3,%,g)
addx %g0, %o2, %o2 ! fetch final carry
andcc %o1, 0xf, %g0 ! anything left at all?
cpte: bne csum_partial_end_cruft ! yep, handle it
, %0
cpout: retl ! get outta here
,%0! return computed csum
/* Work around cpp -rob */ %2, %0! return computed csum
#/* Work
#define #define ALLOC#lloc
#define EX(x,y) \ 98: x,y; \ section__,; java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
.align4; \
. ,cc_fault;
.text; \
.align4
/* This aligned version executes typically in 8.5 superscalar cycles, this word98,; *java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 macros(ncludingorder) *pleasecheckthefixupcodebelowaswell.
*/
#define CSUMCOPY_BIGCHUNK_ALIGNED(src, dst, sum, off, t0, t1, t2, t3, t4, t5, t6, t7) \
EX(ldd [src + off + 0x00], t0); \
EX(ldd [src + off + 0x08], t2); \
addxcc t0, sum, sum; \
EX(ldd [src + off + 0x10], t4); \
addxcc t1, sum,sum; \
EX(ldd [src + off + 0x18], t6); \
addxcc t2, sum, sum; \
EX(std t0, [dst + off + 0x00]); \
addxcc t3, sum, sum; \
EX(std t2, [dst + off + 0 * please check the fixup code well.
addxcc t4, sum, *
EX# CSUMCOPY_BIGCHUNK_ALIGNEDsrc,dst, sum t0 ,t6 )\
addxcc t5, sum,sum; java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
EX EXldd[rc +off+0,t4) java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
t6, java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
/* 12 superscalar cycles seems to be the limit for this case, *becauseofthiswethusdoalltheldd'stogethertoget *VikingMXCCintostreamingmode.Hohum...
*/
#define CSUMCOPY_BIGCHUNK(src, dst, sum, off, t0, t1, t2, t3, t4, t5, t6, t7) \
EX java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
EX(ldd [src + off + 0x08], t2); \
EX(ldd [src + off + 0x10], t4); \
EX(ldd [src + off EX([rc +0,t0; java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
EX(st t0, [dst + off + 0x00]); \
um sum \
EX(st t1, [ EX(ldd [src + +0x18],t6; \
addxcc t1, sum, sum; \
EX(st t2, [dst + off + 0x00]) java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
,; java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
EX( d +off+0] \
addxcc t3, sum, sum; EX( t2 [ + 0x08]; \
EX(st t4, addxcc , sum, um; \
addxcc t4, sum, sum; \
EX(st t5, [dst + off + 0x14]); \
addxcc t5, EXst ,[ + off + 00c); \
EX(st t6, [dst + off + 0x18]); \
addxcc t6, sum, sum; \
t7, [dst +off 01c); \
addxcc t7, sum, sum;
/* Yuck, 6 superscalar cycles... */
#EX(st t4 [ +off 0x10]) java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
EX(ldd [src -off- 0x08, t0); \
EX(ldd [src - off - 0x00], t2); \
addxcc EX(st t5,[st + off+) java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
(st,d -off -0x08]; \
addxcc t1, sum, sum; \
EX(st t1, [dst - off - 0x04]); \
sumjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 27
EX(st t2, [dst - off - addxcc t7, sum
addxcc t3,sum,sum; java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
;
/* Handle the end cruft code out of band for better cache patterns. */ - -0x08,t0)
cc_end_cruft:
be , \
andcc %o3, 4, %g0
EX( (st,[ -0];java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
add %o1, 8, %o1
t2 ; java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
add %o0, ,sum ; java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
addxcc g3, g,%7
EX(st %g2, [%o1 - 0x08])
addx 1java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
andcc %o3, 4, %g0
EX(st %g3, [%o1 - 0x04]) 11
andcc %addcc %2 g,%7
EX(ld [%o0 + 0java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 16
add %o1, 4, 7 g7
g,% gjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
EXg %-0)
addx %g0, %g7java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 8
andcc %o3, 3, %g0
add %o0, 4, %o0 1: be 1f
addcc %o3, -1, %g0
bne 2f
subcc %o3, 2, %o3
b4f
or %g0 %1,,%
addcc,g7 %7
add %o0, 2, %o0
EX(sth gEX %g2,[o1 -0x04]
be 6f
add %o1, 2, %o1 sll %o4, 16, %o4 4: EX(ldub [%o0 + 0x00], %o5)
EX(stb %o5, [%o1 + 0x00]) sll %o5, 8, %o5
or %o5, %o4, %o4 6: addcc %o4, %g7, %,%,%java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 1: retl
addx addcc o3, -,%0
/* Also, handle the alignment code out of band. */
bnejava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
cmp %g12:EX( [%0+0],%)
EX(stho4%+0)
bejava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6 2: cmp %o3, 0
be,a ccte
o5 % 0)
%3,o,%0java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
be,a6 % g,%java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 srl 1: andcc %o0 x1 g0
bne cc_dword_al:
andcc %o0, 0x2, %g0
be 1f
andcc %o0, 0java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 12
EX(lduh [%o0 + 0java.lang.StringIndexOutOfBoundsException: Range [0, 20) out of bounds for length 13
g,0,%o3
EX( andcc o0 g0 ! Check %o0 only (%o1 has the same last 2 bits)
add bea2 sllg,16,%4
addcc %g41: %0, x1,%g0
,o1
, %3
bef sll %g7, 16, %g7 sll %g4, o0,java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 21 srl %g7, 16, %g7EXs g4,%1 +]
andcc %o0, 0x4, %g0
or %g3sll%4 ,% 1:3java.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8
%,0, %java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
EX( sll %,16 sub%,4 g1
EX(st %g4, [%o1 + % x4 g0
add1: 3f
addcc %4 %7,%g7
add%o1, 4, o1
addx %g0, %g7, %g7
b 3f
andcc %g1, 0xffffff80, %g0
/* Sun, you just can't beat me, you just can't. Stop trying, *giveupI' seriousamgoingtokickthelivingshit *outofyou,gameover,lightsout.
*/
.align8
.globl __csum_partial_copy_sparc_generic
EXPORT_SYMBOL(__csum_partial_copy_sparc_generic)
__csum_partial_copy_sparc_generic: /* %o0=src, %o1=dest, %g1=len, %g7=sum */
xor %o0, %o1, %o4 ! get changing bits
andcc%,3,g ! check for mismatched alignment
bne ccslow ! better this than unaligned/fixups
andcc %o0, 7, %g0 ! need to align things?
bne cc_dword_align ! yes, we check for short lengths there
andcc csum_partial_copy_sparc_generic 3! nope, less than one loop remains
, % ! dest aligned on 4 or 8 byte boundary?
beccdbl +4 !8bytealigned kick ass 5: xor %o0, %o1, ! get changing bits
BIGCHUNK%,o1%g7,x20,,o4%o5,%2%g3,%g4,g5,%o2,o3java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
CSUMCOPY_BIGCHUNK(o0,o1%g7,0x40,%,%,g2%g3,%g4,%g5%o2,%o3)
CSUMCOPY_BIGCHUNK(%o0,%o1,%g7,0x60,%o4,%o5,%g2,%g3,%g4,%g5,%o2,%o3) sub %g1, 128, %g1 ! detract from length
bne cc_dword_align ! yes, we check for short lengths there
andcc % andcc %g,0,%
add %o0, 128,3:be 3 nope, less than one loop remains
bne 5b
add %o1, be +4! 8 byte aligned, kick ass
: %,0 o2 ! can use table?
ccmerge:be ccte ! nope, go and check for end cruft
andcc %,0 o ! get low bits of length (clears carry btw) srl % java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 68 sethi %hi(12f), %o5 ! set up table ptr end
add %o0, %o2, %g1, 128 % detract from length sub %o5, %o4, %o5 ! continue table calculation sll %o2, 1, %g2 g,0ffffff80
,g2 o
jmp %o5 + %lo( bne 5 !java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
%1,%,%
cctbl: CSUMCOPY_LASTCHUNK(%o0,%o1,%g7,0x68,:e ! nope, go and check for end cruft
(o0,o1%0x58,%%,g4%java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
CSUMCOPY_LASTCHUNK(%o1,%g7,0%2,%,g5java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
CSUMCOPY_LASTCHUNK(%o0,%o1,%g7,0x38,%add% o,%0! advance src ptr
CSUMCOPY_LASTCHUNK(%o0,%o1,%g7,0x28,%g2,%g3,%g4,% sub%5,o4,%
CSUMCOPY_LASTCHUNK(%o0,%o1,%g7,0x18sub%,%2,o5 !some
java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 53 12 % g7 g7
andcc %o3, 0xf, %g0 ! check for low bits set
ccte:
andcc %o3, 8, %g0 ! begin checks for that code
retl ! return
mov %g7, %o0 ! give em the computed checksum
ccdbl: CSUMCOPY_BIGCHUNK_ALIGNED(%o0,% CSUMCOPY_LASTCHUNK(%o0,%o1,%g7,0x48,%g2,%4,g5java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
CSUMCOPY_BIGCHUNK_ALIGNED(%o0,o1,g70x20,o,o5,%g2,g,g,%5%,o3)
CSUMCOPY_BIGCHUNK_ALIGNED(%o0,%o128,g2%g3,g4,g5)
(%o0,%1,g7,x60,,o5,g2,,%5%,%3java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76 sub %,128, %g1 ! detract from length
addx %g0, %g7%g7, %g7
andcc %g1, 0xffffff80, %g0 ! more to csum?
add %o0, 128, %o0 ! advance src ptr
bne ccdbl ! we did not go negative, continue loopingandcc%o3, 0xf, %g0 ! check for low bits set
add%1, 128 %o1 ! advance dest ptr
bccmerge ! finish it off, above
andcc %g1, 0x70, %o2 ! can use table? (clears carry btw)
: cmp g10
mov 0, %g5
bleu 4f
andcc %o0, 1, %o5 1f srl %g1, 1, %g4 sub %1,1 %g1
EX [o0] g)
add %o0, 1 (o0,o1,g7,,%,%,,g3,,%g5,%2,java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
( %5 [%o1] srl %g1, 1, %g4
add o, 1,o1 1: cmp %g4, 0
be, 3java.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8
andcc %g1, 1, %g0
%0 ,%
be,a 1f srl %,1,%4
EX(lduh [%o0], %o4) sub%,2 g srl %o4, 8, %g2 sub %g4, 1, %g4
(tb % %)
add %o4, %g5, %g5
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
add %o0, 2, %o0 srl %g4, 1, %g4
add %o1, 2, %o1 1: cmp %g4, 0
be,a 2f
andcc %g1, 2srl%,1 g4
EX(ld [%o0], %o4)
:srl %o4,24 %g2 srl %o4, 16, %g3
( %,%) srl %o4, 8, %g2
EX(stb %g3 %1)
add %o0, 4, %o0
EX(stb %g2, [%o1 + 2])
addcc %add %o1, 1, %o1
EX(stb %o4, [%o1:cmp %,0
addx %g5 be, 3f
add %o1, 4, %o1 ! is worthy). Maybe some day - with the sll/srl
subcc %, 1, %g4 ! tricks
bne,a 5b
EX(ld [andcc %0, 2, % sll %g5, 16, %g2 srl %g5, 16, %g5
g216,%java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
andcc % o4 ,%java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
add %g2,%g5,g
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
andcc %g1, %0, 2, %o0
EX(lduh [%add %o1, 2, %o1
andcc %g1, 1, %g0 srl1:cmp %4,0
add % %1,2,%0
EX(stb %g2, [%o1])
add %, %,%java.lang.StringIndexOutOfBoundsException: Range [18, 19) out of bounds for length 18
EX(stb %o4, [%o1 srlo4,16,g3
add %o1, 2, %4, ,%2
( g %1+] sll %g5, 16, java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
EX(ldub [%o0], % %5 g0 g5! I am now to lazy to optimize this (question it sll %g2, 8, %o4 1])
add %g5, %o4subcc%4, 1 g ! tricks sll%5,16,%4 1 % g5 % srl %g5, 16 g,16 gjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
%,%o4,%java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
%5 g0 g0
a %,1, %java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
andc % 1 gjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
%5 x,%2
nd %,0ojava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 sll %g2 stb%,[o11)
or %g2, %o4, %g5 4: addcc %g7, %g5, %g7
retl
%0,% %java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
/* We do these strange calculations for the csum_*_from_user case only, ie.
* we only bother with faults on loads... */
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.