From: "Martin Liška" <mliska@suse.cz>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: [PATCH 2/N] Do not hide asm_out_file in ASM_OUTPUT_ASCII.
Date: Thu, 16 Sep 2021 12:00:40 +0200 [thread overview]
Message-ID: <593e4593-d035-0aa4-f86f-cc13842cf66d@suse.cz> (raw)
In-Reply-To: <8aa1fb10-334d-aa62-13e4-2ebc24d4ea16@suse.cz>
[-- Attachment #1: Type: text/plain, Size: 176 bytes --]
Again a preparation patch that was tested on all cross compilers.
Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
Ready to be installed?
Thanks,
Martin
[-- Attachment #2: 0002-Do-not-hide-asm_out_file-in-ASM_OUTPUT_ASCII.patch --]
[-- Type: text/x-patch, Size: 2439 bytes --]
From 0e5095274bb4e16ad28a5a52f30bd3887df25fde Mon Sep 17 00:00:00 2001
From: Martin Liska <mliska@suse.cz>
Date: Wed, 15 Sep 2021 13:52:35 +0200
Subject: [PATCH 2/3] Do not hide asm_out_file in ASM_OUTPUT_ASCII.
gcc/ChangeLog:
* defaults.h (ASM_OUTPUT_ASCII): Do not hide global variable
asm_out_file and stream directly to MYFILE.
---
gcc/defaults.h | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/gcc/defaults.h b/gcc/defaults.h
index ba79a8e48ed..9370fa12f96 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -61,36 +61,34 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#ifndef ASM_OUTPUT_ASCII
#define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \
do { \
- FILE *_hide_asm_out_file = (MYFILE); \
const unsigned char *_hide_p = (const unsigned char *) (MYSTRING); \
int _hide_thissize = (MYLENGTH); \
{ \
- FILE *asm_out_file = _hide_asm_out_file; \
const unsigned char *p = _hide_p; \
int thissize = _hide_thissize; \
int i; \
- fprintf (asm_out_file, "\t.ascii \""); \
+ fprintf (MYFILE, "\t.ascii \""); \
\
for (i = 0; i < thissize; i++) \
{ \
int c = p[i]; \
if (c == '\"' || c == '\\') \
- putc ('\\', asm_out_file); \
+ putc ('\\', MYFILE); \
if (ISPRINT (c)) \
- putc (c, asm_out_file); \
+ putc (c, MYFILE); \
else \
{ \
- fprintf (asm_out_file, "\\%o", c); \
+ fprintf (MYFILE, "\\%o", c); \
/* After an octal-escape, if a digit follows, \
terminate one string constant and start another. \
The VAX assembler fails to stop reading the escape \
after three digits, so this is the only way we \
can get it to parse the data properly. */ \
if (i < thissize - 1 && ISDIGIT (p[i + 1])) \
- fprintf (asm_out_file, "\"\n\t.ascii \""); \
+ fprintf (MYFILE, "\"\n\t.ascii \""); \
} \
} \
- fprintf (asm_out_file, "\"\n"); \
+ fprintf (MYFILE, "\"\n"); \
} \
} \
while (0)
--
2.33.0
next prev parent reply other threads:[~2021-09-16 10:00 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-10 9:31 [PATCH][RFC] Come up with casm state Martin Liška
2021-09-16 10:00 ` [PATCH 1/N] Rename asm_out_file function arguments Martin Liška
2021-09-16 13:52 ` Iain Sandoe
2021-09-17 8:23 ` Richard Biener
2021-09-17 9:42 ` Iain Sandoe
2021-09-17 9:57 ` Richard Biener
2021-10-20 11:57 ` Martin Liška
2021-10-20 12:11 ` Richard Biener
2021-09-16 10:00 ` Martin Liška [this message]
2021-09-22 9:44 ` [PATCH 2/N] Do not hide asm_out_file in ASM_OUTPUT_ASCII Richard Biener
2021-09-30 11:46 ` Martin Liška
2021-09-16 13:12 ` [PATCH 3/N] Come up with casm global state Martin Liška
2021-09-22 9:59 ` Richard Biener
2021-10-04 11:13 ` Martin Liška
2021-10-05 11:54 ` Richard Biener
2021-10-21 9:47 ` Martin Liška
2021-10-21 12:42 ` Richard Biener
2021-10-21 13:43 ` Martin Liška
2021-10-21 13:57 ` Richard Biener
2021-10-21 15:40 ` Segher Boessenkool
2021-10-25 10:46 ` Richard Biener
2021-10-25 13:36 ` Martin Liška
2021-10-25 16:30 ` Segher Boessenkool
2021-10-26 7:45 ` Richard Biener
2021-11-05 14:27 ` Martin Liška
2021-11-09 12:49 ` Richard Biener
2021-10-25 16:06 ` Segher Boessenkool
2021-10-04 11:16 ` Martin Liška
2021-10-21 12:47 ` David Malcolm
2021-10-21 13:08 ` Richard Biener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=593e4593-d035-0aa4-f86f-cc13842cf66d@suse.cz \
--to=mliska@suse.cz \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).