Back to index

cell-binutils  2.17cvs20070401
tc-msp430.h
Go to the documentation of this file.
00001 /* This file is tc-msp430.h
00002    Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
00003 
00004    Contributed by Dmitry Diky <diwil@mail.ru>
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 the Free
00020    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
00021    02110-1301, USA.  */
00022 
00023 #define TC_MSP430
00024 /*   By convention, you should define this macro in the `.h' file.  For
00025      example, `tc-m68k.h' defines `TC_M68K'.  You might have to use this
00026      if it is necessary to add CPU specific code to the object format
00027      file.  */
00028 
00029 #define TARGET_FORMAT "elf32-msp430"
00030 /*   This macro is the BFD target name to use when creating the output
00031      file.  This will normally depend upon the `OBJ_FMT' macro.  */
00032 
00033 #define TARGET_ARCH bfd_arch_msp430
00034 /*   This macro is the BFD architecture to pass to `bfd_set_arch_mach'.  */
00035 
00036 #define TARGET_MACH 0
00037 /*   This macro is the BFD machine number to pass to
00038      `bfd_set_arch_mach'.  If it is not defined, GAS will use 0.  */
00039 
00040 #define TARGET_BYTES_BIG_ENDIAN 0
00041 /*   You should define this macro to be non-zero if the target is big
00042      endian, and zero if the target is little endian.  */
00043 
00044 #define ONLY_STANDARD_ESCAPES
00045 /*   If you define this macro, GAS will warn about the use of
00046      nonstandard escape sequences in a string.  */
00047 
00048 #define md_operand(x)
00049 /*   GAS will call this function for any expression that can not be
00050      recognized.  When the function is called, `input_line_pointer'
00051      will point to the start of the expression.  */
00052 
00053 #define md_number_to_chars number_to_chars_littleendian
00054 /*   This should just call either `number_to_chars_bigendian' or
00055      `number_to_chars_littleendian', whichever is appropriate.  On
00056      targets like the MIPS which support options to change the
00057      endianness, which function to call is a runtime decision.  On
00058      other targets, `md_number_to_chars' can be a simple macro.  */
00059 
00060 #define WORKING_DOT_WORD
00061 /*
00062 `md_short_jump_size'
00063 `md_long_jump_size'
00064 `md_create_short_jump'
00065 `md_create_long_jump'
00066      If `WORKING_DOT_WORD' is defined, GAS will not do broken word
00067      processing (*note Broken words::.).  Otherwise, you should set
00068      `md_short_jump_size' to the size of a short jump (a jump that is
00069      just long enough to jump around a long jmp) and
00070      `md_long_jump_size' to the size of a long jump (a jump that can go
00071      anywhere in the function), You should define
00072      `md_create_short_jump' to create a short jump around a long jump,
00073      and define `md_create_long_jump' to create a long jump.  */
00074 
00075 #define MD_APPLY_FIX3
00076 
00077 #define TC_HANDLES_FX_DONE
00078 
00079 #undef RELOC_EXPANSION_POSSIBLE
00080 /*   If you define this macro, it means that `tc_gen_reloc' may return
00081      multiple relocation entries for a single fixup.  In this case, the
00082      return value of `tc_gen_reloc' is a pointer to a null terminated
00083      array.  */
00084 
00085 #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section(FIXP, SEC)
00086 /*   If you define this macro, it should return the offset between the
00087      address of a PC relative fixup and the position from which the PC
00088      relative adjustment should be made.  On many processors, the base
00089      of a PC relative instruction is the next instruction, so this
00090      macro would return the length of an instruction.  */
00091 
00092 extern long md_pcrel_from_section (struct fix *, segT);
00093 
00094 #define LISTING_WORD_SIZE 2
00095 /*   The number of bytes to put into a word in a listing.  This affects
00096      the way the bytes are clumped together in the listing.  For
00097      example, a value of 2 might print `1234 5678' where a value of 1
00098      would print `12 34 56 78'.  The default value is 4.  */
00099 
00100 #define LEX_DOLLAR 0
00101 /* MSP430 port does not use `$' as a logical line separator */
00102 
00103 #define TC_IMPLICIT_LCOMM_ALIGNMENT(SIZE, P2VAR) (P2VAR) = 0
00104 /*   An `.lcomm' directive with no explicit alignment parameter will
00105      use this macro to set P2VAR to the alignment that a request for
00106      SIZE bytes will have.  The alignment is expressed as a power of
00107      two.  If no alignment should take place, the macro definition
00108      should do nothing.  Some targets define a `.bss' directive that is
00109      also affected by this macro.  The default definition will set
00110      P2VAR to the truncated power of two of sizes up to eight bytes.  */
00111 
00112 #define md_relax_frag(SEG, FRAGP, STRETCH)             \
00113    msp430_relax_frag (SEG, FRAGP, STRETCH)
00114 extern long msp430_relax_frag (segT, fragS *, long);
00115 
00116 #define TC_FORCE_RELOCATION_LOCAL(FIX)    \
00117    msp430_force_relocation_local(FIX)
00118 extern int msp430_force_relocation_local(struct fix *);
00119 
00120 
00121 extern int msp430_enable_relax;
00122 extern int msp430_enable_polys;