public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/104794] New: arm: use translation pattern for repetitive messages
@ 2022-03-04 21:35 roland.illig at gmx dot de
  2022-03-04 21:40 ` [Bug target/104794] " roland.illig at gmx dot de
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: roland.illig at gmx dot de @ 2022-03-04 21:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104794

            Bug ID: 104794
           Summary: arm: use translation pattern for repetitive messages
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: roland.illig at gmx dot de
  Target Milestone: ---

arm-builtins.cc says:

              if (fcode == ARM_BUILTIN_WSRLHI)
                error ("the count should be no less than 0; please check the
intrinsic %<_mm_srli_pi16%> in code");
              else if (fcode == ARM_BUILTIN_WSRLWI)
                error ("the count should be no less than 0; please check the
intrinsic %<_mm_srli_pi32%> in code");
              else if (fcode == ARM_BUILTIN_WSRLDI)
                error ("the count should be no less than 0; please check the
intrinsic %<_mm_srli_si64%> in code");
              else if (fcode == ARM_BUILTIN_WSLLHI)
                error ("the count should be no less than 0; please check the
intrinsic %<_mm_slli_pi16%> in code");
              else if (fcode == ARM_BUILTIN_WSLLWI)
                error ("the count should be no less than 0; please check the
intrinsic %<_mm_slli_pi32%> in code");
              else if (fcode == ARM_BUILTIN_WSLLDI)
                error ("the count should be no less than 0; please check the
intrinsic %<_mm_slli_si64%> in code");
              else if (fcode == ARM_BUILTIN_WSRAHI)
                error ("the count should be no less than 0; please check the
intrinsic %<_mm_srai_pi16%> in code");
              else if (fcode == ARM_BUILTIN_WSRAWI)
                error ("the count should be no less than 0; please check the
intrinsic %<_mm_srai_pi32%> in code");
              else if (fcode == ARM_BUILTIN_WSRADI)
                error ("the count should be no less than 0; please check the
intrinsic %<_mm_srai_si64%> in code");
              else if (fcode == ARM_BUILTIN_WSRLH)
                error ("the count should be no less than 0; please check the
intrinsic %<_mm_srl_pi16%> in code");
              else if (fcode == ARM_BUILTIN_WSRLW)
                error ("the count should be no less than 0; please check the
intrinsic %<_mm_srl_pi32%> in code");
              else if (fcode == ARM_BUILTIN_WSRLD)
                error ("the count should be no less than 0; please check the
intrinsic %<_mm_srl_si64%> in code");
              else if (fcode == ARM_BUILTIN_WSLLH)
                error ("the count should be no less than 0; please check the
intrinsic %<_mm_sll_pi16%> in code");
              else if (fcode == ARM_BUILTIN_WSLLW)
                error ("the count should be no less than 0; please check the
intrinsic %<_mm_sll_pi32%> in code");
              else if (fcode == ARM_BUILTIN_WSLLD)
                error ("the count should be no less than 0; please check the
intrinsic %<_mm_sll_si64%> in code");
              else if (fcode == ARM_BUILTIN_WSRAH)
                error ("the count should be no less than 0; please check the
intrinsic %<_mm_sra_pi16%> in code");
              else if (fcode == ARM_BUILTIN_WSRAW)
                error ("the count should be no less than 0; please check the
intrinsic %<_mm_sra_pi32%> in code");
              else
                error ("the count should be no less than 0; please check the
intrinsic %<_mm_sra_si64%> in code");


As a translator, I have to translate each message individually, which increases
the possibility of copy-and-paste mistakes. It would be way easier to me if the
code consistently used this pattern:

error ("the count should be no less than 0; please check the intrinsic %qs in
code", "_mm_sra_si64");

This would eliminate all possible typos and mistakes on my side. A nice side
effect is a smaller resulting binary.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/104794] arm: use translation pattern for repetitive messages
  2022-03-04 21:35 [Bug target/104794] New: arm: use translation pattern for repetitive messages roland.illig at gmx dot de
@ 2022-03-04 21:40 ` roland.illig at gmx dot de
  2022-03-04 21:44 ` roland.illig at gmx dot de
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: roland.illig at gmx dot de @ 2022-03-04 21:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104794

--- Comment #1 from Roland Illig <roland.illig at gmx dot de> ---
>From arm-builtins.cc:
> "the range of count should be in 0 to 32;
> please check the intrinsic %<_mm_rori_pi16%> in code"

While here, please double-check whether the "0 to 32" is a typo and should
rather be "0 to 16". That would match the "0 to 64" for _mm_rori_si64 a few
lines further down.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/104794] arm: use translation pattern for repetitive messages
  2022-03-04 21:35 [Bug target/104794] New: arm: use translation pattern for repetitive messages roland.illig at gmx dot de
  2022-03-04 21:40 ` [Bug target/104794] " roland.illig at gmx dot de
@ 2022-03-04 21:44 ` roland.illig at gmx dot de
  2022-03-04 21:45 ` roland.illig at gmx dot de
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: roland.illig at gmx dot de @ 2022-03-04 21:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104794

--- Comment #2 from Roland Illig <roland.illig at gmx dot de> ---
While here, please add the missing space in the middle of the string:

      error ("incompatible options %'-mstack-protector-guard=global%' and"
             "%'-mstack-protector-guard-offset=%qs%'",

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/104794] arm: use translation pattern for repetitive messages
  2022-03-04 21:35 [Bug target/104794] New: arm: use translation pattern for repetitive messages roland.illig at gmx dot de
  2022-03-04 21:40 ` [Bug target/104794] " roland.illig at gmx dot de
  2022-03-04 21:44 ` roland.illig at gmx dot de
@ 2022-03-04 21:45 ` roland.illig at gmx dot de
  2022-03-04 21:51 ` roland.illig at gmx dot de
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: roland.illig at gmx dot de @ 2022-03-04 21:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104794

--- Comment #3 from Roland Illig <roland.illig at gmx dot de> ---
While here:

> error ("incompatible options %'-mstack-protector-guard=global%' and"
>        "%'-mstack-protector-guard-offset=%qs%'",

The idiomatic way to write quotes is %<...%>, not %'...%'.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/104794] arm: use translation pattern for repetitive messages
  2022-03-04 21:35 [Bug target/104794] New: arm: use translation pattern for repetitive messages roland.illig at gmx dot de
                   ` (2 preceding siblings ...)
  2022-03-04 21:45 ` roland.illig at gmx dot de
@ 2022-03-04 21:51 ` roland.illig at gmx dot de
  2022-03-04 21:51 ` roland.illig at gmx dot de
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: roland.illig at gmx dot de @ 2022-03-04 21:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104794

--- Comment #4 from Roland Illig <roland.illig at gmx dot de> ---
And another thing:
> %'-mstack-protector-guard-offset=%qs%'

This produces nested quotes. The %qs should rather be a simple %s. Maybe you
can write a unit test to see how the end result looks. I didn't find any such
test in the test suite, just some tests that specify a valid value for the
option.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/104794] arm: use translation pattern for repetitive messages
  2022-03-04 21:35 [Bug target/104794] New: arm: use translation pattern for repetitive messages roland.illig at gmx dot de
                   ` (3 preceding siblings ...)
  2022-03-04 21:51 ` roland.illig at gmx dot de
@ 2022-03-04 21:51 ` roland.illig at gmx dot de
  2022-03-07 10:19 ` marxin at gcc dot gnu.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: roland.illig at gmx dot de @ 2022-03-04 21:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104794

--- Comment #5 from Roland Illig <roland.illig at gmx dot de> ---
Same for %'-mstack-protector-guard=tls%' in the same file.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/104794] arm: use translation pattern for repetitive messages
  2022-03-04 21:35 [Bug target/104794] New: arm: use translation pattern for repetitive messages roland.illig at gmx dot de
                   ` (4 preceding siblings ...)
  2022-03-04 21:51 ` roland.illig at gmx dot de
@ 2022-03-07 10:19 ` marxin at gcc dot gnu.org
  2022-03-07 10:27 ` marxin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-03-07 10:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104794

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Roland Illig from comment #1)
> From arm-builtins.cc:
> > "the range of count should be in 0 to 32;
> > please check the intrinsic %<_mm_rori_pi16%> in code"
> 
> While here, please double-check whether the "0 to 32" is a typo and should
> rather be "0 to 16". That would match the "0 to 64" for _mm_rori_si64 a few
> lines further down.

I've just sent patch for this and c#0:
https://gcc.gnu.org/pipermail/gcc-patches/2022-March/591277.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/104794] arm: use translation pattern for repetitive messages
  2022-03-04 21:35 [Bug target/104794] New: arm: use translation pattern for repetitive messages roland.illig at gmx dot de
                   ` (5 preceding siblings ...)
  2022-03-07 10:19 ` marxin at gcc dot gnu.org
@ 2022-03-07 10:27 ` marxin at gcc dot gnu.org
  2022-03-07 10:38 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-03-07 10:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104794

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2022-03-07
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot gnu.org

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/104794] arm: use translation pattern for repetitive messages
  2022-03-04 21:35 [Bug target/104794] New: arm: use translation pattern for repetitive messages roland.illig at gmx dot de
                   ` (6 preceding siblings ...)
  2022-03-07 10:27 ` marxin at gcc dot gnu.org
@ 2022-03-07 10:38 ` cvs-commit at gcc dot gnu.org
  2022-03-07 10:38 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-07 10:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104794

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:cfb46c944e8a05653c7eedd79116dae9ce7ad91c

commit r12-7514-gcfb46c944e8a05653c7eedd79116dae9ce7ad91c
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Mar 7 10:56:43 2022 +0100

    translation: reuse string and use switch for codes

            PR target/104794

    gcc/ChangeLog:

            * config/arm/arm-builtins.cc (arm_expand_builtin): Reuse error
            message.  Fix ARM_BUILTIN_WRORHI and ARM_BUILTIN_WRORH that can
            have only range [0,32].

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/104794] arm: use translation pattern for repetitive messages
  2022-03-04 21:35 [Bug target/104794] New: arm: use translation pattern for repetitive messages roland.illig at gmx dot de
                   ` (7 preceding siblings ...)
  2022-03-07 10:38 ` cvs-commit at gcc dot gnu.org
@ 2022-03-07 10:38 ` cvs-commit at gcc dot gnu.org
  2022-03-07 10:38 ` marxin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-07 10:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104794

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:fcc48d2ed6b621f7d0c141afed81a4922c056039

commit r12-7515-gfcc48d2ed6b621f7d0c141afed81a4922c056039
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Mar 7 11:25:18 2022 +0100

    arm: fix option quoting in error messages.

            PR target/104794

    gcc/ChangeLog:

            * config/arm/arm.cc (arm_option_override_internal): Fix quoting
            of options in error messages.
            (arm_option_reconfigure_globals): Likewise.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/104794] arm: use translation pattern for repetitive messages
  2022-03-04 21:35 [Bug target/104794] New: arm: use translation pattern for repetitive messages roland.illig at gmx dot de
                   ` (8 preceding siblings ...)
  2022-03-07 10:38 ` cvs-commit at gcc dot gnu.org
@ 2022-03-07 10:38 ` marxin at gcc dot gnu.org
  2022-03-07 13:17 ` cvs-commit at gcc dot gnu.org
  2022-03-12 15:31 ` roland.illig at gmx dot de
  11 siblings, 0 replies; 13+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-03-07 10:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104794

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed now.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/104794] arm: use translation pattern for repetitive messages
  2022-03-04 21:35 [Bug target/104794] New: arm: use translation pattern for repetitive messages roland.illig at gmx dot de
                   ` (9 preceding siblings ...)
  2022-03-07 10:38 ` marxin at gcc dot gnu.org
@ 2022-03-07 13:17 ` cvs-commit at gcc dot gnu.org
  2022-03-12 15:31 ` roland.illig at gmx dot de
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-07 13:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104794

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:b1d8198e7df616ea80cb648a2c831e2c21f4319f

commit r12-7518-gb1d8198e7df616ea80cb648a2c831e2c21f4319f
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Mar 7 14:16:21 2022 +0100

    arm: add missing space to error.

            PR target/104794

    gcc/ChangeLog:

            * config/arm/arm.cc (arm_option_override_internal): Add missing
            space.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/104794] arm: use translation pattern for repetitive messages
  2022-03-04 21:35 [Bug target/104794] New: arm: use translation pattern for repetitive messages roland.illig at gmx dot de
                   ` (10 preceding siblings ...)
  2022-03-07 13:17 ` cvs-commit at gcc dot gnu.org
@ 2022-03-12 15:31 ` roland.illig at gmx dot de
  11 siblings, 0 replies; 13+ messages in thread
From: roland.illig at gmx dot de @ 2022-03-12 15:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104794

--- Comment #11 from Roland Illig <roland.illig at gmx dot de> ---
Thank you, looks good now.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-03-12 15:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04 21:35 [Bug target/104794] New: arm: use translation pattern for repetitive messages roland.illig at gmx dot de
2022-03-04 21:40 ` [Bug target/104794] " roland.illig at gmx dot de
2022-03-04 21:44 ` roland.illig at gmx dot de
2022-03-04 21:45 ` roland.illig at gmx dot de
2022-03-04 21:51 ` roland.illig at gmx dot de
2022-03-04 21:51 ` roland.illig at gmx dot de
2022-03-07 10:19 ` marxin at gcc dot gnu.org
2022-03-07 10:27 ` marxin at gcc dot gnu.org
2022-03-07 10:38 ` cvs-commit at gcc dot gnu.org
2022-03-07 10:38 ` cvs-commit at gcc dot gnu.org
2022-03-07 10:38 ` marxin at gcc dot gnu.org
2022-03-07 13:17 ` cvs-commit at gcc dot gnu.org
2022-03-12 15:31 ` roland.illig at gmx dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).