Commit 980d8882 by Bernd Schmidt Committed by Bernd Schmidt

tm.texi (IS_ASM_LOGICAL_LINE_SEPARATOR): Document new argument.

	* doc/tm.texi (IS_ASM_LOGICAL_LINE_SEPARATOR): Document new argument.
	* final.c (IS_ASM_LOGICAL_LINE_SEPARATOR): Provide two-argument default
	definition.
	(asm_insn_count): Pass template as second argument to it.
	* config/avr/avr.h (IS_ASM_LOGICAL_LINE_SEPARATOR): Likewise.
	* config/pa/pa.h (IS_ASM_LOGICAL_LINE_SEPARATOR): Likewise.
	* config/stormy16/stormy16.h (IS_ASM_LOGICAL_LINE_SEPARATOR): Likewise.
	* config/cris/cris.h (IS_ASM_LOGICAL_LINE_SEPARATOR): Likewise.
	* config/sh/sh.c (IS_ASM_LOGICAL_LINE_SEPARATOR): Likewise.
	(sh_insn_length_adjustment): Pass template as second argument to it.
	* config/bfin/bfin.h (IS_ASM_LOGICAL_LINE_SEPARATOR): New macro.

From-SVN: r128599
parent 40a479d4
2007-09-19 Bernd Schmidt <bernd.schmidt@analog.com>
* doc/tm.texi (IS_ASM_LOGICAL_LINE_SEPARATOR): Document new argument.
* final.c (IS_ASM_LOGICAL_LINE_SEPARATOR): Provide two-argument default
definition.
(asm_insn_count): Pass template as second argument to it.
* config/avr/avr.h (IS_ASM_LOGICAL_LINE_SEPARATOR): Likewise.
* config/pa/pa.h (IS_ASM_LOGICAL_LINE_SEPARATOR): Likewise.
* config/stormy16/stormy16.h (IS_ASM_LOGICAL_LINE_SEPARATOR): Likewise.
* config/cris/cris.h (IS_ASM_LOGICAL_LINE_SEPARATOR): Likewise.
* config/sh/sh.c (IS_ASM_LOGICAL_LINE_SEPARATOR): Likewise.
(sh_insn_length_adjustment): Pass template as second argument to it.
* config/bfin/bfin.h (IS_ASM_LOGICAL_LINE_SEPARATOR): New macro.
2007-09-19 Jie Zhang <jie.zhang@analog.com> 2007-09-19 Jie Zhang <jie.zhang@analog.com>
* config.gcc (bfin*-linux-uclibc*): Add ./linux-sysroot-suffix.h * config.gcc (bfin*-linux-uclibc*): Add ./linux-sysroot-suffix.h
...@@ -482,8 +482,7 @@ do { \ ...@@ -482,8 +482,7 @@ do { \
#define ASM_OUTPUT_ASCII(FILE, P, SIZE) gas_output_ascii (FILE,P,SIZE) #define ASM_OUTPUT_ASCII(FILE, P, SIZE) gas_output_ascii (FILE,P,SIZE)
#define IS_ASM_LOGICAL_LINE_SEPARATOR(C) ((C) == '\n' \ #define IS_ASM_LOGICAL_LINE_SEPARATOR(C, STR) ((C) == '\n' || ((C) == '$'))
|| ((C) == '$'))
#define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \ #define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \
do { \ do { \
......
...@@ -1294,6 +1294,10 @@ typedef enum directives { ...@@ -1294,6 +1294,10 @@ typedef enum directives {
LAST_DIR_NM LAST_DIR_NM
} DIR_ENUM_T; } DIR_ENUM_T;
#define IS_ASM_LOGICAL_LINE_SEPARATOR(C, STR) \
((C) == ';' \
|| ((C) == '|' && (STR)[1] == '|'))
#define TEXT_SECTION_ASM_OP ".text;" #define TEXT_SECTION_ASM_OP ".text;"
#define DATA_SECTION_ASM_OP ".data;" #define DATA_SECTION_ASM_OP ".data;"
......
...@@ -1179,7 +1179,7 @@ enum cris_pic_symbol_type ...@@ -1179,7 +1179,7 @@ enum cris_pic_symbol_type
#define OUTPUT_ADDR_CONST_EXTRA(STREAM, X, FAIL) \ #define OUTPUT_ADDR_CONST_EXTRA(STREAM, X, FAIL) \
do { if (!cris_output_addr_const_extra (STREAM, X)) goto FAIL; } while (0) do { if (!cris_output_addr_const_extra (STREAM, X)) goto FAIL; } while (0)
#define IS_ASM_LOGICAL_LINE_SEPARATOR(C) (C) == '@' #define IS_ASM_LOGICAL_LINE_SEPARATOR(C, STR) (C) == '@'
/* Node: Uninitialized Data */ /* Node: Uninitialized Data */
......
...@@ -1753,7 +1753,7 @@ do { \ ...@@ -1753,7 +1753,7 @@ do { \
#define ASM_PN_FORMAT "%s___%lu" #define ASM_PN_FORMAT "%s___%lu"
/* All HP assemblers use "!" to separate logical lines. */ /* All HP assemblers use "!" to separate logical lines. */
#define IS_ASM_LOGICAL_LINE_SEPARATOR(C) ((C) == '!') #define IS_ASM_LOGICAL_LINE_SEPARATOR(C, STR) ((C) == '!')
#define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \ #define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \
((CHAR) == '@' || (CHAR) == '#' || (CHAR) == '*' || (CHAR) == '^') ((CHAR) == '@' || (CHAR) == '#' || (CHAR) == '*' || (CHAR) == '^')
......
...@@ -8421,7 +8421,7 @@ fpscr_set_from_mem (int mode, HARD_REG_SET regs_live) ...@@ -8421,7 +8421,7 @@ fpscr_set_from_mem (int mode, HARD_REG_SET regs_live)
/* Is the given character a logical line separator for the assembler? */ /* Is the given character a logical line separator for the assembler? */
#ifndef IS_ASM_LOGICAL_LINE_SEPARATOR #ifndef IS_ASM_LOGICAL_LINE_SEPARATOR
#define IS_ASM_LOGICAL_LINE_SEPARATOR(C) ((C) == ';') #define IS_ASM_LOGICAL_LINE_SEPARATOR(C, STR) ((C) == ';')
#endif #endif
int int
...@@ -8484,7 +8484,8 @@ sh_insn_length_adjustment (rtx insn) ...@@ -8484,7 +8484,8 @@ sh_insn_length_adjustment (rtx insn)
else if ((c == 'r' || c == 'R') else if ((c == 'r' || c == 'R')
&& ! strncasecmp ("epeat", template, 5)) && ! strncasecmp ("epeat", template, 5))
ppi_adjust = 4; ppi_adjust = 4;
while (c && c != '\n' && ! IS_ASM_LOGICAL_LINE_SEPARATOR (c)) while (c && c != '\n'
&& ! IS_ASM_LOGICAL_LINE_SEPARATOR (c, template))
{ {
/* If this is a label, it is obviously not a ppi insn. */ /* If this is a label, it is obviously not a ppi insn. */
if (c == ':' && maybe_label) if (c == ':' && maybe_label)
......
...@@ -632,7 +632,7 @@ do { \ ...@@ -632,7 +632,7 @@ do { \
/* Output of Data. */ /* Output of Data. */
#define IS_ASM_LOGICAL_LINE_SEPARATOR(C) ((C) == '|') #define IS_ASM_LOGICAL_LINE_SEPARATOR(C, STR) ((C) == '|')
#define ASM_OUTPUT_ALIGNED_DECL_COMMON(STREAM, DECL, NAME, SIZE, ALIGNMENT) \ #define ASM_OUTPUT_ALIGNED_DECL_COMMON(STREAM, DECL, NAME, SIZE, ALIGNMENT) \
xstormy16_asm_output_aligned_common (STREAM, DECL, NAME, SIZE, ALIGNMENT, 1) xstormy16_asm_output_aligned_common (STREAM, DECL, NAME, SIZE, ALIGNMENT, 1)
......
...@@ -7047,9 +7047,11 @@ If no constant-pool epilogue is required, the usual case, you need not ...@@ -7047,9 +7047,11 @@ If no constant-pool epilogue is required, the usual case, you need not
define this macro. define this macro.
@end defmac @end defmac
@defmac IS_ASM_LOGICAL_LINE_SEPARATOR (@var{C}) @defmac IS_ASM_LOGICAL_LINE_SEPARATOR (@var{C}, @var{STR})
Define this macro as a C expression which is nonzero if @var{C} is Define this macro as a C expression which is nonzero if @var{C} is
used as a logical line separator by the assembler. used as a logical line separator by the assembler. @var{STR} points
to the position in the string where @var{C} was found; this can be used if
a line separator uses multiple characters.
If you do not define this macro, the default is that only If you do not define this macro, the default is that only
the character @samp{;} is treated as a logical line separator. the character @samp{;} is treated as a logical line separator.
......
...@@ -109,7 +109,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -109,7 +109,7 @@ along with GCC; see the file COPYING3. If not see
/* Is the given character a logical line separator for the assembler? */ /* Is the given character a logical line separator for the assembler? */
#ifndef IS_ASM_LOGICAL_LINE_SEPARATOR #ifndef IS_ASM_LOGICAL_LINE_SEPARATOR
#define IS_ASM_LOGICAL_LINE_SEPARATOR(C) ((C) == ';') #define IS_ASM_LOGICAL_LINE_SEPARATOR(C, STR) ((C) == ';')
#endif #endif
#ifndef JUMP_TABLES_IN_TEXT_SECTION #ifndef JUMP_TABLES_IN_TEXT_SECTION
...@@ -1344,7 +1344,8 @@ asm_insn_count (rtx body) ...@@ -1344,7 +1344,8 @@ asm_insn_count (rtx body)
template = decode_asm_operands (body, NULL, NULL, NULL, NULL, NULL); template = decode_asm_operands (body, NULL, NULL, NULL, NULL, NULL);
for (; *template; template++) for (; *template; template++)
if (IS_ASM_LOGICAL_LINE_SEPARATOR (*template) || *template == '\n') if (IS_ASM_LOGICAL_LINE_SEPARATOR (*template, template)
|| *template == '\n')
count++; count++;
return count; return count;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment