Skip to content

Commit

Permalink
sparc32: Fix non-v9 build failure in memcpy.
Browse files Browse the repository at this point in the history
  • Loading branch information
David S. Miller committed Mar 9, 2010
1 parent d6d1c4c commit 2fe000d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
of R_SPARC_TLS_LE_* needs to use 32-bit loads and stores, not
64-bit ones.

* sysdeps/sparc/sparc32/memcpy.S: Fix build.

2010-03-07 Ulrich Drepper <drepper@redhat.com>

* sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags):
Expand Down
23 changes: 20 additions & 3 deletions sysdeps/sparc/sparc32/memcpy.S
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,27 @@ ENTRY(memcpy) /* %o0=dst %o1=src %o2=len */
bleu 90f
andcc %o1, 3, %g0

bne 78b
3: andcc %o1, 4, %g0
be 78f
andcc %o1, 4, %g0

be 2f
andcc %o1, 1, %g0
be 4f
andcc %o1, 2, %g0

ldub [%o1], %g2
add %o1, 1, %o1
stb %g2, [%o0]
sub %o2, 1, %o2
bne 77f
add %o0, 1, %o0
4: lduh [%o1], %g2
add %o1, 2, %o1
sth %g2, [%o0]
sub %o2, 2, %o2
add %o0, 2, %o0

77: andcc %o1, 4, %g0
78: be 2f
mov %o2, %g1

ld [%o1], %o4
Expand Down

0 comments on commit 2fe000d

Please sign in to comment.