This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, SH] Add support for inlined builtin-strcmp (2/2)
- From: Christian Bruel <christian dot bruel at st dot com>
- To: Oleg Endo <oleg dot endo at t-online dot de>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Date: Fri, 18 Oct 2013 09:59:36 +0200
- Subject: Re: [PATCH, SH] Add support for inlined builtin-strcmp (2/2)
- Authentication-results: sourceware.org; auth=none
- References: <525FF0F9 dot 4010704 at st dot com> <1382051119 dot 2445 dot 62 dot camel at yam-132-YW-E178-FTW>
On 10/18/2013 01:05 AM, Oleg Endo wrote:
> I was wondering, in file sh-mem.c, the new function
> 'sh4_expand_cmpstr' ... why is it SH4-something? It's a bit confusing,
> since cmp/str has been around since ever (i.e. since SH1). Maybe just
> rename it to 'sh_expand_cmpstr' instead?
Just historical. (SH4* are our primary SH platforms). The code is
enabled/tested for all SH1 of course, I will rename. Thanks .
> Maybe just
> rename it to 'sh_expand_cmpstr' instead? The function always returns
> 'true', so maybe just make it return 'void'?
yes, it's for genericity as I plan to reuse/specialize the code based on
the count parameter for strncmp to be contributed next.
> Also, in the expander ...
> + [(set (match_operand:SI 0 "register_operand" "")
> + (compare:SI (match_operand:BLK 1 "memory_operand" "")
> ... no need to use empty "" constraints