+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.
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.
( (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. */
( (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
#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) \
#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) \
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
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) \
#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. */
( (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'.
#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'. */
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: */
(OUTPUT) = (char *) alloca (strlen (NAME) + 11); \
ASM_GENERATE_INTERNAL_LABEL (OUTPUT, temp, LABELNO); \
} while (0)
-
-#define ASM_OPEN_PAREN "("
-#define ASM_CLOSE_PAREN ")"
-
\f
/* OUTPUT OF UNINITIALIZED VARIABLES */
( (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'. */
#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 ")"
-
/*}}}*/ \f
/*{{{ Output and Generation of Labels. */
( (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. */
/* ------------------------------------------ */
/* 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. */
# 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;
\f
/* Sometimes certain combinations of command options do not make
#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 ""
\f
/* 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.
( (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.
#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 ")"
\f
/* Output assembler code to FILE to initialize this source file's
basic block profiling info, if that has not already been done. */
#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 ")"
-
\f
/* Output of Uninitialized Variables. */
#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
#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. */
( (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. */
/* 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 ")"
\f
/* Macros to deal with OCS debug information */
#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. */
} \
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
#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. */
#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. */
( (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'. */
( (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) == '!')
#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;
\f
/* Nonzero if OP is a valid second operand for an arithmetic insn. */
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));
( (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.
#define COMPARE_FLAG_MODE HImode
-
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
( (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. */
( (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. */
( 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 ")"
\f
/* A C statement to be executed just prior to the output of
assembler code for INSN, to modify the extracted operands so
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) == '_')
#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. */
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'.
#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. */
@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.
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
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:
&& 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));
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}
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.
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));