diff options
author | Alan Modra <amodra@gmail.com> | 2013-08-17 18:46:47 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2013-10-04 10:40:56 +0930 |
commit | fe6e95d7171eba5f3e07848f081676fae4e86322 (patch) | |
tree | f4a262abf7061e3ab3b30ac9fa15b7a2e238b264 /hurd | |
parent | 664318c3eb07032e2bfcf47cb2aa3c89280c19e7 (diff) | |
download | glibc-fe6e95d7171eba5f3e07848f081676fae4e86322.zip glibc-fe6e95d7171eba5f3e07848f081676fae4e86322.tar.gz glibc-fe6e95d7171eba5f3e07848f081676fae4e86322.tar.bz2 |
PowerPC LE memcmp
http://sourceware.org/ml/libc-alpha/2013-08/msg00102.html
This is a rather large patch due to formatting and renaming. The
formatting changes were to make it possible to compare power7 and
power4 versions of memcmp. Using different register defines came
about while I was wrestling with the code, trying to find spare
registers at one stage. I found it much simpler if we refer to a reg
by the same name throughout a function, so it's better if short-term
multiple use regs like rTMP are referred to using their register
number. I made the cr field usage changes when attempting to reload
rWORDn regs in the exit path to byte swap before comparing when
little-endian. That proved a bad idea due to the pipelining involved
in the main loop; Offsets to reload the regs were different first
time around the loop.. Anyway, I left the cr field usage changes in
place for consistency.
Aside from these more-or-less cosmetic changes, I fixed a number of
places where an early exit path restores regs unnecessarily, removed
some dead code, and optimised one or two exits.
* sysdeps/powerpc/powerpc64/power7/memcmp.S: Add little-endian support.
Formatting. Consistently use rXXX register defines or rN defines.
Use early exit labels that avoid restoring unused non-volatile regs.
Make cr field use more consistent with rWORDn compares. Rename
regs used as shift registers for unaligned loop, using rN defines
for short lifetime/multiple use regs.
* sysdeps/powerpc/powerpc64/power4/memcmp.S: Likewise.
* sysdeps/powerpc/powerpc32/power7/memcmp.S: Likewise. Exit with
addi 1,1,64 to pop stack frame. Simplify return value code.
* sysdeps/powerpc/powerpc32/power4/memcmp.S: Likewise.
Diffstat (limited to 'hurd')
0 files changed, 0 insertions, 0 deletions