This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, generic] Support printing of escaped curly braces and vertical bar in assembler output
- From: Michael Zolotukhin <michael dot v dot zolotukhin at gmail dot com>
- To: Maksim Kuznetsov <maks dot kuznetsov at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, ubizjak at gmail dot com, izamyatin at gmail dot com, kirill dot yukhin at gmail dot com, sergos dot gnu at gmail dot com, hjl dot tools at gmail dot com, Segher Boessenkool <segher at kernel dot crashing dot org>
- Date: Wed, 27 Mar 2013 19:44:32 +0400
- Subject: Re: [PATCH, generic] Support printing of escaped curly braces and vertical bar in assembler output
- References: <CACRX5U+PDdqEqqNM7_3H3ULirWc5hwGSTfAoyTkxpGZ3nnF=BA at mail dot gmail dot com> <D7D2631A-9833-4ADC-A6AD-20DEC12E9102 at kernel dot crashing dot org> <CACRX5U+gDT+Z=tp6gYU2iwRe3wLp1s-8sjAX7p8tbxH=oDUxPQ at mail dot gmail dot com> <773CF015-2E8D-47DD-B25E-5C24B9F95B63 at kernel dot crashing dot org> <CACRX5UKyqAqS=zFROXEunQCzqdc93DfX_74OXsxY0et6KNb5nw at mail dot gmail dot com> <CACRX5UJbVCjwyWDH6VvMWCtqZRxaLLDUfk14osz-pZS=XhXHwg at mail dot gmail dot com> <CACRX5U+r8qsC8hZEUg_aU_UiV43c3JBGx7GWgmb-J_svdUMv_g at mail dot gmail dot com>
I'd suggest rewriting this expression in some easier way:
p += (*p == '%' && *(p + 1)) ? 2 : 1;
I'd prefer
if (*p == '%')
p++;
p++;
However, that could be only my taste:)
On 26 March 2013 15:10, Maksim Kuznetsov <maks.kuznetsov@gmail.com> wrote:
>> Thanks for the explanation, now I understand it. I fixed the patch
>> according to your remarks. I removed %| support since we don't
>> actually need it in i386 right now, it was added for the purpose of
>> possible generalization.
>>
>> Updated patch is attached.
>
> Ping
>
> --
> Maxim Kuznetsov
--
---
Best regards,
Michael V. Zolotukhin,
Software Engineer
Intel Corporation.