* 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
+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>
* config.gcc (bfin*-linux-uclibc*): Add ./linux-sysroot-suffix.h
#define ASM_OUTPUT_ASCII(FILE, P, SIZE) gas_output_ascii (FILE,P,SIZE)
-#define IS_ASM_LOGICAL_LINE_SEPARATOR(C) ((C) == '\n' \
- || ((C) == '$'))
+#define IS_ASM_LOGICAL_LINE_SEPARATOR(C, STR) ((C) == '\n' || ((C) == '$'))
#define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \
do { \
LAST_DIR_NM
} DIR_ENUM_T;
+#define IS_ASM_LOGICAL_LINE_SEPARATOR(C, STR) \
+ ((C) == ';' \
+ || ((C) == '|' && (STR)[1] == '|'))
+
#define TEXT_SECTION_ASM_OP ".text;"
#define DATA_SECTION_ASM_OP ".data;"
#define OUTPUT_ADDR_CONST_EXTRA(STREAM, X, FAIL) \
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 */
#define ASM_PN_FORMAT "%s___%lu"
/* 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) \
((CHAR) == '@' || (CHAR) == '#' || (CHAR) == '*' || (CHAR) == '^')
/* Is the given character a logical line separator for the assembler? */
#ifndef IS_ASM_LOGICAL_LINE_SEPARATOR
-#define IS_ASM_LOGICAL_LINE_SEPARATOR(C) ((C) == ';')
+#define IS_ASM_LOGICAL_LINE_SEPARATOR(C, STR) ((C) == ';')
#endif
int
else if ((c == 'r' || c == 'R')
&& ! strncasecmp ("epeat", template, 5))
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 (c == ':' && maybe_label)
\f
/* 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) \
xstormy16_asm_output_aligned_common (STREAM, DECL, NAME, SIZE, ALIGNMENT, 1)
define this macro.
@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
-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
the character @samp{;} is treated as a logical line separator.
/* Is the given character a logical line separator for the assembler? */
#ifndef IS_ASM_LOGICAL_LINE_SEPARATOR
-#define IS_ASM_LOGICAL_LINE_SEPARATOR(C) ((C) == ';')
+#define IS_ASM_LOGICAL_LINE_SEPARATOR(C, STR) ((C) == ';')
#endif
#ifndef JUMP_TABLES_IN_TEXT_SECTION
template = decode_asm_operands (body, NULL, NULL, NULL, NULL, NULL);
for (; *template; template++)
- if (IS_ASM_LOGICAL_LINE_SEPARATOR (*template) || *template == '\n')
+ if (IS_ASM_LOGICAL_LINE_SEPARATOR (*template, template)
+ || *template == '\n')
count++;
return count;