Re: [PATCH, SH] Add support for inlined builtin_strncmp

2013-10-25 Thread Kaz Kojima
Christian Bruel wrote: > No regressions for -m2 and -m4 for sh-elf. > OK for trunk ? OK with the change of ChangeLog entry suggested by your another mail. Thanks! Regards, kaz

Re: [PATCH, SH] Add support for inlined builtin_strncmp

2013-10-25 Thread Christian Bruel
In the ChangeLog, the entry * gcc/config/sh/sh-mem.cc (sh_expand_cmpnstr): Moved here. is instead * gcc/config/sh/sh-mem.cc (sh_expand_cmpnstr): New function. Sorry for this, Christian

[PATCH, SH] Add support for inlined builtin_strncmp

2013-10-25 Thread Christian Bruel
Hello, This patch implements the cmpstrnsi pattern to support the strncmp builtin for constant lengths. The cmp/str instructions is used for size >= 8 bytes, else fall back to the byte-at-a-time check to favor small strings. I now also handle the cases where align is known for both cmpstr and cmp