This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Target-ize ASM_OPEN_PAREN, ASM_CLOSE_PAREN


This is trivial.  The only two targets that don't use "(" and ")" are
x86 and pdp11.  How can x86 have "" as operator grouping parentheses?

Documented, and includes documentation for previous patch with
Richard's amendments and elaboration.

Bootstrapping x86 Linux.  OK to commit?

Neil.

	* final.c (output_addr_const): Use target opening and
	closing parentheses.
	* target-def.h: Define TARGET_ASM_OPEN_PAREN, TARGET_ASM_CLOSE_PAREN
	defaults, add to TARGET_ASM_OUT.
	* target.h (struct gcc_target): Add open_paren and close_paren.
	* doc/md.texi: Update.
	* doc/tm.texi: Document TARGET_ASM_FUNCTION_END_PROLOGUE,
	TARGET_ASM_FUNCTION_BEGIN_EPILOGUE, TARGET_ASM_OPEN_PAREN and
	TARGET_ASM_CLOSE_PAREN.
config:
	* i386/i386.c (TARGET_ASM_OPEN_PAREN, TARGET_ASM_CLOSE_PAREN):
	Override.
	* pdp11/pdp11.c (TARGET_ASM_OPEN_PAREN, TARGET_ASM_CLOSE_PAREN):
	Override.
	* 1750a/1750a.h (ASM_OPEN_PAREN, ASM_CLOSE_PAREN): Remove.
	* a29k/a29k.h: Similarly.
	* alpha/alpha.h: Similarly.
	* arc/arc.h: Similarly.
	* arm/aof.h: Similarly.
	* arm/aout.h: Similarly.
	* avr/avr.h: Similarly.
	* c4x/c4x.h: Similarly.
	* clipper/clipper.h: Similarly.
	* convex/convex.h: Similarly.
	* d30v/d30v.h: Similarly.
	* dsp16xx/dsp16xx.h: Similarly.
	* elxsi/elxsi.h: Similarly.
	* fr30/fr30.h: Similarly.
	* h8300/h8300.h: Similarly.
	* i370/i370.h: Similarly.
	* i386/i386.h: Similarly.
	* i860/i860.h: Similarly.
	* i960/i960.h: Similarly.
	* ia64/ia64.h: Similarly.
	* m32r/m32r.h: Similarly.
	* m68hc11/m68hc11.h: Similarly.
	* m68k/m68k.h: Similarly.
	* m88k/m88k.h: Similarly.
	* mcore/mcore.h: Similarly.
	* mips/mips.h: Similarly.
	* mn10200/mn10200.h: Similarly.
	* mn10300/mn10300.h: Similarly.
	* ns32k/ns32k.h: Similarly.
	* pa/pa.h: Similarly.
	* pdp11/pdp11.h: Similarly.
	* pj/pj.h: Similarly.
	* romp/romp.h: Similarly.
	* rs6000/rs6000.h: Similarly.
	* sh/sh.h: Similarly.
	* sparc/sparc.h: Similarly.
	* v850/v850.h: Similarly.
	* vax/vax.h: Similarly.
	* we32k/we32k.h: Similarly.

============================================================
Index: gcc/final.c
--- gcc/final.c	2001/07/08 19:55:56	1.180
+++ gcc/final.c	2001/07/08 21:53:57
@@ -3664,9 +3664,9 @@ output_addr_const (file, x)
 	   && INTVAL (XEXP (x, 1)) < 0)
 	  || GET_CODE (XEXP (x, 1)) != CONST_INT)
 	{
-	  fprintf (file, "%s", ASM_OPEN_PAREN);
+	  fputs (targetm.asm_out.open_paren, file);
 	  output_addr_const (file, XEXP (x, 1));
-	  fprintf (file, "%s", ASM_CLOSE_PAREN);
+	  fputs (targetm.asm_out.close_paren, file);
 	}
       else
 	output_addr_const (file, XEXP (x, 1));
============================================================
Index: gcc/target-def.h
--- gcc/target-def.h	2001/07/08 20:05:08	1.6
+++ gcc/target-def.h	2001/07/08 21:53:57
@@ -26,12 +26,16 @@ Foundation, 59 Temple Place - Suite 330,
    even if they do nothing.  */
 
 /* Assembler output.  */
+#define TARGET_ASM_OPEN_PAREN "("
+#define TARGET_ASM_CLOSE_PAREN ")"
 #define TARGET_ASM_FUNCTION_PROLOGUE default_function_pro_epilogue
 #define TARGET_ASM_FUNCTION_EPILOGUE default_function_pro_epilogue
 #define TARGET_ASM_FUNCTION_END_PROLOGUE no_asm_to_stream
 #define TARGET_ASM_FUNCTION_BEGIN_EPILOGUE no_asm_to_stream
 
