diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2013-08-01 15:52:17 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2013-08-01 16:23:12 -0400 |
commit | c53c70a90fdce3e7a53a0412abf7cc2b2a645988 (patch) | |
tree | 0b1ec6d04be95ac07563ba518047be73973d25d8 /arch/tile/lib/strchr_32.c | |
parent | dd78bc11fb2050b6a3990d0421feca4c68ca4335 (diff) |
tile: optimize and clean up string functions
This change cleans up the string code in a number of ways:
- For memcpy(), fix bug in prefetch and increase distance to 3 lines;
optimize for unaligned data; do all loads before wh64 to make memcpy
safe for forward-overlapping calls; etc. Performance is improved.
- Use new copy_byte() function on tilegx to spread a single byte value
out into a full word using the shufflebytes instruction.
- Clean up header include ordering to be more canonical, and remove
spurious #undefs of function names.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile/lib/strchr_32.c')
-rw-r--r-- | arch/tile/lib/strchr_32.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/tile/lib/strchr_32.c b/arch/tile/lib/strchr_32.c index c94e6f7ae7b5..841fe6963019 100644 --- a/arch/tile/lib/strchr_32.c +++ b/arch/tile/lib/strchr_32.c | |||
@@ -16,8 +16,6 @@ | |||
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | 18 | ||
19 | #undef strchr | ||
20 | |||
21 | char *strchr(const char *s, int c) | 19 | char *strchr(const char *s, int c) |
22 | { | 20 | { |
23 | int z, g; | 21 | int z, g; |