From patchwork Sat Jul 9 20:13:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 104017 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 895741007D1 for ; Sun, 10 Jul 2011 06:14:44 +1000 (EST) Received: (qmail 371 invoked by alias); 9 Jul 2011 20:14:33 -0000 Received: (qmail 32761 invoked by uid 22791); 9 Jul 2011 20:14:29 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-pz0-f47.google.com (HELO mail-pz0-f47.google.com) (209.85.210.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 09 Jul 2011 20:14:10 +0000 Received: by pzk36 with SMTP id 36so2357538pzk.20 for ; Sat, 09 Jul 2011 13:14:10 -0700 (PDT) Received: by 10.68.26.71 with SMTP id j7mr1820309pbg.525.1310242450403; Sat, 09 Jul 2011 13:14:10 -0700 (PDT) Received: from localhost.localdomain (c-71-227-161-214.hsd1.wa.comcast.net [71.227.161.214]) by mx.google.com with ESMTPS id c5sm2796524pbh.94.2011.07.09.13.14.09 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 09 Jul 2011 13:14:09 -0700 (PDT) From: Richard Henderson To: gcc-patches@gcc.gnu.org Subject: [PATCH 1/6] Move ASM_COMMENT_START to defaults.h. Date: Sat, 9 Jul 2011 13:13:57 -0700 Message-Id: <1310242442-26123-2-git-send-email-rth@redhat.com> In-Reply-To: <1310242442-26123-1-git-send-email-rth@redhat.com> References: <1310242442-26123-1-git-send-email-rth@redhat.com> X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Note the extreme silliness in dwarf2out.c with 3 (three) copies. --- gcc/defaults.h | 5 +++++ gcc/dwarf2asm.c | 6 ------ gcc/dwarf2out.c | 15 --------------- gcc/final.c | 5 ----- gcc/toplev.c | 4 ---- gcc/varasm.c | 4 ---- gcc/vmsdbgout.c | 5 ----- 7 files changed, 5 insertions(+), 39 deletions(-) diff --git a/gcc/defaults.h b/gcc/defaults.h index 5f83b18..118cb1c 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -28,6 +28,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #ifndef GCC_DEFAULTS_H #define GCC_DEFAULTS_H +/* How to start an assembler comment. */ +#ifndef ASM_COMMENT_START +#define ASM_COMMENT_START ";#" +#endif + /* Store in OUTPUT a string (made with alloca) containing an assembler-name for a local static variable or function named NAME. LABELNO is an integer which is different for each call. */ diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c index 4c1b6d4..0b7480b 100644 --- a/gcc/dwarf2asm.c +++ b/gcc/dwarf2asm.c @@ -34,12 +34,6 @@ along with GCC; see the file COPYING3. If not see #include "ggc.h" #include "tm_p.h" - -/* How to start an assembler comment. */ -#ifndef ASM_COMMENT_START -#define ASM_COMMENT_START ";#" -#endif - /* Output an unaligned integer with the given value and size. Prefer not to print a newline, since the caller may want to add a comment. */ diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index bad0b2d..211f270 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -168,11 +168,6 @@ static GTY(()) section *debug_str_section; static GTY(()) section *debug_ranges_section; static GTY(()) section *debug_frame_section; -/* How to start an assembler comment. */ -#ifndef ASM_COMMENT_START -#define ASM_COMMENT_START ";#" -#endif - /* Maximum size (in bytes) of an artificially generated label. */ #define MAX_ARTIFICIAL_LABEL_BYTES 30 @@ -277,11 +272,6 @@ static void output_cfa_loc_raw (dw_cfi_ref); personality CFI. */ static GTY(()) rtx current_unit_personality; -/* How to start an assembler comment. */ -#ifndef ASM_COMMENT_START -#define ASM_COMMENT_START ";#" -#endif - /* Data and reference forms for relocatable data. */ #define DW_FORM_data (DWARF_OFFSET_SIZE == 8 ? DW_FORM_data8 : DW_FORM_data4) #define DW_FORM_ref (DWARF_OFFSET_SIZE == 8 ? DW_FORM_ref8 : DW_FORM_ref4) @@ -3479,11 +3469,6 @@ typedef struct skeleton_chain_struct } skeleton_chain_node; -/* How to start an assembler comment. */ -#ifndef ASM_COMMENT_START -#define ASM_COMMENT_START ";#" -#endif - /* Define a macro which returns nonzero for a TYPE_DECL which was implicitly generated for a type. diff --git a/gcc/final.c b/gcc/final.c index 483a645..3416955 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -106,11 +106,6 @@ along with GCC; see the file COPYING3. If not see #define CC_STATUS_INIT #endif -/* How to start an assembler comment. */ -#ifndef ASM_COMMENT_START -#define ASM_COMMENT_START ";#" -#endif - /* Is the given character a logical line separator for the assembler? */ #ifndef IS_ASM_LOGICAL_LINE_SEPARATOR #define IS_ASM_LOGICAL_LINE_SEPARATOR(C, STR) ((C) == ';') diff --git a/gcc/toplev.c b/gcc/toplev.c index 4591c30..109325c 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -722,7 +722,6 @@ print_version (FILE *file, const char *indent) print_plugins_versions (file, indent); } -#ifdef ASM_COMMENT_START static int print_to_asm_out_file (print_switch_type type, const char * text) { @@ -755,7 +754,6 @@ print_to_asm_out_file (print_switch_type type, const char * text) return -1; } } -#endif static int print_to_stderr (print_switch_type type, const char * text) @@ -921,7 +919,6 @@ init_asm_output (const char *name) inform (input_location, "-frecord-gcc-switches is not supported by the current target"); } -#ifdef ASM_COMMENT_START if (flag_verbose_asm) { /* Print the list of switches in effect @@ -930,7 +927,6 @@ init_asm_output (const char *name) print_switch_values (print_to_asm_out_file); putc ('\n', asm_out_file); } -#endif } } diff --git a/gcc/varasm.c b/gcc/varasm.c index cfdf8d7..b0690f50 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -5062,14 +5062,12 @@ output_constructor (tree exp, unsigned HOST_WIDE_INT size, else if (TREE_CODE (local.type) == ARRAY_TYPE) local.index = ce->index; -#ifdef ASM_COMMENT_START if (local.field && flag_verbose_asm) fprintf (asm_out_file, "%s %s:\n", ASM_COMMENT_START, DECL_NAME (local.field) ? IDENTIFIER_POINTER (DECL_NAME (local.field)) : ""); -#endif /* Eliminate the marker that makes a cast not be an lvalue. */ if (local.val != NULL_TREE) @@ -6180,12 +6178,10 @@ default_elf_asm_named_section (const char *name, unsigned int flags, type = "progbits"; format = ",@%s"; -#ifdef ASM_COMMENT_START /* On platforms that use "@" as the assembly comment character, use "%" instead. */ if (strcmp (ASM_COMMENT_START, "@") == 0) format = ",%%%s"; -#endif fprintf (asm_out_file, format, type); if (flags & SECTION_ENTSIZE) diff --git a/gcc/vmsdbgout.c b/gcc/vmsdbgout.c index 1d58d69..84a96c0 100644 --- a/gcc/vmsdbgout.c +++ b/gcc/vmsdbgout.c @@ -74,11 +74,6 @@ typedef struct dst_file_info_struct } dst_file_info_entry; -/* How to start an assembler comment. */ -#ifndef ASM_COMMENT_START -#define ASM_COMMENT_START ";#" -#endif - /* Maximum size (in bytes) of an artificially generated label. */ #define MAX_ARTIFICIAL_LABEL_BYTES 30