Back to index

cell-binutils  2.17cvs20070401
tc-tic54x.h
Go to the documentation of this file.
00001 /* tc-tic54x.h -- Header file for tc-tic54x.c
00002    Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
00003    Contributed by Timothy Wall (twall@alum.mit.edu)
00004 
00005    This file is part of GAS, the GNU Assembler.
00006 
00007    GAS is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 2, or (at your option)
00010    any later version.
00011 
00012    GAS is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015    GNU General Public License for more details.
00016 
00017    You should have received a copy of the GNU General Public License
00018    along with GAS; see the file COPYING.  If not, write to the Free
00019    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
00020    02110-1301, USA.  */
00021 
00022 #ifndef _TC_TIC54X_H_
00023 #define _TC_TIC54X_H_
00024 
00025 /* select the proper coff format (see obj-coff.h) */
00026 #define TC_TIC54X
00027 
00028 #define TARGET_BYTES_BIG_ENDIAN    0
00029 #define OCTETS_PER_BYTE_POWER 1
00030 
00031 #define TARGET_ARCH         bfd_arch_tic54x
00032 
00033 #define WORKING_DOT_WORD        1
00034 
00035 #define MAX_OPERANDS 4
00036 #define PARALLEL_SEPARATOR '|'
00037 #define LABELS_WITHOUT_COLONS 1
00038 /* accept 0FFFFh, 1010b, etc.  */
00039 #define NUMBERS_WITH_SUFFIX 1
00040 /* $ is section program counter */
00041 #define DOLLAR_DOT 1
00042 /* accept parallel lines like
00043        add #1,a  ||  ld #1, b
00044        (may also be split across lines)
00045 */
00046 #define DOUBLEBAR_PARALLEL 1
00047 /* affects preprocessor */
00048 #define KEEP_WHITE_AROUND_COLON 1
00049 
00050 struct bit_info
00051 {
00052   segT seg;
00053 #define TYPE_SPACE 0
00054 #define TYPE_BES   1
00055 #define TYPE_FIELD 2
00056   int type;
00057   symbolS *sym;
00058   valueT value;
00059   char *where;
00060   int offset;
00061 };
00062 
00063 /* We sometimes need to keep track of bit offsets within words */
00064 #define TC_FRAG_TYPE int
00065 #define TC_FRAG_INIT(FRAGP) do {(FRAGP)->tc_frag_data = 0;}while (0)
00066 
00067 /* tell GAS whether the given token is indeed a code label */
00068 #define TC_START_LABEL_WITHOUT_COLON(c,ptr) tic54x_start_label(c,ptr)
00069 extern int tic54x_start_label PARAMS((int, char *));
00070 
00071 /* custom handling for relocations in cons expressions */
00072 #define TC_CONS_FIX_NEW(FRAG,OFF,LEN,EXP) tic54x_cons_fix_new(FRAG,OFF,LEN,EXP)
00073 extern void tic54x_cons_fix_new PARAMS((fragS *,int,int,expressionS *));
00074 
00075 /* Define md_number_to_chars as the appropriate standard big endian or
00076    little endian function.  Mostly littleendian, but longwords and floats are
00077    stored MS word first.
00078 */
00079 
00080 #define md_number_to_chars tic54x_number_to_chars
00081 extern void tic54x_number_to_chars (char *, valueT, int);
00082 #define tc_adjust_symtab() tic54x_adjust_symtab()
00083 extern void tic54x_adjust_symtab (void);
00084 #define tc_unrecognized_line(ch) tic54x_unrecognized_line(ch)
00085 extern int tic54x_unrecognized_line (int ch);
00086 #define md_parse_name(s,e,m,c) tic54x_parse_name(s,e)
00087 extern int tic54x_parse_name (char *name, expressionS *e);
00088 #define md_undefined_symbol(s) tic54x_undefined_symbol(s)
00089 extern symbolS *tic54x_undefined_symbol (char *name);
00090 #define md_macro_start() tic54x_macro_start()
00091 extern void tic54x_macro_start (void);
00092 #define md_macro_end() tic54x_macro_end()
00093 extern void tic54x_macro_end (void);
00094 #define md_macro_info(args) tic54x_macro_info(args)
00095 struct macro_struct;
00096 extern void tic54x_macro_info PARAMS((const struct macro_struct *));
00097 #define tc_frob_label(sym) tic54x_define_label (sym)
00098 extern void tic54x_define_label PARAMS((symbolS *));
00099 
00100 #define md_start_line_hook() tic54x_start_line_hook()
00101 extern void tic54x_start_line_hook (void);
00102 
00103 #define md_estimate_size_before_relax(f,s) \
00104 tic54x_estimate_size_before_relax(f,s)
00105 extern int tic54x_estimate_size_before_relax(fragS *, segT);
00106 
00107 #define md_relax_frag(seg, f,s) tic54x_relax_frag(f,s)
00108 extern int tic54x_relax_frag(fragS *, long);
00109 
00110 #define md_convert_frag(b,s,f)     tic54x_convert_frag(b,s,f)
00111 extern void tic54x_convert_frag(bfd *, segT, fragS *);
00112 
00113 /* Other things we don't support...  */
00114 
00115 /* Define away the call to md_operand in the expression parsing code.
00116    This is called whenever the expression parser can't parse the input
00117    and gives the assembler backend a chance to deal with it instead.  */
00118 
00119 #define md_operand(X)
00120 
00121 /* spruce up the listing output */
00122 #define LISTING_WORD_SIZE 2
00123 
00124 extern void tic54x_global (int);
00125 
00126 #endif