summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog56
-rw-r--r--gcc/config/1750a/1750a.h6
-rw-r--r--gcc/config/a29k/a29k.h6
-rw-r--r--gcc/config/alpha/alpha.h6
-rw-r--r--gcc/config/arc/arc.h4
-rw-r--r--gcc/config/arm/aof.h3
-rw-r--r--gcc/config/arm/aout.h4
-rw-r--r--gcc/config/avr/avr.h11
-rw-r--r--gcc/config/c4x/c4x.h4
-rw-r--r--gcc/config/clipper/clipper.h6
-rw-r--r--gcc/config/convex/convex.h6
-rw-r--r--gcc/config/d30v/d30v.h9
-rw-r--r--gcc/config/dsp16xx/dsp16xx.h4
-rw-r--r--gcc/config/elxsi/elxsi.h6
-rw-r--r--gcc/config/fr30/fr30.h9
-rw-r--r--gcc/config/h8300/h8300.h6
-rw-r--r--gcc/config/i370/i370.h6
-rw-r--r--gcc/config/i386/i386.c5
-rw-r--r--gcc/config/i386/i386.h6
-rw-r--r--gcc/config/i860/i860.h6
-rw-r--r--gcc/config/i960/i960.h6
-rw-r--r--gcc/config/ia64/ia64.h6
-rw-r--r--gcc/config/m32r/m32r.h4
-rw-r--r--gcc/config/m68hc11/m68hc11.h7
-rw-r--r--gcc/config/m68k/m68k.h6
-rw-r--r--gcc/config/m88k/m88k.h5
-rw-r--r--gcc/config/mcore/mcore.h4
-rw-r--r--gcc/config/mips/mips.h6
-rw-r--r--gcc/config/mn10200/mn10200.h6
-rw-r--r--gcc/config/mn10300/mn10300.h6
-rw-r--r--gcc/config/ns32k/ns32k.h6
-rw-r--r--gcc/config/pa/pa.h6
-rw-r--r--gcc/config/pdp11/pdp11.c9
-rw-r--r--gcc/config/pdp11/pdp11.h7
-rw-r--r--gcc/config/pj/pj.h4
-rw-r--r--gcc/config/romp/romp.h6
-rw-r--r--gcc/config/rs6000/rs6000.h6
-rw-r--r--gcc/config/sh/sh.h4
-rw-r--r--gcc/config/sparc/sparc.h6
-rw-r--r--gcc/config/v850/v850.h6
-rw-r--r--gcc/config/vax/vax.h6
-rw-r--r--gcc/config/we32k/we32k.h6
-rw-r--r--gcc/doc/md.texi6
-rw-r--r--gcc/doc/tm.texi34
-rw-r--r--gcc/final.c4
-rw-r--r--gcc/target-def.h6
-rw-r--r--gcc/target.h15
47 files changed, 109 insertions, 253 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c84a3b254ff..bd392efa639 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,59 @@
+2001-07-09 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * 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.
+
2001-07-09 Joseph S. Myers <jsm28@cam.ac.uk>
* doc/c-tree.texi: Document representation of attributes.
diff --git a/gcc/config/1750a/1750a.h b/gcc/config/1750a/1750a.h
index abaa7439713..72ee543a11c 100644
--- a/gcc/config/1750a/1750a.h
+++ b/gcc/config/1750a/1750a.h
@@ -1228,12 +1228,6 @@ enum reg_class { NO_REGS, R2, R0_1, INDEX_REGS, BASE_REGS, ALL_REGS, LIM_REG_CLA
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.
diff --git a/gcc/config/a29k/a29k.h b/gcc/config/a29k/a29k.h
index f6bfe382778..96d19ac6df4 100644
--- a/gcc/config/a29k/a29k.h
+++ b/gcc/config/a29k/a29k.h
@@ -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. */
diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h
index 832c8951c40..b04be3586b3 100644
--- a/gcc/config/alpha/alpha.h
+++ b/gcc/config/alpha/alpha.h
@@ -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
diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h
index 9695d8ce664..9a7b270b5c2 100644
--- a/gcc/config/arc/arc.h
+++ b/gcc/config/arc/arc.h
@@ -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) \
diff --git a/gcc/config/arm/aof.h b/gcc/config/arm/aof.h
index f10b7c45cb2..3b0baf57ac5 100644
--- a/gcc/config/arm/aof.h
+++ b/gcc/config/arm/aof.h
@@ -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) \
diff --git a/gcc/config/arm/aout.h b/gcc/config/arm/aout.h
index 2a151c9214b..1acb8b480d0 100644
--- a/gcc/config/arm/aout.h
+++ b/gcc/config/arm/aout.h
@@ -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
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index 8d6764e4e05..6ebb93ce70f 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -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) \
diff --git a/gcc/config/c4x/c4x.h b/gcc/config/c4x/c4x.h
index b161d6d7627..c515337aa3d 100644
--- a/gcc/config/c4x/c4x.h
+++ b/gcc/config/c4x/c4x.h
@@ -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. */
diff --git a/gcc/config/clipper/clipper.h b/gcc/config/clipper/clipper.h
index 4b439732944..ca67ee8009a 100644
--- a/gcc/config/clipper/clipper.h
+++ b/gcc/config/clipper/clipper.h
@@ -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'.
diff --git a/gcc/config/convex/convex.h b/gcc/config/convex/convex.h
index 10f8cb95794..88bb2b115ca 100644
--- a/gcc/config/convex/convex.h
+++ b/gcc/config/convex/convex.h
@@ -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'. */
diff --git a/gcc/config/d30v/d30v.h b/gcc/config/d30v/d30v.h
index 3565cc71a4c..6126feafb66 100644
--- a/gcc/config/d30v/d30v.h
+++ b/gcc/config/d30v/d30v.h
@@ -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: */
diff --git a/gcc/config/dsp16xx/dsp16xx.h b/gcc/config/dsp16xx/dsp16xx.h
index 15bd722fd4c..1910e1db6ae 100644
--- a/gcc/config/dsp16xx/dsp16xx.h
+++ b/gcc/config/dsp16xx/dsp16xx.h
@@ -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 */
diff --git a/gcc/config/elxsi/elxsi.h b/gcc/config/elxsi/elxsi.h
index fb2885d1165..dacefd4c1d1 100644
--- a/gcc/config/elxsi/elxsi.h
+++ b/gcc/config/elxsi/elxsi.h
@@ -855,12 +855,6 @@ enum reg_class { NO_REGS, GENERAL_REGS, ALL_REGS, LIM_REG_CLASSES };
( (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'. */
diff --git a/gcc/config/fr30/fr30.h b/gcc/config/fr30/fr30.h
index 57d3f967a86..833a2cf08d7 100644
--- a/gcc/config/fr30/fr30.h
+++ b/gcc/config/fr30/fr30.h
@@ -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. */
diff --git a/gcc/config/h8300/h8300.h b/gcc/config/h8300/h8300.h
index 1df7c08a65e..ec3a1cbed93 100644
--- a/gcc/config/h8300/h8300.h
+++ b/gcc/config/h8300/h8300.h
@@ -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. */
diff --git a/gcc/config/i370/i370.h b/gcc/config/i370/i370.h
index fa187f33afd..ca106331c69 100644
--- a/gcc/config/i370/i370.h
+++ b/gcc/config/i370/i370.h
@@ -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. */
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 69aab1a18fe..8f9f7be584c 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -631,6 +631,11 @@ static int ix86_comp_type_attributes PARAMS ((tree, tree));
# 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
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index bb77de3fdb5..ee5b615e59e 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -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.
diff --git a/gcc/config/i860/i860.h b/gcc/config/i860/i860.h
index 1f681314374..60485f807c2 100644
--- a/gcc/config/i860/i860.h
+++ b/gcc/config/i860/i860.h
@@ -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.
diff --git a/gcc/config/i960/i960.h b/gcc/config/i960/i960.h
index 3a11007a04e..17808bf250f 100644
--- a/gcc/config/i960/i960.h
+++ b/gcc/config/i960/i960.h
@@ -1508,12 +1508,6 @@ extern struct rtx_def *i960_compare_op0, *i960_compare_op1;
#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. */
diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h
index 0944daa548a..e22aff3006a 100644
--- a/gcc/config/ia64/ia64.h
+++ b/gcc/config/ia64/ia64.h
@@ -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. */
diff --git a/gcc/config/m32r/m32r.h b/gcc/config/m32r/m32r.h
index 69efdb7d50c..e72f61f9ad9 100644
--- a/gcc/config/m32r/m32r.h
+++ b/gcc/config/m32r/m32r.h
@@ -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
diff --git a/gcc/config/m68hc11/m68hc11.h b/gcc/config/m68hc11/m68hc11.h
index 140b1e0d60a..3ce23b8ce56 100644
--- a/gcc/config/m68hc11/m68hc11.h
+++ b/gcc/config/m68hc11/m68hc11.h
@@ -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. */
diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h
index 68017af17de..b56b7a4ba17 100644
--- a/gcc/config/m68k/m68k.h
+++ b/gcc/config/m68k/m68k.h
@@ -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. */
diff --git a/gcc/config/m88k/m88k.h b/gcc/config/m88k/m88k.h
index 9520aa8bd8e..2be34328f14 100644
--- a/gcc/config/m88k/m88k.h
+++ b/gcc/config/m88k/m88k.h
@@ -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 */
diff --git a/gcc/config/mcore/mcore.h b/gcc/config/mcore/mcore.h
index 3440dbd6b99..fecb9d8b4cf 100644
--- a/gcc/config/mcore/mcore.h
+++ b/gcc/config/mcore/mcore.h
@@ -1394,10 +1394,6 @@ extern long mcore_current_compilation_timestamp;
#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. */
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 134b546b7ce..b4a912942e5 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -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
diff --git a/gcc/config/mn10200/mn10200.h b/gcc/config/mn10200/mn10200.h
index 20639b8ea24..997f1aabcc1 100644
--- a/gcc/config/mn10200/mn10200.h
+++ b/gcc/config/mn10200/mn10200.h
@@ -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. */
diff --git a/gcc/config/mn10300/mn10300.h b/gcc/config/mn10300/mn10300.h
index 55a427ad929..143f3bf771c 100644
--- a/gcc/config/mn10300/mn10300.h
+++ b/gcc/config/mn10300/mn10300.h
@@ -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. */
diff --git a/gcc/config/ns32k/ns32k.h b/gcc/config/ns32k/ns32k.h
index 778644c5a41..58937d1fd91 100644
--- a/gcc/config/ns32k/ns32k.h
+++ b/gcc/config/ns32k/ns32k.h
@@ -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'. */
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index 380b6d2b7d4..28b496d885a 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -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) == '!')
diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c
index 97d23fead5d..9bf51ceda0b 100644
--- a/gcc/config/pdp11/pdp11.c
+++ b/gcc/config/pdp11/pdp11.c
@@ -61,6 +61,11 @@ static void pdp11_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
#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));
diff --git a/gcc/config/pdp11/pdp11.h b/gcc/config/pdp11/pdp11.h
index f931b45da49..75e0cd6bb1c 100644
--- a/gcc/config/pdp11/pdp11.h
+++ b/gcc/config/pdp11/pdp11.h
@@ -1183,12 +1183,6 @@ fprintf (FILE, "$help$: . = .+8 ; space for tmp moves!\n") \
( (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
-
diff --git a/gcc/config/pj/pj.h b/gcc/config/pj/pj.h
index 8bd28f1c575..83c9b3e66d5 100644
--- a/gcc/config/pj/pj.h
+++ b/gcc/config/pj/pj.h
@@ -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
diff --git a/gcc/config/romp/romp.h b/gcc/config/romp/romp.h
index 3c82c6545ef..4f920cc574d 100644
--- a/gcc/config/romp/romp.h
+++ b/gcc/config/romp/romp.h
@@ -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. */
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index eca6be15fc7..6464aa2c36e 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -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. */
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h
index 3f6d3e63265..f72c07c9fbe 100644
--- a/gcc/config/sh/sh.h
+++ b/gcc/config/sh/sh.h
@@ -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
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index e413964e6a2..b107236706b 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -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) == '_')
diff --git a/gcc/config/v850/v850.h b/gcc/config/v850/v850.h
index f2a7d7c98cc..604a7686ce3 100644
--- a/gcc/config/v850/v850.h
+++ b/gcc/config/v850/v850.h
@@ -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. */
diff --git a/gcc/config/vax/vax.h b/gcc/config/vax/vax.h
index fb461a90c42..286822eb06b 100644
--- a/gcc/config/vax/vax.h
+++ b/gcc/config/vax/vax.h
@@ -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'.
diff --git a/gcc/config/we32k/we32k.h b/gcc/config/we32k/we32k.h
index 8a94790ccca..66f01f9b9b7 100644
--- a/gcc/config/we32k/we32k.h
+++ b/gcc/config/we32k/we32k.h
@@ -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. */
diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi
index 06c8e3fd738..f1073aa5db3 100644
--- a/gcc/doc/md.texi
+++ b/gcc/doc/md.texi
@@ -2900,25 +2900,27 @@ is to be used, and simple moves to @code{EH_RETURN_STACKADJ_RTX} and
@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.
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 37b84d77c5e..1677ffd7b98 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -3766,6 +3766,20 @@ or by a debugger, there is no reason why the stack layout used by GCC
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
@@ -5965,22 +5979,14 @@ used as a logical line separator by the assembler.
If you do not define this macro, the default is that only
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
@end table
+@deftypevar {Target Hook} {const char *} TARGET_ASM_OPEN_PAREN
+@deftypevar {Target Hook} {const char *} TARGET_ASM_CLOSE_PAREN
+These target hooks are 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.
+
These macros are provided by @file{real.h} for writing the definitions
of @code{ASM_OUTPUT_DOUBLE} and the like:
diff --git a/gcc/final.c b/gcc/final.c
index 35fda053ae1..4efbfcbef23 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -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));
diff --git a/gcc/target-def.h b/gcc/target-def.h
index dbcaecf59cd..ca24c5f8753 100644
--- a/gcc/target-def.h
+++ b/gcc/target-def.h
@@ -26,12 +26,16 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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}
diff --git a/gcc/target.h b/gcc/target.h
index 20714c9e0d8..126147d46b1 100644
--- a/gcc/target.h
+++ b/gcc/target.h
@@ -20,7 +20,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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, Boston, MA 02111-1307, USA.
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));