diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c index 4b243ce..771a603 100644 --- a/gas/config/tc-aarch64.c +++ b/gas/config/tc-aarch64.c @@ -455,7 +455,7 @@ static literal_pool *list_of_pools = NULL; /* This array holds the chars that always start a comment. If the pre-processor is disabled, these aren't very useful. */ -const char comment_chars[] = ""; +char comment_chars[] = ""; /* This array holds the chars that only start a comment at the beginning of a line. If the line seems to have the form '# 123 filename' @@ -464,9 +464,9 @@ const char comment_chars[] = ""; first line of the input file. This is because the compiler outputs #NO_APP at the beginning of its output. */ /* Also note that comments like this one will always work. */ -const char line_comment_chars[] = "#"; +char line_comment_chars[] = "#"; -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Chars that can be used to separate mant from exp in floating point numbers. */ diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c index d020896..9db3435 100644 --- a/gas/config/tc-alpha.c +++ b/gas/config/tc-alpha.c @@ -227,14 +227,14 @@ struct alpha_macro targets. */ /* Characters which always start a comment. */ -const char comment_chars[] = "#"; +char comment_chars[] = "#"; /* Characters which start a comment at the beginning of a line. */ -const char line_comment_chars[] = "#"; +char line_comment_chars[] = "#"; /* Characters which may be used to separate multiple commands on a single line. */ -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Characters which are used to indicate an exponent in a floating point number. */ diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c index 8d2da96..626f67d 100644 --- a/gas/config/tc-arc.c +++ b/gas/config/tc-arc.c @@ -62,7 +62,7 @@ const struct syntax_classes /* This array holds the chars that always start a comment. If the pre-processor is disabled, these aren't very useful. */ -const char comment_chars[] = "#;"; +char comment_chars[] = "#;"; /* This array holds the chars that only start a comment at the beginning of a line. If the line seems to have the form '# 123 filename' @@ -72,9 +72,9 @@ const char comment_chars[] = "#;"; #NO_APP at the beginning of its output. */ /* Also note that comments started like this one will always work if '/' isn't otherwise defined. */ -const char line_comment_chars[] = "#"; +char line_comment_chars[] = "#"; -const char line_separator_chars[] = ""; +char line_separator_chars[] = ""; /* Chars that can be used to separate mant from exp in floating point nums. */ const char EXP_CHARS[] = "eE"; diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index e596217..25954a2 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -137,6 +137,8 @@ static int fix_v4bx = FALSE; /* Warn on using deprecated features. */ static int warn_on_deprecated = TRUE; +/* Understand CodeComposer Studio assembly syntax. */ +int codecomposer_syntax = FALSE; /* Variables that we set while parsing command-line options. Once all options have been read we re-process these values to set the real @@ -795,6 +797,15 @@ typedef struct literal_pool /* Pointer to a linked list of literal pools. */ literal_pool * list_of_pools = NULL; +typedef enum asmfunc_states +{ + OUTSIDE_ASMFUNC, + WAITING_ASMFUNC_NAME, + WAITING_ENDASMFUNC +} asmfunc_states; + +static asmfunc_states asmfunc_state = OUTSIDE_ASMFUNC; + #ifdef OBJ_ELF # define now_it seg_info (now_seg)->tc_segment_info_data.current_it #else @@ -853,7 +864,7 @@ static void it_fsm_post_encode (void); /* This array holds the chars that always start a comment. If the pre-processor is disabled, these aren't very useful. */ -const char comment_chars[] = "@"; +char comment_chars[] = "@"; /* This array holds the chars that only start a comment at the beginning of a line. If the line seems to have the form '# 123 filename' @@ -862,9 +873,9 @@ const char comment_chars[] = "@"; first line of the input file. This is because the compiler outputs #NO_APP at the beginning of its output. */ /* Also note that comments like this one will always work. */ -const char line_comment_chars[] = "#"; +char line_comment_chars[] = "#"; -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Chars that can be used to separate mant from exp in floating point numbers. */ @@ -3012,6 +3023,107 @@ s_even (int ignore ATTRIBUTE_UNUSED) demand_empty_rest_of_line (); } +/* Directives: CodeComposer Studio. */ + +/* .ref (for CodeComposer Studio syntax only). */ +static void +s_ccs_ref (int unused ATTRIBUTE_UNUSED) +{ + if (codecomposer_syntax) + ignore_rest_of_line (); + else + as_bad (_(".ref pseudo-op only available with -mccs flag.")); +} + +/* If name is not NULL, then it is used for marking the beginning of a + function, wherease if it is NULL then it means the function end. */ +static void +asmfunc_debug (const char * name) +{ + static const char * last_name = NULL; + + if (name != NULL) + { + gas_assert (last_name == NULL); + last_name = name; + + if (debug_type == DEBUG_STABS) + stabs_generate_asm_func (name, name); + + } + else + { + gas_assert (last_name != NULL); + + if (debug_type == DEBUG_STABS) + stabs_generate_asm_endfunc (last_name, last_name); + + last_name = NULL; + } +} + +static void +s_ccs_asmfunc (int unused ATTRIBUTE_UNUSED) +{ + if (codecomposer_syntax) + { + switch (asmfunc_state) + { + case OUTSIDE_ASMFUNC: + asmfunc_state = WAITING_ASMFUNC_NAME; + break; + + case WAITING_ASMFUNC_NAME: + as_bad (_(".asmfunc repeated.")); + break; + + case WAITING_ENDASMFUNC: + as_bad (_(".asmfunc without function.")); + break; + } + demand_empty_rest_of_line (); + } + else + as_bad (_(".asmfunc pseudo-op only available with -mccs flag.")); +} + +static void +s_ccs_endasmfunc (int unused ATTRIBUTE_UNUSED) +{ + if (codecomposer_syntax) + { + switch (asmfunc_state) + { + case OUTSIDE_ASMFUNC: + as_bad (_(".endasmfunc without a .asmfunc.")); + break; + + case WAITING_ASMFUNC_NAME: + as_bad (_(".endasmfunc without function.")); + break; + + case WAITING_ENDASMFUNC: + asmfunc_state = OUTSIDE_ASMFUNC; + asmfunc_debug (NULL); + break; + } + demand_empty_rest_of_line (); + } + else + as_bad (_(".endasmfunc pseudo-op only available with -mccs flag.")); +} + +static void +s_ccs_def (int name) +{ + if (codecomposer_syntax) + { + s_globl (name); + } + else + as_bad (_(".def pseudo-op only available with -mccs flag.")); +} + /* Directives: Literal pools. */ static literal_pool * @@ -3128,6 +3240,32 @@ add_to_lit_pool (void) return SUCCESS; } +bfd_boolean +tc_start_label_without_colon (char unused1 ATTRIBUTE_UNUSED, const char * rest) +{ + bfd_boolean ret = TRUE; + + if (codecomposer_syntax && asmfunc_state == WAITING_ASMFUNC_NAME) + { + const char *label = rest; + + while (!is_end_of_line[(int) label[-1]]) + --label; + + if (*label == '.') + { + as_bad (_("Invalid label '%s'"), label); + ret = FALSE; + } + + asmfunc_debug (label); + + asmfunc_state = WAITING_ENDASMFUNC; + } + + return ret; +} + /* Can't use symbol_new here, so have to create a symbol and then at a later date assign it a value. Thats what these functions do. */ @@ -4477,6 +4615,13 @@ const pseudo_typeS md_pseudo_table[] = #ifdef TE_PE {"secrel32", pe_directive_secrel, 0}, #endif + + /* These are for compatibility with CodeComposer Studio. */ + {"ref", s_ccs_ref, 0}, + {"def", s_ccs_def, 0}, + {"asmfunc", s_ccs_asmfunc, 0}, + {"endasmfunc", s_ccs_endasmfunc, 0}, + { 0, 0, 0 } }; @@ -24506,6 +24651,15 @@ arm_parse_it_mode (char * str) return ret; } +static bfd_boolean +arm_ccs_mode (char * unused ATTRIBUTE_UNUSED) +{ + codecomposer_syntax = TRUE; + comment_chars[0] = ';'; + line_separator_chars[0] = 0; + return TRUE; +} + struct arm_long_option_table arm_long_opts[] = { {"mcpu=", N_("\t assemble for CPU "), @@ -24522,6 +24676,8 @@ struct arm_long_option_table arm_long_opts[] = #endif {"mimplicit-it=", N_("\t controls implicit insertion of IT instructions"), arm_parse_it_mode, NULL}, + {"mccs", N_("\t\t\t TI CodeComposer Studio syntax compatibility mode"), + arm_ccs_mode, NULL}, {NULL, NULL, 0, NULL} }; diff --git a/gas/config/tc-arm.h b/gas/config/tc-arm.h index 3a0fab0..8163a36 100644 --- a/gas/config/tc-arm.h +++ b/gas/config/tc-arm.h @@ -82,6 +82,10 @@ struct fix; /* We support double slash line-comments for compatibility with the ARM AArch64 Assembler. */ #define DOUBLESLASH_LINE_COMMENTS +/* We conditionally support labels without colon. */ +#define LABELS_WITHOUT_COLONS codecomposer_syntax +extern int codecomposer_syntax; + #define tc_symbol_chars arm_symbol_chars extern const char arm_symbol_chars[]; @@ -101,6 +105,9 @@ extern int arm_optimize_expr (expressionS *, operatorT, expressionS *); #define md_start_line_hook() arm_start_line_hook () +#define TC_START_LABEL_WITHOUT_COLON(c, l) tc_start_label_without_colon (c, l) +extern bfd_boolean tc_start_label_without_colon (char c, const char * l); + #define tc_frob_label(S) arm_frob_label (S) /* We also need to mark assembler created symbols: */ diff --git a/gas/config/tc-avr.c b/gas/config/tc-avr.c index 332aa2d..67e547c 100644 --- a/gas/config/tc-avr.c +++ b/gas/config/tc-avr.c @@ -46,9 +46,9 @@ struct avr_opcodes_s avr_opcodes[] = {NULL, NULL, NULL, 0, 0, 0} }; -const char comment_chars[] = ";"; -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = "$"; +char comment_chars[] = ";"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = "$"; const char *md_shortopts = "m:"; struct mcu_type_s diff --git a/gas/config/tc-bfin.c b/gas/config/tc-bfin.c index 99e9b1e..8f2dd82 100644 --- a/gas/config/tc-bfin.c +++ b/gas/config/tc-bfin.c @@ -136,9 +136,9 @@ const pseudo_typeS md_pseudo_table[] = { }; /* Characters that are used to denote comments and line separators. */ -const char comment_chars[] = "#"; -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = ";"; +char comment_chars[] = "#"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = ";"; /* Characters that can be used to separate the mantissa from the exponent in floating point numbers. */ diff --git a/gas/config/tc-cr16.c b/gas/config/tc-cr16.c index 8d6e780..182c401 100644 --- a/gas/config/tc-cr16.c +++ b/gas/config/tc-cr16.c @@ -86,13 +86,13 @@ int cur_arg_num; /* Generic assembler global variables which must be defined by all targets. */ /* Characters which always start a comment. */ -const char comment_chars[] = "#"; +char comment_chars[] = "#"; /* Characters which start a comment at the beginning of a line. */ -const char line_comment_chars[] = "#"; +char line_comment_chars[] = "#"; /* This array holds machine specific line separator characters. */ -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Chars that can be used to separate mant from exp in floating point nums. */ const char EXP_CHARS[] = "eE"; diff --git a/gas/config/tc-cris.c b/gas/config/tc-cris.c index 657c7ed..4e4d7b8 100644 --- a/gas/config/tc-cris.c +++ b/gas/config/tc-cris.c @@ -221,8 +221,8 @@ const char cris_comment_chars[] = ";"; first line of the input file. This is because the compiler outputs #NO_APP at the beginning of its output. */ /* Also note that slash-star will always start a comment. */ -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = "@"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = "@"; /* Now all floating point support is shut off. See md_atof. */ const char EXP_CHARS[] = ""; diff --git a/gas/config/tc-crx.c b/gas/config/tc-crx.c index 3b06a78..486de12 100644 --- a/gas/config/tc-crx.c +++ b/gas/config/tc-crx.c @@ -89,13 +89,13 @@ int cur_arg_num; /* Generic assembler global variables which must be defined by all targets. */ /* Characters which always start a comment. */ -const char comment_chars[] = "#"; +char comment_chars[] = "#"; /* Characters which start a comment at the beginning of a line. */ -const char line_comment_chars[] = "#"; +char line_comment_chars[] = "#"; /* This array holds machine specific line separator characters. */ -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Chars that can be used to separate mant from exp in floating point nums. */ const char EXP_CHARS[] = "eE"; diff --git a/gas/config/tc-d10v.c b/gas/config/tc-d10v.c index 983c2f8..0b39290 100644 --- a/gas/config/tc-d10v.c +++ b/gas/config/tc-d10v.c @@ -27,9 +27,9 @@ #include "elf/ppc.h" #include "dwarf2dbg.h" -const char comment_chars[] = ";"; -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = ""; +char comment_chars[] = ";"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = ""; const char *md_shortopts = "O"; const char EXP_CHARS[] = "eE"; const char FLT_CHARS[] = "dD"; diff --git a/gas/config/tc-d30v.c b/gas/config/tc-d30v.c index 9a3477b..d9953bb 100644 --- a/gas/config/tc-d30v.c +++ b/gas/config/tc-d30v.c @@ -25,9 +25,9 @@ #include "opcode/d30v.h" #include "dwarf2dbg.h" -const char comment_chars[] = ";"; -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = ""; +char comment_chars[] = ";"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = ""; const char *md_shortopts = "OnNcC"; const char EXP_CHARS[] = "eE"; const char FLT_CHARS[] = "dD"; diff --git a/gas/config/tc-dlx.c b/gas/config/tc-dlx.c index a629533..d3cb15b 100644 --- a/gas/config/tc-dlx.c +++ b/gas/config/tc-dlx.c @@ -61,7 +61,7 @@ the_insn; /* This array holds the chars that always start a comment. If the pre-processor is disabled, these aren't very useful. */ -const char comment_chars[] = ";"; +char comment_chars[] = ";"; /* This array holds the chars that only start a comment at the beginning of a line. If the line seems to have the form '# 123 filename' @@ -70,11 +70,11 @@ const char comment_chars[] = ";"; first line of the input file. This is because the compiler outputs #NO_APP at the beginning of its output. */ /* Also note that comments like this one will always work. */ -const char line_comment_chars[] = "#"; +char line_comment_chars[] = "#"; /* We needed an unused char for line separation to work around the lack of macros, using sed and such. */ -const char line_separator_chars[] = "@"; +char line_separator_chars[] = "@"; /* Chars that can be used to separate mant from exp in floating point nums. */ const char EXP_CHARS[] = "eE"; diff --git a/gas/config/tc-epiphany.c b/gas/config/tc-epiphany.c index d472968..edcebfc 100644 --- a/gas/config/tc-epiphany.c +++ b/gas/config/tc-epiphany.c @@ -52,9 +52,9 @@ typedef struct } epiphany_insn; -const char comment_chars[] = ";"; -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = "`"; +char comment_chars[] = ";"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = "`"; const char EXP_CHARS[] = "eE"; const char FLT_CHARS[] = "fFdD"; diff --git a/gas/config/tc-fr30.c b/gas/config/tc-fr30.c index 8e01fb2..b0eb6cc 100644 --- a/gas/config/tc-fr30.c +++ b/gas/config/tc-fr30.c @@ -49,9 +49,9 @@ typedef struct } fr30_insn; -const char comment_chars[] = ";"; -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = "|"; +char comment_chars[] = ";"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = "|"; const char EXP_CHARS[] = "eE"; const char FLT_CHARS[] = "dD"; diff --git a/gas/config/tc-frv.c b/gas/config/tc-frv.c index 9cdbe26..0e55cf5 100644 --- a/gas/config/tc-frv.c +++ b/gas/config/tc-frv.c @@ -114,11 +114,11 @@ static struct vliw_chain *current_vliw_chain; static struct vliw_chain *previous_vliw_chain; static struct vliw_insn_list *current_vliw_insn; -const char comment_chars[] = ";"; -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = "!"; -const char EXP_CHARS[] = "eE"; -const char FLT_CHARS[] = "dD"; +char comment_chars[] = ";"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = "!"; +const char EXP_CHARS[] = "eE"; +const char FLT_CHARS[] = "dD"; static FRV_VLIW vliw; diff --git a/gas/config/tc-h8300.c b/gas/config/tc-h8300.c index 032831b..2f80398 100644 --- a/gas/config/tc-h8300.c +++ b/gas/config/tc-h8300.c @@ -33,9 +33,9 @@ #include "elf/h8.h" #endif -const char comment_chars[] = ";"; -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = ""; +char comment_chars[] = ";"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = ""; static void sbranch (int); static void h8300hmode (int); diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c index 6e2debe..14cb7c0 100644 --- a/gas/config/tc-hppa.c +++ b/gas/config/tc-hppa.c @@ -568,14 +568,14 @@ const char hppa_symbol_chars[] = "*?=<>"; #NO_APP at the beginning of its output. Also note that C style comments will always work. */ -const char line_comment_chars[] = "#"; +char line_comment_chars[] = "#"; /* This array holds the chars that always start a comment. If the pre-processor is disabled, these aren't very useful. */ -const char comment_chars[] = ";"; +char comment_chars[] = ";"; /* This array holds the characters which act as line separators. */ -const char line_separator_chars[] = "!"; +char line_separator_chars[] = "!"; /* Chars that can be used to separate mant from exp in floating point nums. */ const char EXP_CHARS[] = "eE"; diff --git a/gas/config/tc-i370.c b/gas/config/tc-i370.c index bf362a3..0b706c2 100644 --- a/gas/config/tc-i370.c +++ b/gas/config/tc-i370.c @@ -56,15 +56,15 @@ static const char i370_eabi_comment_chars[] = "#"; const char *i370_comment_chars = i370_eabi_comment_chars; #else -const char comment_chars[] = "#"; +char comment_chars[] = "#"; #endif /* Characters which start a comment at the beginning of a line. */ -const char line_comment_chars[] = "#*"; +char line_comment_chars[] = "#*"; /* Characters which may be used to separate multiple commands on a single line. */ -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Characters which are used to indicate an exponent in a floating point number. */ diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index e6313cf..453a522 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -433,9 +433,9 @@ const char *i386_comment_chars = "#"; #NO_APP at the beginning of its output. Also note that comments started like this one will always work if '/' isn't otherwise defined. */ -const char line_comment_chars[] = "#/"; +char line_comment_chars[] = "#/"; -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Chars that can be used to separate mant from exp in floating point nums. */ diff --git a/gas/config/tc-i860.c b/gas/config/tc-i860.c index 32aed0f..941dc68 100644 --- a/gas/config/tc-i860.c +++ b/gas/config/tc-i860.c @@ -32,12 +32,12 @@ static struct hash_control *op_hash = NULL; /* These characters always start a comment. */ -const char comment_chars[] = "#!/"; +char comment_chars[] = "#!/"; /* These characters start a comment at the beginning of a line. */ -const char line_comment_chars[] = "#/"; +char line_comment_chars[] = "#/"; -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Characters that can be used to separate the mantissa from the exponent in floating point numbers. */ diff --git a/gas/config/tc-i960.c b/gas/config/tc-i960.c index 44664df..62d0efe 100644 --- a/gas/config/tc-i960.c +++ b/gas/config/tc-i960.c @@ -131,7 +131,7 @@ static char instrument_branches; /* True if -b switch seen. */ /* Characters that always start a comment. If the pre-processor is disabled, these aren't very useful. */ -const char comment_chars[] = "#"; +char comment_chars[] = "#"; /* Characters that only start a comment at the beginning of a line. If the line seems to have the form '# 123 filename' @@ -143,8 +143,8 @@ const char comment_chars[] = "#"; /* Also note that comments started like this one will always work. */ -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = ";"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = ";"; /* Chars that can be used to separate mant from exp in floating point nums. */ const char EXP_CHARS[] = "eE"; diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c index b8ffe4e..6ed6e67 100644 --- a/gas/config/tc-ia64.c +++ b/gas/config/tc-ia64.c @@ -195,14 +195,14 @@ static struct hash_control *secalias_name_hash; const char ia64_symbol_chars[] = "@?"; /* Characters which always start a comment. */ -const char comment_chars[] = ""; +char comment_chars[] = ""; /* Characters which start a comment at the beginning of a line. */ -const char line_comment_chars[] = "#"; +char line_comment_chars[] = "#"; /* Characters which may be used to separate multiple commands on a single line. */ -const char line_separator_chars[] = ";{}"; +char line_separator_chars[] = ";{}"; /* Characters which are used to indicate an exponent in a floating point number. */ diff --git a/gas/config/tc-ip2k.c b/gas/config/tc-ip2k.c index 3836cc9..69b6124 100644 --- a/gas/config/tc-ip2k.c +++ b/gas/config/tc-ip2k.c @@ -51,11 +51,11 @@ typedef struct } ip2k_insn; -const char comment_chars[] = ";"; -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = ""; -const char EXP_CHARS[] = "eE"; -const char FLT_CHARS[] = "dD"; +char comment_chars[] = ";"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = ""; +const char EXP_CHARS[] = "eE"; +const char FLT_CHARS[] = "dD"; /* Flag to detect when switching to code section where insn alignment is implied. */ diff --git a/gas/config/tc-iq2000.c b/gas/config/tc-iq2000.c index e8ed21d..6db4a86 100644 --- a/gas/config/tc-iq2000.c +++ b/gas/config/tc-iq2000.c @@ -54,11 +54,11 @@ typedef struct } iq2000_insn; -const char comment_chars[] = "#"; -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = ";"; -const char EXP_CHARS[] = "eE"; -const char FLT_CHARS[] = "dD"; +char comment_chars[] = "#"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = ";"; +const char EXP_CHARS[] = "eE"; +const char FLT_CHARS[] = "dD"; /* Default machine. */ #define DEFAULT_MACHINE bfd_mach_iq2000 diff --git a/gas/config/tc-lm32.c b/gas/config/tc-lm32.c index 88ffabb..f58b1ef 100644 --- a/gas/config/tc-lm32.c +++ b/gas/config/tc-lm32.c @@ -65,11 +65,11 @@ static unsigned config = 0U; /* Target specific assembler tokens / delimiters. */ -const char comment_chars[] = "#"; -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = ";"; -const char EXP_CHARS[] = "eE"; -const char FLT_CHARS[] = "dD"; +char comment_chars[] = "#"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = ";"; +const char EXP_CHARS[] = "eE"; +const char FLT_CHARS[] = "dD"; /* Target specific assembly directives. */ diff --git a/gas/config/tc-m32c.c b/gas/config/tc-m32c.c index 9c523e2..64cf849 100644 --- a/gas/config/tc-m32c.c +++ b/gas/config/tc-m32c.c @@ -55,11 +55,11 @@ m32c_insn; #define rl_for(_insn) (CGEN_ATTR_CGEN_INSN_RL_TYPE_VALUE (&((_insn).insn->base->attrs))) #define relaxable(_insn) (CGEN_ATTR_CGEN_INSN_RELAXABLE_VALUE (&((_insn).insn->base->attrs))) -const char comment_chars[] = ";"; -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = "|"; -const char EXP_CHARS[] = "eE"; -const char FLT_CHARS[] = "dD"; +char comment_chars[] = ";"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = "|"; +const char EXP_CHARS[] = "eE"; +const char FLT_CHARS[] = "dD"; #define M32C_SHORTOPTS "" const char * md_shortopts = M32C_SHORTOPTS; diff --git a/gas/config/tc-m32r.c b/gas/config/tc-m32r.c index c8a6584..2f3f526 100644 --- a/gas/config/tc-m32r.c +++ b/gas/config/tc-m32r.c @@ -132,11 +132,11 @@ static segT sbss_section; static asection scom_section; static asymbol scom_symbol; -const char comment_chars[] = ";"; -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = "!"; -const char EXP_CHARS[] = "eE"; -const char FLT_CHARS[] = "dD"; +char comment_chars[] = ";"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = "!"; +const char EXP_CHARS[] = "eE"; +const char FLT_CHARS[] = "dD"; /* Relocations against symbols are done in two parts, with a HI relocation and a LO relocation. Each relocation diff --git a/gas/config/tc-m68hc11.c b/gas/config/tc-m68hc11.c index 3189121..55235bf 100644 --- a/gas/config/tc-m68hc11.c +++ b/gas/config/tc-m68hc11.c @@ -29,9 +29,9 @@ #include "dwarf2dbg.h" #include "elf/m68hc11.h" -const char comment_chars[] = ";!"; -const char line_comment_chars[] = "#*"; -const char line_separator_chars[] = ""; +char comment_chars[] = ";!"; +char line_comment_chars[] = "#*"; +char line_separator_chars[] = ""; const char EXP_CHARS[] = "eE"; const char FLT_CHARS[] = "dD"; diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c index d16b5d9..668208e 100644 --- a/gas/config/tc-m68k.c +++ b/gas/config/tc-m68k.c @@ -59,9 +59,9 @@ const char *m68k_comment_chars = "|"; first line of the input file. This is because the compiler outputs #NO_APP at the beginning of its output. */ /* Also note that comments like this one will always work. */ -const char line_comment_chars[] = "#*"; +char line_comment_chars[] = "#*"; -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Chars that can be used to separate mant from exp in floating point nums. */ const char EXP_CHARS[] = "eE"; diff --git a/gas/config/tc-mcore.c b/gas/config/tc-mcore.c index 04cf336..2d6a7c3 100644 --- a/gas/config/tc-mcore.c +++ b/gas/config/tc-mcore.c @@ -42,9 +42,9 @@ #define INST_BYTE0(x) (target_big_endian ? (((x) >> 8) & 0xFF) : ((x) & 0xFF)) #define INST_BYTE1(x) (target_big_endian ? ((x) & 0xFF) : (((x) >> 8) & 0xFF)) -const char comment_chars[] = "#/"; -const char line_separator_chars[] = ";"; -const char line_comment_chars[] = "#/"; +char comment_chars[] = "#/"; +char line_separator_chars[] = ";"; +char line_comment_chars[] = "#/"; static int do_jsri2bsr = 0; /* Change here from 1 by Cruess 19 August 97. */ static int sifilter_mode = 0; diff --git a/gas/config/tc-mep.c b/gas/config/tc-mep.c index 377e4c3..3629e6a 100644 --- a/gas/config/tc-mep.c +++ b/gas/config/tc-mep.c @@ -65,11 +65,11 @@ static int mep_cop = EF_MEP_COP_NONE; static mep_insn saved_insns[MAX_SAVED_FIXUP_CHAINS]; static int num_insns_saved = 0; -const char comment_chars[] = "#"; -const char line_comment_chars[] = ";#"; -const char line_separator_chars[] = ";"; -const char EXP_CHARS[] = "eE"; -const char FLT_CHARS[] = "dD"; +char comment_chars[] = "#"; +char line_comment_chars[] = ";#"; +char line_separator_chars[] = ";"; +const char EXP_CHARS[] = "eE"; +const char FLT_CHARS[] = "dD"; static void mep_switch_to_vliw_mode (int); static void mep_switch_to_core_mode (int); diff --git a/gas/config/tc-metag.c b/gas/config/tc-metag.c index f42d2f1..13b4770 100644 --- a/gas/config/tc-metag.c +++ b/gas/config/tc-metag.c @@ -30,9 +30,9 @@ #include "opcode/metag.h" -const char comment_chars[] = "!"; -const char line_comment_chars[] = "!#"; -const char line_separator_chars[] = ";"; +char comment_chars[] = "!"; +char line_comment_chars[] = "!#"; +char line_separator_chars[] = ";"; const char FLT_CHARS[] = "rRsSfFdDxXpP"; const char EXP_CHARS[] = "eE"; const char metag_symbol_chars[] = "["; diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c index 872737b..6cb744d 100644 --- a/gas/config/tc-microblaze.c +++ b/gas/config/tc-microblaze.c @@ -52,13 +52,13 @@ static bfd_boolean check_spl_reg (unsigned *); /* This array holds the chars that always start a comment. If the pre-processor is disabled, these aren't very useful. */ -const char comment_chars[] = "#"; +char comment_chars[] = "#"; -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* This array holds the chars that only start a comment at the beginning of a line. */ -const char line_comment_chars[] = "#"; +char line_comment_chars[] = "#"; const int md_reloc_size = 8; /* Size of relocation record. */ diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 34f1bf0..afb22e8 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -603,7 +603,7 @@ static struct hash_control *micromips_op_hash = NULL; /* This array holds the chars that always start a comment. If the pre-processor is disabled, these aren't very useful */ -const char comment_chars[] = "#"; +char comment_chars[] = "#"; /* This array holds the chars that only start a comment at the beginning of a line. If the line seems to have the form '# 123 filename' @@ -612,10 +612,10 @@ const char comment_chars[] = "#"; first line of the input file. This is because the compiler outputs #NO_APP at the beginning of its output. */ /* Also note that C style comments are always supported. */ -const char line_comment_chars[] = "#"; +char line_comment_chars[] = "#"; /* This array holds machine specific line separator characters. */ -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Chars that can be used to separate mant from exp in floating point nums */ const char EXP_CHARS[] = "eE"; diff --git a/gas/config/tc-mmix.c b/gas/config/tc-mmix.c index 7052b11..68856d9 100644 --- a/gas/config/tc-mmix.c +++ b/gas/config/tc-mmix.c @@ -391,9 +391,9 @@ const char mmix_comment_chars[] = "%!"; be stripped. */ const char mmix_symbol_chars[] = ":@"; -const char line_comment_chars[] = "*#"; +char line_comment_chars[] = "*#"; -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; const char mmix_exp_chars[] = "eE"; diff --git a/gas/config/tc-mn10200.c b/gas/config/tc-mn10200.c index e9c70f2..5268493 100644 --- a/gas/config/tc-mn10200.c +++ b/gas/config/tc-mn10200.c @@ -34,14 +34,14 @@ struct reg_name targets. */ /* Characters which always start a comment. */ -const char comment_chars[] = "#"; +char comment_chars[] = "#"; /* Characters which start a comment at the beginning of a line. */ -const char line_comment_chars[] = ";#"; +char line_comment_chars[] = ";#"; /* Characters which may be used to separate multiple commands on a single line. */ -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Characters which are used to indicate an exponent in a floating point number. */ diff --git a/gas/config/tc-mn10300.c b/gas/config/tc-mn10300.c index 4029c64..62446f6 100644 --- a/gas/config/tc-mn10300.c +++ b/gas/config/tc-mn10300.c @@ -37,14 +37,14 @@ struct reg_name targets. */ /* Characters which always start a comment. */ -const char comment_chars[] = "#"; +char comment_chars[] = "#"; /* Characters which start a comment at the beginning of a line. */ -const char line_comment_chars[] = ";#"; +char line_comment_chars[] = ";#"; /* Characters which may be used to separate multiple commands on a single line. */ -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Characters which are used to indicate an exponent in a floating point number. */ diff --git a/gas/config/tc-moxie.c b/gas/config/tc-moxie.c index fa8ace5..98b2baf 100644 --- a/gas/config/tc-moxie.c +++ b/gas/config/tc-moxie.c @@ -28,9 +28,9 @@ extern const moxie_opc_info_t moxie_opc_info[128]; -const char comment_chars[] = "#"; -const char line_separator_chars[] = ";"; -const char line_comment_chars[] = "#"; +char comment_chars[] = "#"; +char line_separator_chars[] = ";"; +char line_comment_chars[] = "#"; static int pending_reloc; static struct hash_control *opcode_hash_control; diff --git a/gas/config/tc-msp430.c b/gas/config/tc-msp430.c index a9aa0ea..264cba4 100644 --- a/gas/config/tc-msp430.c +++ b/gas/config/tc-msp430.c @@ -188,9 +188,9 @@ static struct hcodes_s msp430x_hcodes[] = {0,0,0,0,0,0,0,0} }; -const char comment_chars[] = ";"; -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = "{"; +char comment_chars[] = ";"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = "{"; const char EXP_CHARS[] = "eE"; const char FLT_CHARS[] = "dD"; diff --git a/gas/config/tc-mt.c b/gas/config/tc-mt.c index 6e54782..df0970e 100644 --- a/gas/config/tc-mt.c +++ b/gas/config/tc-mt.c @@ -52,11 +52,11 @@ typedef struct mt_insn; -const char comment_chars[] = ";"; -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = ""; -const char EXP_CHARS[] = "eE"; -const char FLT_CHARS[] = "dD"; +char comment_chars[] = ";"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = ""; +const char EXP_CHARS[] = "eE"; +const char FLT_CHARS[] = "dD"; /* The target specific pseudo-ops which we support. */ const pseudo_typeS md_pseudo_table[] = diff --git a/gas/config/tc-nds32.c b/gas/config/tc-nds32.c index 91f8855..853942a 100644 --- a/gas/config/tc-nds32.c +++ b/gas/config/tc-nds32.c @@ -39,11 +39,11 @@ /* GAS definitions. */ /* Characters which start a comment. */ -const char comment_chars[] = "!"; +char comment_chars[] = "!"; /* Characters which start a comment when they appear at the start of a line. */ -const char line_comment_chars[] = "#!"; +char line_comment_chars[] = "#!"; /* Characters which separate lines (null and newline are by default). */ -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Characters which may be used as the exponent character in a floating point number. */ const char EXP_CHARS[] = "eE"; diff --git a/gas/config/tc-nios2.c b/gas/config/tc-nios2.c index 3d52048..c9491c6 100644 --- a/gas/config/tc-nios2.c +++ b/gas/config/tc-nios2.c @@ -40,7 +40,7 @@ extern int target_big_endian; /* This array holds the chars that always start a comment. If the pre-processor is disabled, these aren't very useful. */ -const char comment_chars[] = "#"; +char comment_chars[] = "#"; /* This array holds the chars that only start a comment at the beginning of a line. If the line seems to have the form '# 123 filename' @@ -49,10 +49,10 @@ const char comment_chars[] = "#"; first line of the input file. This is because the compiler outputs #NO_APP at the beginning of its output. */ /* Also note that C style comments are always supported. */ -const char line_comment_chars[] = "#"; +char line_comment_chars[] = "#"; /* This array holds machine specific line separator characters. */ -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Chars that can be used to separate mant from exp in floating point nums. */ const char EXP_CHARS[] = "eE"; diff --git a/gas/config/tc-ns32k.c b/gas/config/tc-ns32k.c index 709a9bc..8db58ab 100644 --- a/gas/config/tc-ns32k.c +++ b/gas/config/tc-ns32k.c @@ -58,9 +58,9 @@ #define LINE_COMMENT_CHARS "#" #endif -const char comment_chars[] = "#"; -const char line_comment_chars[] = LINE_COMMENT_CHARS; -const char line_separator_chars[] = ";"; +char comment_chars[] = "#"; +char line_comment_chars[] = LINE_COMMENT_CHARS; +char line_separator_chars[] = ";"; static int default_disp_size = 4; /* Displacement size for external refs. */ #if !defined(ABSOLUTE_PREFIX) && !defined(IMMEDIATE_PREFIX) diff --git a/gas/config/tc-openrisc.c b/gas/config/tc-openrisc.c index 981cdfb..22a082c 100644 --- a/gas/config/tc-openrisc.c +++ b/gas/config/tc-openrisc.c @@ -51,11 +51,11 @@ struct openrisc_insn }; -const char comment_chars[] = "#"; -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = ";"; -const char EXP_CHARS[] = "eE"; -const char FLT_CHARS[] = "dD"; +char comment_chars[] = "#"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = ";"; +const char EXP_CHARS[] = "eE"; +const char FLT_CHARS[] = "dD"; #define OPENRISC_SHORTOPTS "m:" diff --git a/gas/config/tc-or32.c b/gas/config/tc-or32.c index 23e44af..2b5d205 100644 --- a/gas/config/tc-or32.c +++ b/gas/config/tc-or32.c @@ -74,7 +74,7 @@ int md_long_jump_size = 4; /* This array holds the chars that always start a comment. If the pre-processor is disabled, these aren't very useful. */ -const char comment_chars[] = "#"; +char comment_chars[] = "#"; /* This array holds the chars that only start a comment at the beginning of a line. If the line seems to have the form '# 123 filename' @@ -83,11 +83,11 @@ const char comment_chars[] = "#"; first line of the input file. This is because the compiler outputs #NO_APP at the beginning of its output. */ /* Also note that comments like this one will always work. */ -const char line_comment_chars[] = "#"; +char line_comment_chars[] = "#"; /* We needed an unused char for line separation to work around the lack of macros, using sed and such. */ -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Chars that can be used to separate mant from exp in floating point nums. */ const char EXP_CHARS[] = "eE"; diff --git a/gas/config/tc-pdp11.c b/gas/config/tc-pdp11.c index 98e241f..c4780ee 100644 --- a/gas/config/tc-pdp11.c +++ b/gas/config/tc-pdp11.c @@ -58,12 +58,12 @@ int asm_option[ASM_OPT_NUM]; /* These chars start a comment anywhere in a source file (except inside another comment. */ -const char comment_chars[] = "#/"; +char comment_chars[] = "#/"; /* These chars only start a comment at the beginning of a line. */ -const char line_comment_chars[] = "#/"; +char line_comment_chars[] = "#/"; -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Chars that can be used to separate mant from exp in floating point nums. */ const char EXP_CHARS[] = "eE"; diff --git a/gas/config/tc-pj.c b/gas/config/tc-pj.c index 9dbe810..5d8c36a 100644 --- a/gas/config/tc-pj.c +++ b/gas/config/tc-pj.c @@ -27,9 +27,9 @@ extern const pj_opc_info_t pj_opc_info[512]; -const char comment_chars[] = "!/"; -const char line_separator_chars[] = ";"; -const char line_comment_chars[] = "/!#"; +char comment_chars[] = "!/"; +char line_separator_chars[] = ";"; +char line_comment_chars[] = "/!#"; static int pending_reloc; static struct hash_control *opcode_hash_control; diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index 7c99e43..fdf2f43 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -169,15 +169,15 @@ const char *ppc_comment_chars = ppc_solaris_comment_chars; const char *ppc_comment_chars = ppc_eabi_comment_chars; #endif #else -const char comment_chars[] = "#"; +char comment_chars[] = "#"; #endif /* Characters which start a comment at the beginning of a line. */ -const char line_comment_chars[] = "#"; +char line_comment_chars[] = "#"; /* Characters which may be used to separate multiple commands on a single line. */ -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Characters which are used to indicate an exponent in a floating point number. */ diff --git a/gas/config/tc-rl78.c b/gas/config/tc-rl78.c index 2f59af8..a6055fe 100644 --- a/gas/config/tc-rl78.c +++ b/gas/config/tc-rl78.c @@ -32,14 +32,14 @@ #include "sb.h" #include "macro.h" -const char comment_chars[] = ";"; +char comment_chars[] = ";"; /* Note that input_file.c hand checks for '#' at the beginning of the first line of the input file. This is because the compiler outputs #NO_APP at the beginning of its output. */ -const char line_comment_chars[] = "#"; +char line_comment_chars[] = "#"; /* Use something that isn't going to be needed by any expressions or other syntax. */ -const char line_separator_chars[] = "@"; +char line_separator_chars[] = "@"; const char EXP_CHARS[] = "eE"; const char FLT_CHARS[] = "dD"; diff --git a/gas/config/tc-rx.c b/gas/config/tc-rx.c index 0e4b7a8..740c87f 100644 --- a/gas/config/tc-rx.c +++ b/gas/config/tc-rx.c @@ -34,12 +34,12 @@ #define RX_OPCODE_BIG_ENDIAN 0 -const char comment_chars[] = ";"; +char comment_chars[] = ";"; /* Note that input_file.c hand checks for '#' at the beginning of the first line of the input file. This is because the compiler outputs #NO_APP at the beginning of its output. */ -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = "!"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = "!"; const char EXP_CHARS[] = "eE"; const char FLT_CHARS[] = "dD"; diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c index c504f18..5eae671 100644 --- a/gas/config/tc-s390.c +++ b/gas/config/tc-s390.c @@ -61,14 +61,14 @@ static bfd_boolean warn_areg_zero = FALSE; /* Generic assembler global variables which must be defined by all targets. */ -const char comment_chars[] = "#"; +char comment_chars[] = "#"; /* Characters which start a comment at the beginning of a line. */ -const char line_comment_chars[] = "#"; +char line_comment_chars[] = "#"; /* Characters which may be used to separate multiple commands on a single line. */ -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Characters which are used to indicate an exponent in a floating point number. */ diff --git a/gas/config/tc-score.c b/gas/config/tc-score.c index 822b9cf..99483de 100644 --- a/gas/config/tc-score.c +++ b/gas/config/tc-score.c @@ -182,9 +182,9 @@ static void s3_do_lw_pic (char *); /* This array holds the chars that always start a comment. If the pre-processor is disabled, these aren't very useful. */ -const char comment_chars[] = "#"; -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = ";"; +char comment_chars[] = "#"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = ";"; /* Chars that can be used to separate mant from exp in floating point numbers. */ const char EXP_CHARS[] = "eE"; const char FLT_CHARS[] = "rRsSfFdDxXeEpP"; diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c index 6b7bd5a..d5f383d 100644 --- a/gas/config/tc-sh.c +++ b/gas/config/tc-sh.c @@ -44,9 +44,9 @@ typedef struct } sh_operand_info; -const char comment_chars[] = "!"; -const char line_separator_chars[] = ";"; -const char line_comment_chars[] = "!#"; +char comment_chars[] = "!"; +char line_separator_chars[] = ";"; +char line_comment_chars[] = "!#"; static void s_uses (int); static void s_uacons (int); diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c index bcb8464..9e652b3 100644 --- a/gas/config/tc-sparc.c +++ b/gas/config/tc-sparc.c @@ -168,7 +168,7 @@ const pseudo_typeS md_pseudo_table[] = /* This array holds the chars that always start a comment. If the pre-processor is disabled, these aren't very useful. */ -const char comment_chars[] = "!"; /* JF removed '|' from +char comment_chars[] = "!"; /* JF removed '|' from comment_chars. */ /* This array holds the chars that only start a comment at the beginning of @@ -179,9 +179,9 @@ const char comment_chars[] = "!"; /* JF removed '|' from #NO_APP at the beginning of its output. */ /* Also note that comments started like this one will always work if '/' isn't otherwise defined. */ -const char line_comment_chars[] = "#"; +char line_comment_chars[] = "#"; -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Chars that can be used to separate mant from exp in floating point nums. */ diff --git a/gas/config/tc-spu.c b/gas/config/tc-spu.c index d80c621..79959dd 100644 --- a/gas/config/tc-spu.c +++ b/gas/config/tc-spu.c @@ -64,13 +64,13 @@ int md_seg_align = 7; /* These chars start a comment anywhere in a source file (except inside another comment */ -const char comment_chars[] = "#"; +char comment_chars[] = "#"; /* These chars only start a comment at the beginning of a line. */ -const char line_comment_chars[] = "#"; +char line_comment_chars[] = "#"; /* gods own line continuation char */ -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Chars that can be used to separate mant from exp in floating point nums */ const char EXP_CHARS[] = "eE"; diff --git a/gas/config/tc-tic30.c b/gas/config/tc-tic30.c index 5474df5..d64d818 100644 --- a/gas/config/tc-tic30.c +++ b/gas/config/tc-tic30.c @@ -37,9 +37,9 @@ static char *ordinal_names[] = N_("first"), N_("second"), N_("third"), N_("fourth"), N_("fifth") }; -const char comment_chars[] = ";"; -const char line_comment_chars[] = "*"; -const char line_separator_chars[] = ""; +char comment_chars[] = ";"; +char line_comment_chars[] = "*"; +char line_separator_chars[] = ""; const char *md_shortopts = ""; struct option md_longopts[] = diff --git a/gas/config/tc-tic4x.c b/gas/config/tc-tic4x.c index 0dcf5bd..974699e 100644 --- a/gas/config/tc-tic4x.c +++ b/gas/config/tc-tic4x.c @@ -190,9 +190,9 @@ int md_long_jump_size = 4; /* This array holds the chars that always start a comment. If the pre-processor is disabled, these aren't very useful. */ #ifdef TIC4X_ALT_SYNTAX -const char comment_chars[] = ";!"; +char comment_chars[] = ";!"; #else -const char comment_chars[] = ";"; +char comment_chars[] = ";"; #endif /* This array holds the chars that only start a comment at the beginning of @@ -202,11 +202,11 @@ const char comment_chars[] = ";"; first line of the input file. This is because the compiler outputs #NO_APP at the beginning of its output. Also note that comments like this one will always work. */ -const char line_comment_chars[] = "#*"; +char line_comment_chars[] = "#*"; /* We needed an unused char for line separation to work around the lack of macros, using sed and such. */ -const char line_separator_chars[] = "&"; +char line_separator_chars[] = "&"; /* Chars that can be used to separate mant from exp in floating point nums. */ const char EXP_CHARS[] = "eE"; diff --git a/gas/config/tc-tic54x.c b/gas/config/tc-tic54x.c index d4bd75f..1618afa 100644 --- a/gas/config/tc-tic54x.c +++ b/gas/config/tc-tic54x.c @@ -127,9 +127,9 @@ enum address_mode static segT stag_saved_seg; static subsegT stag_saved_subseg; -const char comment_chars[] = ";"; -const char line_comment_chars[] = ";*#"; /* At column zero only. */ -const char line_separator_chars[] = ""; /* Not permitted. */ +char comment_chars[] = ";"; +char line_comment_chars[] = ";*#"; /* At column zero only. */ +char line_separator_chars[] = ""; /* Not permitted. */ int emitting_long = 0; diff --git a/gas/config/tc-tic6x.c b/gas/config/tc-tic6x.c index 81f33f4..b43dde6 100644 --- a/gas/config/tc-tic6x.c +++ b/gas/config/tc-tic6x.c @@ -41,9 +41,9 @@ static segT sbss_section; static asection scom_section; static asymbol scom_symbol; -const char comment_chars[] = ";"; -const char line_comment_chars[] = "#*;"; -const char line_separator_chars[] = "@"; +char comment_chars[] = ";"; +char line_comment_chars[] = "#*;"; +char line_separator_chars[] = "@"; const char EXP_CHARS[] = "eE"; const char FLT_CHARS[] = "dDfF"; diff --git a/gas/config/tc-tilegx.c b/gas/config/tc-tilegx.c index 19a04c2..d4a5d72 100644 --- a/gas/config/tc-tilegx.c +++ b/gas/config/tc-tilegx.c @@ -48,14 +48,14 @@ int tilegx_cie_data_alignment; /* Characters which always start a comment. */ -const char comment_chars[] = "#"; +char comment_chars[] = "#"; /* Characters which start a comment at the beginning of a line. */ -const char line_comment_chars[] = "#"; +char line_comment_chars[] = "#"; /* Characters which may be used to separate multiple commands on a single line. */ -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Characters which are used to indicate an exponent in a floating point number. */ diff --git a/gas/config/tc-tilepro.c b/gas/config/tc-tilepro.c index 733a628..4bc135e 100644 --- a/gas/config/tc-tilepro.c +++ b/gas/config/tc-tilepro.c @@ -45,14 +45,14 @@ targets. */ /* Characters which always start a comment. */ -const char comment_chars[] = "#"; +char comment_chars[] = "#"; /* Characters which start a comment at the beginning of a line. */ -const char line_comment_chars[] = "#"; +char line_comment_chars[] = "#"; /* Characters which may be used to separate multiple commands on a single line. */ -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Characters which are used to indicate an exponent in a floating point number. */ diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c index a23387c..00319e3 100644 --- a/gas/config/tc-v850.c +++ b/gas/config/tc-v850.c @@ -58,14 +58,14 @@ struct reg_name targets. */ /* Characters which always start a comment. */ -const char comment_chars[] = "#"; +char comment_chars[] = "#"; /* Characters which start a comment at the beginning of a line. */ -const char line_comment_chars[] = ";#"; +char line_comment_chars[] = ";#"; /* Characters which may be used to separate multiple commands on a single line. */ -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Characters which are used to indicate an exponent in a floating point number. */ diff --git a/gas/config/tc-vax.c b/gas/config/tc-vax.c index 185a9a2..90b811c 100644 --- a/gas/config/tc-vax.c +++ b/gas/config/tc-vax.c @@ -33,13 +33,13 @@ /* These chars start a comment anywhere in a source file (except inside another comment */ -const char comment_chars[] = "#"; +char comment_chars[] = "#"; /* These chars only start a comment at the beginning of a line. */ /* Note that for the VAX the are the same as comment_chars above. */ -const char line_comment_chars[] = "#"; +char line_comment_chars[] = "#"; -const char line_separator_chars[] = ";"; +char line_separator_chars[] = ";"; /* Chars that can be used to separate mant from exp in floating point nums. */ const char EXP_CHARS[] = "eE"; diff --git a/gas/config/tc-xc16x.c b/gas/config/tc-xc16x.c index c628d86..598a945 100644 --- a/gas/config/tc-xc16x.c +++ b/gas/config/tc-xc16x.c @@ -56,11 +56,11 @@ typedef struct } xc16x_insn; -const char comment_chars[] = ";"; -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = ""; -const char EXP_CHARS[] = "eE"; -const char FLT_CHARS[] = "dD"; +char comment_chars[] = ";"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = ""; +const char EXP_CHARS[] = "eE"; +const char FLT_CHARS[] = "dD"; #define XC16X_SHORTOPTS "" const char * md_shortopts = XC16X_SHORTOPTS; diff --git a/gas/config/tc-xgate.c b/gas/config/tc-xgate.c index 7ed1ef6..0107f0f 100644 --- a/gas/config/tc-xgate.c +++ b/gas/config/tc-xgate.c @@ -27,9 +27,9 @@ #include "dwarf2dbg.h" #include "elf/xgate.h" -const char comment_chars[] = ";!"; -const char line_comment_chars[] = "#*"; -const char line_separator_chars[] = ""; +char comment_chars[] = ";!"; +char line_comment_chars[] = "#*"; +char line_separator_chars[] = ""; const char EXP_CHARS[] = "eE"; const char FLT_CHARS[] = "dD"; diff --git a/gas/config/tc-xstormy16.c b/gas/config/tc-xstormy16.c index 74c5bce..f6ca486 100644 --- a/gas/config/tc-xstormy16.c +++ b/gas/config/tc-xstormy16.c @@ -48,9 +48,9 @@ typedef struct } xstormy16_insn; -const char comment_chars[] = ";"; -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = "|"; +char comment_chars[] = ";"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = "|"; const char EXP_CHARS[] = "eE"; const char FLT_CHARS[] = "dD"; diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c index 7075531..8940181 100644 --- a/gas/config/tc-xtensa.c +++ b/gas/config/tc-xtensa.c @@ -62,9 +62,9 @@ /* Define characters with special meanings to GAS. */ -const char comment_chars[] = "#"; -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = ";"; +char comment_chars[] = "#"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = ";"; const char EXP_CHARS[] = "eE"; const char FLT_CHARS[] = "rRsSfFdDxXpP"; diff --git a/gas/config/tc-z80.c b/gas/config/tc-z80.c index f57b4e9..3a137ed 100644 --- a/gas/config/tc-z80.c +++ b/gas/config/tc-z80.c @@ -24,9 +24,9 @@ #include "subsegs.h" /* Exported constants. */ -const char comment_chars[] = ";\0"; -const char line_comment_chars[] = "#;\0"; -const char line_separator_chars[] = "\0"; +char comment_chars[] = ";\0"; +char line_comment_chars[] = "#;\0"; +char line_separator_chars[] = "\0"; const char EXP_CHARS[] = "eE\0"; const char FLT_CHARS[] = "RrFf\0"; diff --git a/gas/config/tc-z8k.c b/gas/config/tc-z8k.c index 2442032..d3d1222 100644 --- a/gas/config/tc-z8k.c +++ b/gas/config/tc-z8k.c @@ -26,9 +26,9 @@ #define DEFINE_TABLE #include "opcodes/z8k-opc.h" -const char comment_chars[] = "!"; -const char line_comment_chars[] = "#"; -const char line_separator_chars[] = ";"; +char comment_chars[] = "!"; +char line_comment_chars[] = "#"; +char line_separator_chars[] = ";"; extern int machine; extern int coff_flags; diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo index 739b5b9..037af43 100644 --- a/gas/doc/as.texinfo +++ b/gas/doc/as.texinfo @@ -279,6 +279,7 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}. [@b{-mapcs-32}|@b{-mapcs-26}|@b{-mapcs-float}| @b{-mapcs-reentrant}] [@b{-mthumb-interwork}] [@b{-k}] + [@b{-mccs}] @end ifset @ifset Blackfin @@ -848,6 +849,8 @@ Select either big-endian (-EB) or little-endian (-EL) output. @item -mthumb-interwork Specify that the code has been generated with interworking between Thumb and ARM code in mind. +@item -mccs +Turns on CodeComposer Studio assembly syntax compatibility mode. @item -k Specify that PIC code has been generated. @end table diff --git a/gas/read.h b/gas/read.h index 81b958a..3d18a9a 100644 --- a/gas/read.h +++ b/gas/read.h @@ -61,9 +61,9 @@ extern char *find_end_of_line (char *, int); extern int target_big_endian; /* These are initialized by the CPU specific target files (tc-*.c). */ -extern const char comment_chars[]; -extern const char line_comment_chars[]; -extern const char line_separator_chars[]; +extern char comment_chars[]; +extern char line_comment_chars[]; +extern char line_separator_chars[]; /* Table of -I directories. */ extern char **include_dirs; diff --git a/gas/testsuite/gas/arm/ccs.d b/gas/testsuite/gas/arm/ccs.d new file mode 100644 index 0000000..ebe1aee --- /dev/null +++ b/gas/testsuite/gas/arm/ccs.d @@ -0,0 +1,24 @@ +#objdump: -dr +# as: -mccs -mcpu=cortex-r4 -mthumb + +.*: file format .*arm.* + + +Disassembly of section \.text: + +00000000 <_test_func>: + 0: e92d5fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, ip, lr} + 4: e59fc018 ldr ip, \[pc, #24\] ; 24 + 8: e59c0000 ldr r0, \[ip\] + c: e3100008 tst r0, #8 + 10: 1a000000 bne 18 + 14: e59c0000 ldr r0, \[ip\] + +00000018 : + 18: ebfffffe bl 0 + 18: R_ARM_CALL ext_sym + 1c: e8bd5fff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, ip, lr} + 20: e25ef008 subs pc, lr, #8 + +00000024 : + 24: fffff520 .word 0xfffff520 diff --git a/gas/testsuite/gas/arm/ccs.s b/gas/testsuite/gas/arm/ccs.s new file mode 100644 index 0000000..0e88dbd --- /dev/null +++ b/gas/testsuite/gas/arm/ccs.s @@ -0,0 +1,33 @@ +;------------------------------------------------------------------------------- +; Comments here + + .text + .arm + +;------------------------------------------------------------------------------- + + .ref ext_sym + .def _test_func + .asmfunc + +_test_func + stmfd r13!, {r0 - r12, lr}; push registers and link register on to stack + + ldr r12, sym1 ; another comment + ldr r0, [r12] + tst r0, #0x8 + bne aLabel + ldr r0, [r12] + +aLabel + bl ext_sym ; custom data abort handler required + + ldmfd r13!, {r0 - r12, lr}; pop registers and link register from stack + subs pc, lr, #8 + +sym1 .word 0xFFFFF520 + + + .endasmfunc + +