-#define TARGET_ASM_OUT {TARGET_ASM_FUNCTION_PROLOGUE,		\
+#define TARGET_ASM_OUT {TARGET_ASM_OPEN_PAREN,			\
+			TARGET_ASM_CLOSE_PAREN,			\
+			TARGET_ASM_FUNCTION_PROLOGUE,		\
 			TARGET_ASM_FUNCTION_END_PROLOGUE,	\
 			TARGET_ASM_FUNCTION_BEGIN_EPILOGUE,	\
 			TARGET_ASM_FUNCTION_EPILOGUE}
============================================================
Index: gcc/target.h
--- gcc/target.h	2001/07/08 20:05:08	1.7
+++ gcc/target.h	2001/07/08 21:53:57
@@ -20,7 +20,7 @@ Foundation, 59 Temple Place - Suite 330,
  what you give them.   Help stamp out software-hoarding!  */
 
 /* This file contains a data structure that describes a GCC target.
-   At present, it is incomplete, but in future it should grow to
+   At present it is incomplete, but in future it should grow to
    contain most or all target machine and target O/S specific
    information.
 
@@ -38,17 +38,20 @@ Foundation, 59 Temple Place - Suite 330,
    struct gcc_target targetm = TARGET_INITIALIZER;
 
    Doing things this way allows us to bring together everything that
-   defines a target to GCC.  By supplying a default that is
-   appropriate to most targets, we can easily add new items without
-   needing to edit dozens of target configuration files.  It should
-   also allow us to gradually reduce the amount of conditional
-   compilation that is scattered throughout GCC.  */
+   defines a GCC target.  By supplying a default that is appropriate
+   to most targets, we can easily add new items without needing to
+   edit dozens of target configuration files.  It should also allow us
+   to gradually reduce the amount of conditional compilation that is
+   scattered throughout GCC.  */
 
 struct gcc_target
 {
   /* Functions that output assembler for the target.  */
   struct asm_out
   {
+    /* Opening and closing parentheses for asm expression grouping.  */
+    const char *open_paren, *close_paren;
+
     /* Output the assembler code for entry to a function.  */
     void (* function_prologue) PARAMS ((FILE *, HOST_WIDE_INT));
 
============================================================
Index: gcc/config/1750a/1750a.h
--- gcc/config/1750a/1750a.h	2001/07/08 19:55:56	1.24
+++ gcc/config/1750a/1750a.h	2001/07/08 21:54:01
@@ -1228,12 +1228,6 @@ enum reg_class { NO_REGS, R2, R0_1, INDE
 	fprintf(FILE, "\tinit\n\t"); assemble_name(FILE, NAME); \
         fprintf(FILE,"  ;destructor\n"); } while (0)
 
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* Print operand X (an rtx) in assembler syntax to file FILE.
    CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
    For `%' followed by punctuation, CODE is the punctuation and X is null.
============================================================
Index: gcc/config/a29k/a29k.h
--- gcc/config/a29k/a29k.h	2001/07/06 18:40:01	1.21
+++ gcc/config/a29k/a29k.h	2001/07/08 21:54:08
@@ -1567,12 +1567,6 @@ extern int a29k_debug_reg_map[];
 ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),	\
   sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
 
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* Print operand X (an rtx) in assembler syntax to file FILE.
    CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
    For `%' followed by punctuation, CODE is the punctuation and X is null.  */
============================================================
Index: gcc/config/alpha/alpha.h
--- gcc/config/alpha/alpha.h	2001/07/08 19:55:56	1.123
+++ gcc/config/alpha/alpha.h	2001/07/08 21:54:16
@@ -2187,12 +2187,6 @@ literal_section ()						\
 ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),	\
   sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
 
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* Output code to add DELTA to the first argument, and then jump to FUNCTION.
    Used for C++ multiple inheritance.  */
 /* ??? This is only used with the v2 ABI, and alpha.c makes assumptions
============================================================
Index: gcc/config/arc/arc.h
--- gcc/config/arc/arc.h	2001/07/06 18:40:01	1.30
+++ gcc/config/arc/arc.h	2001/07/08 21:54:23
@@ -1297,10 +1297,6 @@ do {									\
 #define ASM_OUTPUT_BYTE(FILE, VALUE)  \
   fprintf (FILE, "%s0x%x\n", ASM_BYTE_OP, (VALUE))
 
-/* The assembler's parentheses characters.  */
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* This is how to output the definition of a user-level label named NAME,
    such as the label on a static function or variable NAME.  */
 #define ASM_OUTPUT_LABEL(FILE, NAME) \
============================================================
Index: gcc/config/arm/aof.h
--- gcc/config/arm/aof.h	2001/04/16 18:30:36	1.11
+++ gcc/config/arm/aof.h	2001/07/08 21:54:23
@@ -282,9 +282,6 @@ do {							\
 
 #define IS_ASM_LOGICAL_LINE_SEPARATOR(C) ((C) == '\n')
 
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* Output of Uninitialized Variables */
 
 #define ASM_OUTPUT_COMMON(STREAM,NAME,SIZE,ROUNDED)		\
============================================================
Index: gcc/config/arm/aout.h
--- gcc/config/arm/aout.h	2000/12/07 01:58:23	1.17
+++ gcc/config/arm/aout.h	2001/07/08 21:54:24
@@ -323,10 +323,6 @@ Boston, MA 02111-1307, USA.  */
   asm_fprintf (STREAM, "%@ - - - ident %s\n", STRING)
 #endif
      
-/* The assembler's parentheses characters.  */
-#define ASM_OPEN_PAREN 		"("
-#define ASM_CLOSE_PAREN 	")"
-
 #ifndef ASM_COMMENT_START
 #define ASM_COMMENT_START 	"@"
 #endif
============================================================
Index: gcc/config/avr/avr.h
--- gcc/config/avr/avr.h	2001/07/06 18:40:03	1.24
+++ gcc/config/avr/avr.h	2001/07/08 21:54:37
@@ -2111,16 +2111,7 @@ progmem_section (void)							      \
    If you do not define this macro, the default is that only the
    character `;' is treated as a logical line separator.  */
 
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-/* These macros are defined as C string constant, describing the
-   syntax in the assembler for grouping arithmetic expressions.  The
-   following definitions are correct for most assemblers:
-
-   #define ASM_OPEN_PAREN "("
-   #define ASM_CLOSE_PAREN ")"
-
-   These macros are provided by `real.h' for writing the definitions of
+/* These macros are provided by `real.h' for writing the definitions of
    `ASM_OUTPUT_DOUBLE' and the like:  */
 
 #define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED)			   \
============================================================
Index: gcc/config/c4x/c4x.h
--- gcc/config/c4x/c4x.h	2001/07/08 20:05:10	1.78
+++ gcc/config/c4x/c4x.h	2001/07/08 21:54:44
@@ -2253,10 +2253,6 @@ dtors_section ()							\
 
 #define ASM_OUTPUT_ASCII(FILE, PTR, LEN) c4x_output_ascii (FILE, PTR, LEN)
 
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
-
 /* Output and Generation of Labels.  */
 
 #define NO_DOT_IN_LABEL		/* Only required for TI format.  */
============================================================
Index: gcc/config/clipper/clipper.h
--- gcc/config/clipper/clipper.h	2001/07/06 18:40:03	1.18
+++ gcc/config/clipper/clipper.h	2001/07/08 21:54:48
@@ -1056,12 +1056,6 @@ do									      \
 ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),	\
   sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
 
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* Print an instruction operand X on file FILE.
    CODE is the code from the %-spec that requested printing this operand;
    if `%z3' was used to print operand 3, then CODE is 'z'.
============================================================
Index: gcc/config/convex/convex.h
--- gcc/config/convex/convex.h	2001/07/06 18:40:04	1.15
+++ gcc/config/convex/convex.h	2001/07/08 21:54:52
@@ -1417,12 +1417,6 @@ enum reg_class {
 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL)	\
   asm_declare_function_name (FILE, NAME, DECL)
 
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* Print an instruction operand X on file FILE.
    CODE is the code from the %-spec that requested printing this operand;
    if `%z3' was used to print operand 3, then CODE is 'z'. */
============================================================
Index: gcc/config/d30v/d30v.h
--- gcc/config/d30v/d30v.h	2001/07/06 18:40:04	1.24
+++ gcc/config/d30v/d30v.h	2001/07/08 21:55:15
@@ -4091,15 +4091,6 @@ do {									\
    is treated as a logical line separator.  */
 /* #define IS_ASM_LOGICAL_LINE_SEPARATOR(C) */
 
-/* These macros are defined as C string constant, describing the syntax in the
-   assembler for grouping arithmetic expressions.  The following definitions
-   are correct for most assemblers:
-
-        #define ASM_OPEN_PAREN "("
-        #define ASM_CLOSE_PAREN ")"  */
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* These macros are provided by `real.h' for writing the definitions of
    `ASM_OUTPUT_DOUBLE' and the like: */
 
============================================================
Index: gcc/config/dsp16xx/dsp16xx.h
--- gcc/config/dsp16xx/dsp16xx.h	2001/07/06 18:40:08	1.24
+++ gcc/config/dsp16xx/dsp16xx.h	2001/07/08 21:55:22
@@ -1683,10 +1683,6 @@ const_section ()                        
     (OUTPUT) = (char *) alloca (strlen (NAME) + 11);			\
     ASM_GENERATE_INTERNAL_LABEL (OUTPUT, temp, LABELNO);		\
   } while (0)
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 
 /* OUTPUT OF UNINITIALIZED VARIABLES */
 
============================================================
Index: gcc/config/elxsi/elxsi.h
--- gcc/config/elxsi/elxsi.h	2001/07/06 18:40:09	1.16
+++ gcc/config/elxsi/elxsi.h	2001/07/08 21:55:25
@@ -855,12 +855,6 @@ enum reg_class { NO_REGS, GENERAL_REGS, 
 ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),	\
   sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
 
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* Print an instruction operand X on file FILE.
    CODE is the code from the %-spec that requested printing this operand;
    if `%z3' was used to print operand 3, then CODE is 'z'.  */
============================================================
Index: gcc/config/fr30/fr30.h
--- gcc/config/fr30/fr30.h	2001/06/26 06:36:31	1.15
+++ gcc/config/fr30/fr30.h	2001/07/08 21:55:38
@@ -1504,15 +1504,6 @@ do										\
 #define ASM_OUTPUT_BYTE(STREAM, VALUE) \
   fprintf (STREAM, "%s0x%x\n", ASM_BYTE_OP, (VALUE))
 
-/* These macros are defined as C string constant, describing the syntax in the
-   assembler for grouping arithmetic expressions.  The following definitions
-   are correct for most assemblers:
-
-        #define ASM_OPEN_PAREN "("
-        #define ASM_CLOSE_PAREN ")"  */
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /*}}}*/ 
 /*{{{  Output and Generation of Labels.  */ 
 
============================================================
Index: gcc/config/h8300/h8300.h
--- gcc/config/h8300/h8300.h	2001/07/06 18:40:09	1.45
+++ gcc/config/h8300/h8300.h	2001/07/08 21:55:38
@@ -1387,12 +1387,6 @@ readonly_data ()							\
 ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),	\
   sprintf ((OUTPUT), "%s___%d", (NAME), (LABELNO)))
 
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* Print an instruction operand X on file FILE.
    Look in h8300.c for details.  */
 
============================================================
Index: gcc/config/i370/i370.h
--- gcc/config/i370/i370.h	2001/07/06 18:40:10	1.30
+++ gcc/config/i370/i370.h	2001/07/08 21:55:43
@@ -1036,12 +1036,6 @@ enum reg_class
 /* ------------------------------------------ */
 /* Control the assembler format that we output.  */
 
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* Define standard character escape sequences for non-ASCII targets
    only.  */
 
============================================================
Index: gcc/config/i386/i386.c
--- gcc/config/i386/i386.c	2001/07/07 01:07:19	1.279
+++ gcc/config/i386/i386.c	2001/07/08 21:56:04
@@ -631,6 +631,11 @@ static int ix86_comp_type_attributes PAR
 #  define TARGET_ASM_FUNCTION_PROLOGUE ix86_osf_output_function_prologue
 #endif
 
+#undef TARGET_ASM_OPEN_PAREN
+#define TARGET_ASM_OPEN_PAREN ""
+#undef TARGET_ASM_CLOSE_PAREN
+#define TARGET_ASM_CLOSE_PAREN ""
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 /* Sometimes certain combinations of command options do not make
============================================================
Index: gcc/config/i386/i386.h
--- gcc/config/i386/i386.h	2001/06/29 17:21:14	1.192
+++ gcc/config/i386/i386.h	2001/07/08 21:56:14
@@ -2922,12 +2922,6 @@ do { long l;						\
 
 #define ASM_SIMPLIFY_DWARF_ADDR(X) \
   i386_simplify_dwarf_addr(X)
-
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN ""
-#define ASM_CLOSE_PAREN ""
 
 /* Print operand X (an rtx) in assembler syntax to file FILE.
    CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
============================================================
Index: gcc/config/i860/i860.h
--- gcc/config/i860/i860.h	2001/07/06 18:40:11	1.19
+++ gcc/config/i860/i860.h	2001/07/08 21:56:20
@@ -1180,12 +1180,6 @@ do { ASM_OUTPUT_ALIGN ((FILE), 2);					\
 ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),	\
   sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
 
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* Print operand X (an rtx) in assembler syntax to file FILE.
    CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
    For `%' followed by punctuation, CODE is the punctuation and X is null.
============================================================
Index: gcc/config/i960/i960.h
--- gcc/config/i960/i960.h	2001/07/06 18:40:11	1.43
+++ gcc/config/i960/i960.h	2001/07/08 21:56:26
@@ -1508,12 +1508,6 @@ extern struct rtx_def *i960_compare_op0,
 #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO)	\
 	( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),	\
 	  sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
-
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
 
 /* Output assembler code to FILE to initialize this source file's
    basic block profiling info, if that has not already been done.  */
============================================================
Index: gcc/config/ia64/ia64.h
--- gcc/config/ia64/ia64.h	2001/07/08 19:55:57	1.73
+++ gcc/config/ia64/ia64.h	2001/07/08 21:56:36
@@ -2122,12 +2122,6 @@ do {									\
 #define ASM_OUTPUT_BYTE(STREAM, VALUE) \
   fprintf (STREAM, "%s0x%x\n", ASM_BYTE_OP, (int)(VALUE) & 0xff)
 
-/* These macros are defined as C string constant, describing the syntax in the
-   assembler for grouping arithmetic expressions.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 
 /* Output of Uninitialized Variables.  */
 
============================================================
Index: gcc/config/m32r/m32r.h
--- gcc/config/m32r/m32r.h	2001/07/06 18:40:12	1.42
+++ gcc/config/m32r/m32r.h	2001/07/08 21:56:44
@@ -1779,10 +1779,6 @@ do {							\
 #define ASM_OUTPUT_BYTE(FILE, VALUE)				\
   fprintf (FILE, "%s0x%x\n", ASM_BYTE_OP, (VALUE))
 
-/* The assembler's parentheses characters.  */
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* This is how to output the definition of a user-level label named NAME,
    such as the label on a static function or variable NAME.  */
 /* On the M32R we need to ensure the next instruction starts on a 32 bit
============================================================
Index: gcc/config/m68hc11/m68hc11.h
--- gcc/config/m68hc11/m68hc11.h	2001/07/07 16:42:17	1.17
+++ gcc/config/m68hc11/m68hc11.h	2001/07/08 21:56:50
@@ -1646,13 +1646,6 @@ do { long l;						\
 #define ASM_OUTPUT_BYTE(FILE,VALUE)			\
   fprintf ((FILE), "%s0x%x\n", ASM_BYTE_OP, (VALUE))
 
-
-/* Define the parentheses used to group arithmetic operations in assembler
- * code.  
- */
-#define ASM_OPEN_PAREN		"("
-#define ASM_CLOSE_PAREN		")"
-
 /* This is how to output the definition of a user-level label named NAME,
    such as the label on a static function or variable NAME.  */
 
============================================================
Index: gcc/config/m68k/m68k.h
--- gcc/config/m68k/m68k.h	2001/07/06 18:40:13	1.51
+++ gcc/config/m68k/m68k.h	2001/07/08 21:56:56
@@ -2027,12 +2027,6 @@ do { long l;						\
 ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),	\
   sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
 
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* Output a float value (represented as a C double) as an immediate operand.
    This macro is a 68k-specific macro.  */
 
============================================================
Index: gcc/config/m88k/m88k.h
--- gcc/config/m88k/m88k.h	2001/07/08 19:55:57	1.33
+++ gcc/config/m88k/m88k.h	2001/07/08 21:57:06
@@ -2221,11 +2221,6 @@ do {									 \
 
 /* Length in instructions of the code output by ASM_OUTPUT_REG_POP.  */
 #define REG_POP_LENGTH 2
-
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
 
 /* Macros to deal with OCS debug information */
 
============================================================
Index: gcc/config/mcore/mcore.h
--- gcc/config/mcore/mcore.h	2001/06/26 18:09:02	1.8
+++ gcc/config/mcore/mcore.h	2001/07/08 21:57:11
@@ -1394,10 +1394,6 @@ extern long mcore_current_compilation_ti
 #undef  ENCODE_SECTION_INFO
 #define ENCODE_SECTION_INFO(DECL) mcore_encode_section_info (DECL)
 
-/* The assembler's parentheses characters.  */
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* Print operand X (an rtx) in assembler syntax to file FILE.
    CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
    For `%' followed by punctuation, CODE is the punctuation and X is null.  */
============================================================
Index: gcc/config/mips/mips.h
--- gcc/config/mips/mips.h	2001/07/06 18:40:14	1.116
+++ gcc/config/mips/mips.h	2001/07/08 21:57:27
@@ -4520,12 +4520,6 @@ do									\
   }									\
 while (0)
 
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* How to start an assembler comment.
    The leading space is important (the mips native assembler requires it).  */
 #ifndef ASM_COMMENT_START
============================================================
Index: gcc/config/mn10200/mn10200.h
--- gcc/config/mn10200/mn10200.h	2001/06/26 06:36:37	1.25
+++ gcc/config/mn10200/mn10200.h	2001/07/08 21:57:31
@@ -858,12 +858,6 @@ do { char dstr[30];					\
 #define ASM_OUTPUT_BYTE(FILE, VALUE)  \
   fprintf (FILE, "\t.byte 0x%x\n", (VALUE))
 
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* This says how to output the assembler to define a global
    uninitialized but not common symbol.
    Try to use asm_output_bss to implement this macro.  */
============================================================
Index: gcc/config/mn10300/mn10300.h
--- gcc/config/mn10300/mn10300.h	2001/06/26 06:36:37	1.45
+++ gcc/config/mn10300/mn10300.h	2001/07/08 21:57:34
@@ -940,12 +940,6 @@ do { char dstr[30];					\
 #define ASM_OUTPUT_BYTE(FILE, VALUE)  \
   fprintf (FILE, "\t.byte 0x%x\n", (VALUE))
 
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* This says how to output the assembler to define a global
    uninitialized but not common symbol.
    Try to use asm_output_bss to implement this macro.  */
============================================================
Index: gcc/config/ns32k/ns32k.h
--- gcc/config/ns32k/ns32k.h	2001/07/06 18:40:14	1.23
+++ gcc/config/ns32k/ns32k.h	2001/07/08 21:57:41
@@ -1425,12 +1425,6 @@ do {									\
 ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),	\
   sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
 
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* Print an instruction operand X on file FILE.
    CODE is the code from the %-spec that requested printing this operand;
    if `%z3' was used to print operand 3, then CODE is 'z'. */
============================================================
Index: gcc/config/pa/pa.h
--- gcc/config/pa/pa.h	2001/07/06 18:40:15	1.115
+++ gcc/config/pa/pa.h	2001/07/08 21:57:47
@@ -1879,12 +1879,6 @@ while (0)
 ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 12),	\
   sprintf ((OUTPUT), "%s___%d", (NAME), (LABELNO)))
 
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* All HP assemblers use "!" to separate logical lines.  */
 #define IS_ASM_LOGICAL_LINE_SEPARATOR(C) ((C) == '!')
 
============================================================
Index: gcc/config/pdp11/pdp11.c
--- gcc/config/pdp11/pdp11.c	2001/07/07 01:07:21	1.20
+++ gcc/config/pdp11/pdp11.c	2001/07/08 21:57:51
@@ -61,6 +61,11 @@ static void pdp11_output_function_epilog
 #undef TARGET_ASM_FUNCTION_EPILOGUE
 #define TARGET_ASM_FUNCTION_EPILOGUE pdp11_output_function_epilogue
 
+#undef TARGET_ASM_OPEN_PAREN
+#define TARGET_ASM_OPEN_PAREN "["
+#undef TARGET_ASM_CLOSE_PAREN
+#define TARGET_ASM_CLOSE_PAREN "]"
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 /* Nonzero if OP is a valid second operand for an arithmetic insn.  */
@@ -1555,9 +1560,9 @@ output_addr_const_pdp11 (file, x)
       if (GET_CODE (XEXP (x, 1)) == CONST_INT
 	  && INTVAL (XEXP (x, 1)) < 0)
 	{
-	  fprintf (file, ASM_OPEN_PAREN);
+	  fprintf (file, targetm.asm_out.open_paren);
 	  output_addr_const_pdp11 (file, XEXP (x, 1));
-	  fprintf (file, ASM_CLOSE_PAREN);
+	  fprintf (file, targetm.asm_out.close_paren);
 	}
       else
 	output_addr_const_pdp11 (file, XEXP (x, 1));
============================================================
Index: gcc/config/pdp11/pdp11.h
--- gcc/config/pdp11/pdp11.h	2001/07/06 18:40:15	1.26
+++ gcc/config/pdp11/pdp11.h	2001/07/08 21:57:55
@@ -1183,12 +1183,6 @@ fprintf (FILE, "$help$: . = .+8 ; space 
 ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),	\
   sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
 
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "["
-#define ASM_CLOSE_PAREN "]"
-
 /* Print operand X (an rtx) in assembler syntax to file FILE.
    CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
    For `%' followed by punctuation, CODE is the punctuation and X is null.
@@ -1372,4 +1366,3 @@ JMP	FUNCTION	0x0058  0x0000 <- FUNCTION
 
 
 #define COMPARE_FLAG_MODE HImode
-
============================================================
Index: gcc/config/pj/pj.h
--- gcc/config/pj/pj.h	2001/06/26 06:36:39	1.10
+++ gcc/config/pj/pj.h	2001/07/08 21:58:00
@@ -1239,10 +1239,6 @@ do { char dstr[30];                     
   assemble_name ((FILE), (NAME)),                       \
   fprintf ((FILE), ",%d\n", (SIZE)))
 
-/* The assembler's parentheses characters.  */
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* We don't want the default switch handling.  */
 #undef ASM_OUTPUT_BEFORE_CASE_LABEL
 #undef ASM_OUTPUT_CASE_LABEL
============================================================
Index: gcc/config/romp/romp.h
--- gcc/config/romp/romp.h	2001/07/06 18:40:15	1.16
+++ gcc/config/romp/romp.h	2001/07/08 21:58:06
@@ -1519,12 +1519,6 @@ struct rt_cargs {int gregs, fregs; };
 ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),	\
   sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
 
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* Print operand X (an rtx) in assembler syntax to file FILE.
    CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
    For `%' followed by punctuation, CODE is the punctuation and X is null.  */
============================================================
Index: gcc/config/rs6000/rs6000.h
--- gcc/config/rs6000/rs6000.h	2001/07/06 18:40:15	1.118
+++ gcc/config/rs6000/rs6000.h	2001/07/08 21:58:15
@@ -2571,12 +2571,6 @@ do {									\
 ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),	\
   sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
 
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* Pick up the return address upon entry to a procedure. Used for
    dwarf2 unwind information.  This also enables the table driven
    mechanism.  */
============================================================
Index: gcc/config/sh/sh.h
--- gcc/config/sh/sh.h	2001/07/08 20:05:10	1.109
+++ gcc/config/sh/sh.h	2001/07/08 21:58:24
@@ -2161,10 +2161,6 @@ do { char dstr[30];					\
 ( fputs ("\t.lcomm ", (FILE)),				\
   assemble_name ((FILE), (NAME)),			\
   fprintf ((FILE), ",%d\n", (SIZE)))
-
-/* The assembler's parentheses characters.  */
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
 
 /* A C statement to be executed just prior to the output of
    assembler code for INSN, to modify the extracted operands so
============================================================
Index: gcc/config/sparc/sparc.h
--- gcc/config/sparc/sparc.h	2001/07/06 18:40:16	1.137
+++ gcc/config/sparc/sparc.h	2001/07/08 21:58:35
@@ -3221,12 +3221,6 @@ do {									\
   fprintf (FILE, "\t or\t%%g1, %%g0, %%o7\n");				\
 } while (0)
 
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 #define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \
   ((CHAR) == '#' || (CHAR) == '*' || (CHAR) == '^' || (CHAR) == '(' || (CHAR) == '_')
 
============================================================
Index: gcc/config/v850/v850.h
--- gcc/config/v850/v850.h	2001/07/08 20:05:11	1.39
+++ gcc/config/v850/v850.h	2001/07/08 21:58:40
@@ -1290,12 +1290,6 @@ do { char dstr[30];					\
 #define ASM_OUTPUT_BYTE(FILE, VALUE)  \
   fprintf (FILE, "\t.byte 0x%x\n", (VALUE))
 
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* This says how to output the assembler to define a global
    uninitialized but not common symbol.  */
 
============================================================
Index: gcc/config/vax/vax.h
--- gcc/config/vax/vax.h	2001/07/06 18:40:17	1.23
+++ gcc/config/vax/vax.h	2001/07/08 21:58:46
@@ -1228,12 +1228,6 @@ do {						\
   fprintf (FILE, "+2\n");			\
 } while (0)
 
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* Print an instruction operand X on file FILE.
    CODE is the code from the %-spec that requested printing this operand;
    if `%z3' was used to print operand 3, then CODE is 'z'.
============================================================
Index: gcc/config/we32k/we32k.h
--- gcc/config/we32k/we32k.h	2001/07/06 18:40:17	1.16
+++ gcc/config/we32k/we32k.h	2001/07/08 21:58:49
@@ -919,12 +919,6 @@ do {							\
 
 #define ASM_OUTPUT_IDENT(FILE, NAME) fprintf (FILE, "\t.ident \"%s\"\n", NAME)
 
-/* Define the parentheses used to group arithmetic operations
-   in assembler code.  */
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
 /* Print operand X (an rtx) in assembler syntax to file FILE.
    CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
    For `%' followed by punctuation, CODE is the punctuation and X is null. */
============================================================
Index: gcc/doc/md.texi
--- gcc/doc/md.texi	2001/07/03 00:46:05	1.11
+++ gcc/doc/md.texi	2001/07/08 21:59:11
@@ -2900,25 +2900,27 @@ is to be used, and simple moves to @code
 @code{EH_RETURN_HANDLER_RTX} are not sufficient.
 
 @cindex @code{prologue} instruction pattern
+@anchor{prologue instruction pattern}
 @item @samp{prologue}
 This pattern, if defined, emits RTL for entry to a function.  The function
 entry is responsible for setting up the stack frame, initializing the frame
 pointer register, saving callee saved registers, etc.
 
 Using a prologue pattern is generally preferred over defining
-@code{FUNCTION_PROLOGUE} to emit assembly code for the prologue.
+@code{TARGET_ASM_FUNCTION_PROLOGUE} to emit assembly code for the prologue.
 
 The @code{prologue} pattern is particularly useful for targets which perform
 instruction scheduling.
 
 @cindex @code{epilogue} instruction pattern
+@anchor{epilogue instruction pattern}
 @item @samp{epilogue}
 This pattern, if defined, emits RTL for exit from a function.  The function
 exit is responsible for deallocating the stack frame, restoring callee saved
 registers and emitting the return instruction.
 
 Using an epilogue pattern is generally preferred over defining
-@code{FUNCTION_EPILOGUE} to emit assembly code for the prologue.
+@code{TARGET_ASM_FUNCTION_EPILOGUE} to emit assembly code for the epilogue.
 
 The @code{epilogue} pattern is particularly useful for targets which perform
 instruction scheduling or which have delay slots for their return instruction.
============================================================
Index: gcc/doc/tm.texi
--- gcc/doc/tm.texi	2001/07/08 20:05:17	1.28
+++ gcc/doc/tm.texi	2001/07/08 21:59:40
@@ -3766,6 +3766,20 @@ or by a debugger, there is no reason why
 need agree with that used by other compilers for a machine.
 @end deftypefn
 
+@deftypefn {Target Hook} void TARGET_ASM_FUNCTION_END_PROLOGUE (FILE *@var{file})
+If defined, a function that outputs assembler code at the end of a
+prologue.  This should be used when the function prologue is being
+emitted as RTL, and you have some extra assembler that needs to be
+emitted.  @xref{prologue instruction pattern}.
+@end deftypefn
+
+@deftypefn {Target Hook} void TARGET_ASM_FUNCTION_BEGIN_EPILOGUE (FILE *@var{file})
+If defined, a function that outputs assembler code at the start of an
+epilogue.  This should be used when the function epilogue is being
+emitted as RTL, and you have some extra assembler that needs to be
+emitted.  @xref{epilogue instruction pattern}.
+@end deftypefn
+
 @deftypefn {Target Hook} void TARGET_ASM_FUNCTION_EPILOGUE (FILE *@var{file}, HOST_WIDE_INT @var{size})
 If defined, a function that outputs the assembler code for exit from a
 function.  The epilogue is responsible for restoring the saved
@@ -5967,18 +5981,13 @@ If you do not define this macro, the def
 the character @samp{;} is treated as a logical line separator.
 
 
-@findex ASM_OPEN_PAREN
-@findex ASM_CLOSE_PAREN
-@item ASM_OPEN_PAREN
-@itemx ASM_CLOSE_PAREN
-These macros are defined as C string constants, describing the syntax
-in the assembler for grouping arithmetic expressions.  The following
-definitions are correct for most assemblers:
-
-@example
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-@end example
+@findex TARGET_ASM_OPEN_PAREN
+@findex TARGET_ASM_CLOSE_PAREN
+@item TARGET_ASM_OPEN_PAREN
+@itemx TARGET_ASM_CLOSE_PAREN
+These macros expand to C string constants, describing the syntax in the
+assembler for grouping arithmetic expressions.  If not overridden, they
+default to normal parentheses, which is correct for most assemblers:
 @end table
 
   These macros are provided by @file{real.h} for writing the definitions


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]