Re: [PATCH, SH] Improve builtin strnlen for small lengths

2014-01-10 Thread kkojima
Christian Bruel wrote: > This patch unrolls string compare for length < 8 and residual bytes > after the word at a time loops (with cmp/str), using base+offset > addressing mode. > It also allows the builtin to be inlined for non-constant lengths. > > No new regressions. Upgraded test case to han

[PATCH, SH] Improve builtin strnlen for small lengths

2014-01-10 Thread Christian Bruel
Hello, This patch unrolls string compare for length < 8 and residual bytes after the word at a time loops (with cmp/str), using base+offset addressing mode. It also allows the builtin to be inlined for non-constant lengths. No new regressions. Upgraded test case to handle former case. OK for tru