From 2e6976a881711242cc151971b83e36844edbc310 Mon Sep 17 00:00:00 2001 From: Daniel Gutson Date: Wed, 19 Mar 2014 14:31:25 +0000 Subject: Add support for ARM assembler produced by CodeCompositor Studio. * config/tc-arm.c (codecomposer_syntax): New flag that states whether the CCS syntax compatibility mode is on or off. (asmfunc_states): New enum to represent the asmfunc directive state. (asmfunc_state): New variable holding the asmfunc directive state. (comment_chars): Rename to arm_comment_chars. (line_separator_chars): Rename to arm_line_separator_chars. (s_ccs_ref): New function that handles the .ref directive. (asmfunc_debug): New function. (s_ccs_asmfunc): New function that handles the .asmfunc directive. (s_ccs_endasmfunc): New function that handles the .endasmfunc directive. (s_ccs_def): New function that handles the .def directive. (tc_start_label_without_colon): New function. (md_pseudo_table): Added new CCS directives. (arm_ccs_mode): New function that handles the -mccs command line option. (arm_long_opts): Added new -mccs command line option. * config/tc-arm.h (LABELS_WITHOUT_COLONS): New macro. (TC_START_LABEL_WITHOUT_COLON): New macro. (tc_start_label_without_colon): Added extern function declaration. (tc_comment_chars): Define. (tc_line_separator_chars): Define. * app.c (do_scrub_begin): Use tc_line_separator_chars, if defined. * read.c (read_begin): Likewise. * doc/as.texinfo: Add documentation for the -mccs command line option. * doc/c-arm.texi: Likewise. * doc/internals.texi: Document tc_line_separator_chars. * NEWS: Mention the new feature. * gas/arm/ccs.s: New test case. * gas/arm/ccs.d: New expected disassembly. --- gas/doc/as.texinfo | 2 ++ gas/doc/c-arm.texi | 4 ++++ gas/doc/internals.texi | 9 +++++++++ 3 files changed, 15 insertions(+) (limited to 'gas/doc') diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo index efeac93..5c8b000 100644 --- a/gas/doc/as.texinfo +++ b/gas/doc/as.texinfo @@ -848,6 +848,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/doc/c-arm.texi b/gas/doc/c-arm.texi index c79c43b..7bcce94 100644 --- a/gas/doc/c-arm.texi +++ b/gas/doc/c-arm.texi @@ -369,6 +369,10 @@ the linker option of the same name. Enable or disable warnings about using deprecated options or features. The default is to warn. +@cindex @code{-mccs} command line option, ARM +@item -mccs +Turns on CodeComposer Studio assembly syntax compatibility mode. + @end table diff --git a/gas/doc/internals.texi b/gas/doc/internals.texi index d76c90e..76f812d 100644 --- a/gas/doc/internals.texi +++ b/gas/doc/internals.texi @@ -884,6 +884,8 @@ comment. @item tc_comment_chars @cindex tc_comment_chars If this macro is defined, GAS will use it instead of @code{comment_chars}. +This has the advantage that this macro does not have to refer to a constant +array. @item tc_symbol_chars @cindex tc_symbol_chars @@ -908,6 +910,13 @@ listed in this array). Note that line_separator_chars do not separate lines if found in a comment, such as after a character in line_comment_chars or comment_chars. +@item tc_line_separator_chars +@cindex tc_line_separator_chars +If this macro is defined, GAS will use it instead of +@code{line_separator_chars}. This has the advantage that this macro does not +have to refer to a constant array. + + @item EXP_CHARS @cindex EXP_CHARS This is a null terminated @code{const char} array of characters which may be -- cgit v1.1