From 0cb734178f560acc0c6f298874136a6e7f254ac9 Mon Sep 17 00:00:00 2001 From: bernds Date: Wed, 19 Sep 2007 15:03:07 +0000 Subject: [PATCH] * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128599 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 14 ++++++++++++++ gcc/config/avr/avr.h | 3 +-- gcc/config/bfin/bfin.h | 4 ++++ gcc/config/cris/cris.h | 2 +- gcc/config/pa/pa.h | 2 +- gcc/config/sh/sh.c | 5 +++-- gcc/config/stormy16/stormy16.h | 2 +- gcc/doc/tm.texi | 6 ++++-- gcc/final.c | 5 +++-- 9 files changed, 32 insertions(+), 11 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3f97acf2863..fb335784a28 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,17 @@ +2007-09-19 Bernd Schmidt + + * 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 * 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 362987a57d0..3307e970e3e 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 5a69ccc72a3..b568d9a05eb 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 3dd0dbd9511..4e1b964c906 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 4ea6a21e2e8..7680d3d840d 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 36cc9ff036f..5a802344e1a 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 decf31b2e4c..bd218a6ed04 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 c2da9f823a2..edcb6702744 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 e5e9b8d0f80..5187efa6256 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; -- 2.11.4.GIT