From patchwork Thu Sep 16 10:00:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 45079 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EEB363857428 for ; Thu, 16 Sep 2021 10:01:11 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id CC14E385740F for ; Thu, 16 Sep 2021 10:00:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CC14E385740F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 01DF722376 for ; Thu, 16 Sep 2021 10:00:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1631786441; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BkT7ObuZA6bkyswU4qLucp1pPGJGOIcMwAgy2mgB76o=; b=vkFiESCqpJ2C0M8EmPnSBpIVEuQQ/YCf7W7cR/sGQhsn4iOPZyREl/T0DQaNa5v9BFwusL AAGaKt7drB91mC0iAvsbhH+FV4ER8iZe/zjkTOLenENlOTzUB8XCFHNWNxQeEyiUWhpHZE 4nEoOMGUqGlqpMTsPxToN4EXNikJH+o= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1631786441; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BkT7ObuZA6bkyswU4qLucp1pPGJGOIcMwAgy2mgB76o=; b=tgcpucKI1jeTAHJOYpbzV+J8hcqfjRpJ9kN0p1XaMTl0SbS4uLM2E69kKLLVPrL20YHjOB J58OHKLMhyPpxoAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id DB85C13A23 for ; Thu, 16 Sep 2021 10:00:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 9UuNNMgVQ2HAZgAAMHmgww (envelope-from ) for ; Thu, 16 Sep 2021 10:00:40 +0000 Message-ID: <593e4593-d035-0aa4-f86f-cc13842cf66d@suse.cz> Date: Thu, 16 Sep 2021 12:00:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.1 Subject: [PATCH 2/N] Do not hide asm_out_file in ASM_OUTPUT_ASCII. Content-Language: en-US From: =?utf-8?q?Martin_Li=C5=A1ka?= To: GCC Patches References: <8aa1fb10-334d-aa62-13e4-2ebc24d4ea16@suse.cz> In-Reply-To: <8aa1fb10-334d-aa62-13e4-2ebc24d4ea16@suse.cz> X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" 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 From 0e5095274bb4e16ad28a5a52f30bd3887df25fde Mon Sep 17 00:00:00 2001 From: Martin Liska 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