Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 207525 Details for
Bug 289642
sys-libs/glibc: patches for alpha
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to fix flaw in memchr
submitted-asm-memchr.diff (text/plain), 3.12 KB, created by
Matt Turner
on 2009-10-19 01:11:35 UTC
(
hide
)
Description:
patch to fix flaw in memchr
Filename:
MIME Type:
Creator:
Matt Turner
Created:
2009-10-19 01:11:35 UTC
Size:
3.12 KB
patch
obsolete
>2009-07-27 Aurelien Jarno <aurelien@aurel32.net> > > * sysdeps/alpha/memchr.S: Use prefetch load. > * sysdeps/alpha/alphaev6/memchr.S: Likewise. > >--- a/ports/sysdeps/alpha/alphaev6/memchr.S >+++ b/ports/sysdeps/alpha/alphaev6/memchr.S >@@ -127,7 +127,7 @@ $first_quad: > cmpbge $31, $1, $2 # E : > bne $2, $found_it # U : > # At least one byte left to process. >- ldq $1, 8($0) # L : >+ ldq $31, 8($0) # L : > subq $5, 1, $18 # E : U L U L > > addq $0, 8, $0 # E : >@@ -143,38 +143,38 @@ $first_quad: > and $4, 8, $4 # E : odd number of quads? > bne $4, $odd_quad_count # U : > # At least three quads remain to be accessed >- mov $1, $4 # E : L U L U : move prefetched value to correct reg >+ nop # E : L U L U : move prefetched value to correct reg > > .align 4 > $unrolled_loop: >- ldq $1, 8($0) # L : prefetch $1 >- xor $17, $4, $2 # E : >- cmpbge $31, $2, $2 # E : >- bne $2, $found_it # U : U L U L >+ ldq $1, 0($0) # L : load quad >+ xor $17, $1, $2 # E : >+ ldq $31, 8($0) # L : prefetch next quad >+ cmpbge $31, $2, $2 # E : U L U L > >+ bne $2, $found_it # U : > addq $0, 8, $0 # E : > nop # E : > nop # E : >- nop # E : > > $odd_quad_count: >+ ldq $1, 0($0) # L : load quad > xor $17, $1, $2 # E : >- ldq $4, 8($0) # L : prefetch $4 >+ ldq $31, 8($0) # L : prefetch $4 > cmpbge $31, $2, $2 # E : >- addq $0, 8, $6 # E : > >+ addq $0, 8, $6 # E : > bne $2, $found_it # U : > cmpult $6, $18, $6 # E : > addq $0, 8, $0 # E : >- nop # E : > > bne $6, $unrolled_loop # U : >- mov $4, $1 # E : move prefetched value into $1 > nop # E : > nop # E : >- >-$final: subq $5, $0, $18 # E : $18 <- number of bytes left to do > nop # E : >+ >+$final: ldq $1, 0($0) # L : load last quad >+ subq $5, $0, $18 # E : $18 <- number of bytes left to do > nop # E : > bne $18, $last_quad # U : > >--- a/ports/sysdeps/alpha/memchr.S >+++ b/ports/sysdeps/alpha/memchr.S >@@ -119,7 +119,7 @@ $first_quad: > > # At least one byte left to process. > >- ldq t0, 8(v0) # e0 : >+ ldq zero, 8(v0) # e0 : prefetch next quad > subq t4, 1, a2 # .. e1 : > addq v0, 8, v0 #-e0 : > >@@ -138,19 +138,19 @@ $first_quad: > > # At least three quads remain to be accessed > >- mov t0, t3 # e0 : move prefetched value to correct reg >- > .align 4 > $unrolled_loop: >- ldq t0, 8(v0) #-e0 : prefetch t0 >- xor a1, t3, t1 # .. e1 : >- cmpbge zero, t1, t1 # e0 : >- bne t1, $found_it # .. e1 : >+ ldq t0, 0(v0) # e0 : load quad >+ xor a1, t0, t1 # .. e1 : >+ ldq zero, 8(v0) # e0 : prefetch next quad >+ cmpbge zero, t1, t1 # .. e1: >+ bne t1, $found_it # e0 : > >- addq v0, 8, v0 #-e0 : >+ addq v0, 8, v0 # e1 : > $odd_quad_count: >+ ldq t0, 0(v0) # e0 : load quad > xor a1, t0, t1 # .. e1 : >- ldq t3, 8(v0) # e0 : prefetch t3 >+ ldq zero, 8(v0) # e0 : prefetch next quad > cmpbge zero, t1, t1 # .. e1 : > addq v0, 8, t5 #-e0 : > bne t1, $found_it # .. e1 : >@@ -159,8 +159,8 @@ $odd_quad_count: > addq v0, 8, v0 # .. e1 : > bne t5, $unrolled_loop #-e1 : > >- mov t3, t0 # e0 : move prefetched value into t0 >-$final: subq t4, v0, a2 # .. e1 : a2 <- number of bytes left to do >+$final: ldq t0, 0(v0) # e0 : load last quad >+ subq t4, v0, a2 # .. e1 : a2 <- number of bytes left to do > bne a2, $last_quad # e1 : > > $not_found:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 289642
:
207510
|
207511
|
207515
|
207517
|
207519
|
207520
|
207522
|
207524
|
207525
|
207527
|
208573