On Tue, 13 Jul 2021 at 18:24, Bernhard Reutner-Fischer
<[email protected]> wrote:
>
> On Tue, 13 Jul 2021 16:35:43 +0100
> Ron Yorston <[email protected]> wrote:
>
> > Building with FEATURE_VI_REGEX_SEARCH enabled fails.
>
btw..
If i'm not mistaken, the s++ is fully redundant here although it seems
that my gcc-11 does not optimize it like if we manually spell it out
like in the attached?
Must be marked noinline to avoid inlining it twice it seems?!
If that double inlining really happens then the implied code growth
even for -Os is a different bug..
function old new delta
colon 4527 4597 +70
strchr_backslash 38 - -38
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/0 up/down: 70/-38) Total: 32 bytes
thanks,
diff --git a/editors/vi.c b/editors/vi.c
index a4b958734..074a31920 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -2686,10 +2686,9 @@ static char *strchr_backslash(const char *s, int c)
while (*s) {
if (*s == c)
return (char *)s;
- if (*s == '\\')
- if (*++s == '\0')
+ if (*s++ == '\\')
+ if (*s == '\0')
break;
- s++;
}
return NULL;
}
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox