public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] glibcextract.py: Place un-assemblable @@@ in a comment
@ 2021-10-08  1:40 Fangrui Song
  2021-10-15 16:29 ` Fangrui Song
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Fangrui Song @ 2021-10-08  1:40 UTC (permalink / raw)
  To: libc-alpha, Joseph Myers

Unlike GCC, Clang passes asm statements and verifies they are valid
instructions/directives. Place the magic @@@ into a comment to avoid
a parse error.
---
 scripts/glibcextract.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/glibcextract.py b/scripts/glibcextract.py
index 752ff6223b..bf49a5e322 100644
--- a/scripts/glibcextract.py
+++ b/scripts/glibcextract.py
@@ -45,7 +45,7 @@ def compute_c_consts(sym_data, cc):
             continue
         name = arg[0]
         value = arg[1]
-        out_lines.append('asm ("@@@name@@@%s@@@value@@@%%0@@@end@@@" '
+        out_lines.append('asm ("/* @@@name@@@%s@@@value@@@%%0@@@end@@@ */" '
                          ': : \"i\" ((long int) (%s)));'
                          % (name, value))
     out_lines.append('}')
-- 
2.33.0.882.g93a45727a2-goog


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

* Re: [PATCH] glibcextract.py: Place un-assemblable @@@ in a comment
  2021-10-08  1:40 [PATCH] glibcextract.py: Place un-assemblable @@@ in a comment Fangrui Song
@ 2021-10-15 16:29 ` Fangrui Song
  2021-10-19  6:18   ` Fāng-ruì Sòng
  2021-10-19  7:40 ` Florian Weimer
  2021-10-19  7:44 ` Andreas Schwab
  2 siblings, 1 reply; 5+ messages in thread
From: Fangrui Song @ 2021-10-15 16:29 UTC (permalink / raw)
  To: libc-alpha, Joseph Myers

On 2021-10-07, Fangrui Song wrote:
>Unlike GCC, Clang passes asm statements and verifies they are valid
>instructions/directives. Place the magic @@@ into a comment to avoid
>a parse error.
>---
> scripts/glibcextract.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/scripts/glibcextract.py b/scripts/glibcextract.py
>index 752ff6223b..bf49a5e322 100644
>--- a/scripts/glibcextract.py
>+++ b/scripts/glibcextract.py
>@@ -45,7 +45,7 @@ def compute_c_consts(sym_data, cc):
>             continue
>         name = arg[0]
>         value = arg[1]
>-        out_lines.append('asm ("@@@name@@@%s@@@value@@@%%0@@@end@@@" '
>+        out_lines.append('asm ("/* @@@name@@@%s@@@value@@@%%0@@@end@@@ */" '
>                          ': : \"i\" ((long int) (%s)));'
>                          % (name, value))
>     out_lines.append('}')
>-- 
>2.33.0.882.g93a45727a2-goog
>

Ping..

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

* Re: [PATCH] glibcextract.py: Place un-assemblable @@@ in a comment
  2021-10-15 16:29 ` Fangrui Song
@ 2021-10-19  6:18   ` Fāng-ruì Sòng
  0 siblings, 0 replies; 5+ messages in thread
From: Fāng-ruì Sòng @ 2021-10-19  6:18 UTC (permalink / raw)
  To: libc-alpha, Joseph Myers

On Fri, Oct 15, 2021 at 9:29 AM Fangrui Song <maskray@google.com> wrote:
>
> On 2021-10-07, Fangrui Song wrote:
> >Unlike GCC, Clang passes asm statements and verifies they are valid
> >instructions/directives. Place the magic @@@ into a comment to avoid
> >a parse error.
> >---
> > scripts/glibcextract.py | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/scripts/glibcextract.py b/scripts/glibcextract.py
> >index 752ff6223b..bf49a5e322 100644
> >--- a/scripts/glibcextract.py
> >+++ b/scripts/glibcextract.py
> >@@ -45,7 +45,7 @@ def compute_c_consts(sym_data, cc):
> >             continue
> >         name = arg[0]
> >         value = arg[1]
> >-        out_lines.append('asm ("@@@name@@@%s@@@value@@@%%0@@@end@@@" '
> >+        out_lines.append('asm ("/* @@@name@@@%s@@@value@@@%%0@@@end@@@ */" '
> >                          ': : \"i\" ((long int) (%s)));'
> >                          % (name, value))
> >     out_lines.append('}')
> >--
> >2.33.0.882.g93a45727a2-goog
> >
>
> Ping..

This seems trivial and straightforward. I'll give a few days and then push it.

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

* Re: [PATCH] glibcextract.py: Place un-assemblable @@@ in a comment
  2021-10-08  1:40 [PATCH] glibcextract.py: Place un-assemblable @@@ in a comment Fangrui Song
  2021-10-15 16:29 ` Fangrui Song
@ 2021-10-19  7:40 ` Florian Weimer
  2021-10-19  7:44 ` Andreas Schwab
  2 siblings, 0 replies; 5+ messages in thread
From: Florian Weimer @ 2021-10-19  7:40 UTC (permalink / raw)
  To: Fangrui Song via Libc-alpha; +Cc: Joseph Myers, Fangrui Song

* Fangrui Song via Libc-alpha:

> Unlike GCC, Clang passes asm statements and verifies they are valid
> instructions/directives. Place the magic @@@ into a comment to avoid
> a parse error.
> ---
>  scripts/glibcextract.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/glibcextract.py b/scripts/glibcextract.py
> index 752ff6223b..bf49a5e322 100644
> --- a/scripts/glibcextract.py
> +++ b/scripts/glibcextract.py
> @@ -45,7 +45,7 @@ def compute_c_consts(sym_data, cc):
>              continue
>          name = arg[0]
>          value = arg[1]
> -        out_lines.append('asm ("@@@name@@@%s@@@value@@@%%0@@@end@@@" '
> +        out_lines.append('asm ("/* @@@name@@@%s@@@value@@@%%0@@@end@@@ */" '
>                           ': : \"i\" ((long int) (%s)));'
>                           % (name, value))
>      out_lines.append('}')

Seems reasonable, thanks.

Florian


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

* Re: [PATCH] glibcextract.py: Place un-assemblable @@@ in a comment
  2021-10-08  1:40 [PATCH] glibcextract.py: Place un-assemblable @@@ in a comment Fangrui Song
  2021-10-15 16:29 ` Fangrui Song
  2021-10-19  7:40 ` Florian Weimer
@ 2021-10-19  7:44 ` Andreas Schwab
  2 siblings, 0 replies; 5+ messages in thread
From: Andreas Schwab @ 2021-10-19  7:44 UTC (permalink / raw)
  To: Fangrui Song via Libc-alpha; +Cc: Joseph Myers, Fangrui Song

On Okt 07 2021, Fangrui Song via Libc-alpha wrote:

> Unlike GCC, Clang passes asm statements and verifies they are valid

parses

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

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

end of thread, other threads:[~2021-10-19  7:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08  1:40 [PATCH] glibcextract.py: Place un-assemblable @@@ in a comment Fangrui Song
2021-10-15 16:29 ` Fangrui Song
2021-10-19  6:18   ` Fāng-ruì Sòng
2021-10-19  7:40 ` Florian Weimer
2021-10-19  7:44 ` Andreas Schwab

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).