opcodes/
[external/binutils.git] / gas / config / tc-msp430.h
1 /* This file is tc-msp430.h
2    Copyright (C) 2002 Free Software Foundation, Inc.
3
4    Contributed by Dmitry Diky <diwil@mail.ru>
5
6    This file is part of GAS, the GNU Assembler.
7
8    GAS is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 2, or (at your option)
11    any later version.
12
13    GAS is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with GAS; see the file COPYING.  If not, write to the Free
20    Software Foundation, 59 Temple Place - Suite 330, Boston, MA
21    02111-1307, USA.  */
22
23 #ifndef BFD_ASSEMBLER
24  #error MSP430 support requires BFD_ASSEMBLER
25 #endif
26
27 #define TC_MSP430
28 /*   By convention, you should define this macro in the `.h' file.  For
29      example, `tc-m68k.h' defines `TC_M68K'.  You might have to use this
30      if it is necessary to add CPU specific code to the object format
31      file.  */
32
33 #define TARGET_FORMAT "elf32-msp430"
34 /*   This macro is the BFD target name to use when creating the output
35      file.  This will normally depend upon the `OBJ_FMT' macro.  */
36
37 #define TARGET_ARCH bfd_arch_msp430
38 /*   This macro is the BFD architecture to pass to `bfd_set_arch_mach'.  */
39
40 #define TARGET_MACH 0
41 /*   This macro is the BFD machine number to pass to
42      `bfd_set_arch_mach'.  If it is not defined, GAS will use 0.  */
43
44 #define TARGET_BYTES_BIG_ENDIAN 0
45 /*   You should define this macro to be non-zero if the target is big
46      endian, and zero if the target is little endian.  */
47
48 #define ONLY_STANDARD_ESCAPES
49 /*   If you define this macro, GAS will warn about the use of
50      nonstandard escape sequences in a string.  */
51
52 #define md_operand(x)
53 /*   GAS will call this function for any expression that can not be
54      recognized.  When the function is called, `input_line_pointer'
55      will point to the start of the expression.  */
56
57 #define md_number_to_chars number_to_chars_littleendian
58 /*   This should just call either `number_to_chars_bigendian' or
59      `number_to_chars_littleendian', whichever is appropriate.  On
60      targets like the MIPS which support options to change the
61      endianness, which function to call is a runtime decision.  On
62      other targets, `md_number_to_chars' can be a simple macro.  */
63
64 #define WORKING_DOT_WORD
65 /*
66 `md_short_jump_size'
67 `md_long_jump_size'
68 `md_create_short_jump'
69 `md_create_long_jump'
70      If `WORKING_DOT_WORD' is defined, GAS will not do broken word
71      processing (*note Broken words::.).  Otherwise, you should set
72      `md_short_jump_size' to the size of a short jump (a jump that is
73      just long enough to jump around a long jmp) and
74      `md_long_jump_size' to the size of a long jump (a jump that can go
75      anywhere in the function), You should define
76      `md_create_short_jump' to create a short jump around a long jump,
77      and define `md_create_long_jump' to create a long jump.  */
78
79 #define MD_APPLY_FIX3
80
81 #define TC_HANDLES_FX_DONE
82
83 #undef RELOC_EXPANSION_POSSIBLE
84 /*   If you define this macro, it means that `tc_gen_reloc' may return
85      multiple relocation entries for a single fixup.  In this case, the
86      return value of `tc_gen_reloc' is a pointer to a null terminated
87      array.  */
88
89 #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section(FIXP, SEC)
90 /*   If you define this macro, it should return the offset between the
91      address of a PC relative fixup and the position from which the PC
92      relative adjustment should be made.  On many processors, the base
93      of a PC relative instruction is the next instruction, so this
94      macro would return the length of an instruction.  */
95
96 extern long md_pcrel_from_section PARAMS ((struct fix *, segT));
97
98 #define LISTING_WORD_SIZE 2
99 /*   The number of bytes to put into a word in a listing.  This affects
100      the way the bytes are clumped together in the listing.  For
101      example, a value of 2 might print `1234 5678' where a value of 1
102      would print `12 34 56 78'.  The default value is 4.  */
103
104 #define LEX_DOLLAR 0
105 /* MSP430 port does not use `$' as a logical line separator */
106
107 #define TC_IMPLICIT_LCOMM_ALIGNMENT(SIZE, P2VAR) (P2VAR) = 0
108 /*   An `.lcomm' directive with no explicit alignment parameter will
109      use this macro to set P2VAR to the alignment that a request for
110      SIZE bytes will have.  The alignment is expressed as a power of
111      two.  If no alignment should take place, the macro definition
112      should do nothing.  Some targets define a `.bss' directive that is
113      also affected by this macro.  The default definition will set
114      P2VAR to the truncated power of two of sizes up to eight bytes.  */