Back to index

cell-binutils  2.17cvs20070401
tc-tic4x.h
Go to the documentation of this file.
00001 /* tc-tic4x.h -- Assemble for the Texas TMS320C[34]X.
00002    Copyright (C) 1997, 2002, 2003, 2005 Free Software Foundation.
00003    
00004    Contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
00005 
00006    This file is part of GAS, the GNU Assembler.
00007 
00008    GAS is free software; you can redistribute it and/or modify
00009    it under the terms of the GNU General Public License as published by
00010    the Free Software Foundation; either version 2, or (at your option)
00011    any later version.
00012 
00013    GAS is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016    GNU General Public License for more details.
00017 
00018    You should have received a copy of the GNU General Public License
00019    along with GAS; see the file COPYING.  If not, write to
00020    the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00021 
00022 #define TC_TIC4X
00023 #define TIC4X
00024 
00025 #define TARGET_ARCH bfd_arch_tic4x
00026 
00027 #define WORKING_DOT_WORD
00028 
00029 /* There are a number of different formats used for local labels.  gas
00030    expects local labels either of the form `10$:' or `n:', where n is
00031    a single digit.  When LOCAL_LABEL_DOLLARS is defined labels of the
00032    form `10$:' are expected.  When LOCAL_LABEL_FB is defined labels of
00033    the form `n:' are expected.  The latter are expected to be referred
00034    to using `nf' for a forward reference of `nb' for a backward
00035    reference.
00036 
00037    The local labels expected by the TI tools are of the form `$n:',
00038    where the colon is optional.  Now the $ character is considered to
00039    be valid symbol name character, so gas doesn't recognise our local
00040    symbols by default.  Defining LEX_DOLLAR to be 1 means that gas
00041    won't allow labels starting with $ and thus the hook
00042    tc_unrecognized_line() will be called from read.c.  We can thus
00043    parse lines starting with $n as having local labels.
00044 
00045    The other problem is the forward reference of local labels.  If a
00046    symbol is undefined, symbol_make() calls the md_undefined_symbol()
00047    hook where we create a local label if recognised.  */
00048 
00049 /* Don't stick labels starting with 'L' into symbol table of COFF file. */
00050 #define LOCAL_LABEL(name) ((name)[0] == '$' || (name)[0] == 'L')
00051 
00052 #define TARGET_BYTES_BIG_ENDIAN    0
00053 #define OCTETS_PER_BYTE_POWER      2
00054 
00055 #define TARGET_ARCH         bfd_arch_tic4x
00056 
00057 #define TIC_NOP_OPCODE             0x0c800000
00058 
00059 #define reloc_type          int
00060 
00061 #define NO_RELOC            0
00062 
00063 /* '||' denotes parallel instruction */
00064 #define DOUBLEBAR_PARALLEL      1
00065 
00066 /* Labels are not required to have a colon for a suffix.  */
00067 #define LABELS_WITHOUT_COLONS      1
00068 
00069 /* Use $ as the section program counter (SPC). */
00070 #define DOLLAR_DOT
00071 
00072 /* Accept numbers with a suffix, e.g. 0ffffh, 1010b.  */
00073 #define NUMBERS_WITH_SUFFIX        1
00074 
00075 extern int tic4x_unrecognized_line PARAMS ((int));
00076 #define tc_unrecognized_line(c) tic4x_unrecognized_line (c)
00077 
00078 #define md_number_to_chars number_to_chars_littleendian
00079 
00080 extern int tic4x_do_align PARAMS ((int, const char *, int, int));
00081 #define md_do_align(n,fill,len,max,label) if( tic4x_do_align (n,fill,len,max) ) goto label;
00082 
00083 /* Start of line hook to remove parallel instruction operator || */
00084 extern void tic4x_start_line PARAMS ((void));
00085 #define md_start_line_hook() tic4x_start_line()
00086 
00087 extern void tic4x_cleanup PARAMS ((void));
00088 #define md_cleanup() tic4x_cleanup()
00089 
00090 extern void tic4x_end PARAMS ((void));
00091 #define md_end() tic4x_end()
00092