aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog14
-rw-r--r--gcc/config/avr/avr.h3
-rw-r--r--gcc/config/bfin/bfin.h4
-rw-r--r--gcc/config/cris/cris.h2
-rw-r--r--gcc/config/pa/pa.h2
-rw-r--r--gcc/config/sh/sh.c5
-rw-r--r--gcc/config/stormy16/stormy16.h2
-rw-r--r--gcc/doc/tm.texi6
-rw-r--r--gcc/final.c5
9 files changed, 32 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3f97acf..fb33578 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,17 @@
+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
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index 362987a..3307e97 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -482,8 +482,7 @@ do { \
#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 { \
diff --git a/gcc/config/bfin/bfin.h b/gcc/config/bfin/bfin.h
index 5a69ccc..b568d9a 100644
--- a/gcc/config/bfin/bfin.h
+++ b/gcc/config/bfin/bfin.h
@@ -1294,6 +1294,10 @@ typedef enum directives {
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;"
diff --git a/gcc/config/cris/cris.h b/gcc/config/cris/cris.h
index 3dd0dbd..4e1b964 100644
--- a/gcc/config/cris/cris.h
+++ b/gcc/config/cris/cris.h
@@ -1179,7 +1179,7 @@ enum cris_pic_symbol_type
#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 */
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index 4ea6a21..7680d3d 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -1753,7 +1753,7 @@ do { \
#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) == '^')
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 36cc9ff..5a80234 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -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? */
#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
@@ -8484,7 +8484,8 @@ sh_insn_length_adjustment (rtx insn)
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)
diff --git a/gcc/config/stormy16/stormy16.h b/gcc/config/stormy16/stormy16.h
index decf31b..bd218a6 100644
--- a/gcc/config/stormy16/stormy16.h
+++ b/gcc/config/stormy16/stormy16.h
@@ -632,7 +632,7 @@ do { \
/* 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)
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index c2da9f8..edcb670 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -7047,9 +7047,11 @@ If no constant-pool epilogue is required, the usual case, you need not
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.
diff --git a/gcc/final.c b/gcc/final.c
index e5e9b8d..5187efa 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -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? */
#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
@@ -1344,7 +1344,8 @@ asm_insn_count (rtx body)
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;