tm.texi (IS_ASM_LOGICAL_LINE_SEPARATOR): Document new argument.
authorBernd Schmidt <bernd.schmidt@analog.com>
Wed, 19 Sep 2007 15:03:07 +0000 (15:03 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Wed, 19 Sep 2007 15:03:07 +0000 (15:03 +0000)
* 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

gcc/ChangeLog
gcc/config/avr/avr.h
gcc/config/bfin/bfin.h
gcc/config/cris/cris.h
gcc/config/pa/pa.h
gcc/config/sh/sh.c
gcc/config/stormy16/stormy16.h
gcc/doc/tm.texi
gcc/final.c

index 3f97acf286398f84886ab587a111cb07a0fa8644..fb335784a2853274b62c0b438b309301c3227467 100644 (file)
@@ -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
index 362987a57d0ed9db8bc183f2afebd1f39d9e2438..3307e970e3e6ecbf8f5e40f9b1f2d6388d20cd04 100644 (file)
@@ -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 {                                                                      \
index 5a69ccc72a31825f2353593b6ac2064c546e7609..b568d9a05eb17684ee2746149b020bd433dd5b48 100644 (file)
@@ -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;"
 
index 3dd0dbd95119a2aeb3d0072817074dd79de3de32..4e1b964c906d834253c6e5e8d0f7e03ec41f017d 100644 (file)
@@ -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 */
 
index 4ea6a21e2e86c7ed0fb5e0d376ab05746f4d27e2..7680d3d840d6e3a27dd6a924f7b7db6faa222c57 100644 (file)
@@ -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) == '^')
index 36cc9ff036fdc1bd1060032422bb4935febb21ef..5a802344e1acf568a6fe6604702807a69654b1d4 100644 (file)
@@ -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)
index decf31b2e4c07670429cb29450d98eaddc86ad8a..bd218a6ed04699fa911a93bf7cd93949250d9e5f 100644 (file)
@@ -632,7 +632,7 @@ do {                                                        \
 \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)
index c2da9f823a21c7174a6f58d1821ab430960784dd..edcb6702744b18281a476d5eb9e0daaa25ce222d 100644 (file)
@@ -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.
index e5e9b8d0f8086e7b05c156844ec94d7baa0f4438..5187efa6256f5a96bf500d2cd8e9ccfb18eec700 100644 (file)
@@ -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;