Assign correct reloc value to size 1 fixes.
[binutils.git] / gas / config / tc-avr.h
blob2a8d3eea828d6b0a67e75262301fb26196f8d29d
1 /* This file is tc-avr.h
2 Copyright (C) 1999, 2000 Free Software Foundation, Inc.
4 Contributed by Denis Chertykov <denisc@overta.ru>
6 This file is part of GAS, the GNU Assembler.
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.
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.
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. */
23 #ifndef BFD_ASSEMBLER
24 #error AVR support requires BFD_ASSEMBLER
25 #endif
28 #define TC_AVR
29 /* By convention, you should define this macro in the `.h' file. For
30 example, `tc-m68k.h' defines `TC_M68K'. You might have to use this
31 if it is necessary to add CPU specific code to the object format
32 file. */
34 #define TARGET_FORMAT "elf32-avr"
35 /* This macro is the BFD target name to use when creating the output
36 file. This will normally depend upon the `OBJ_FMT' macro. */
38 #define TARGET_ARCH bfd_arch_avr
39 /* This macro is the BFD architecture to pass to `bfd_set_arch_mach'. */
41 #define TARGET_MACH 0
42 /* This macro is the BFD machine number to pass to
43 `bfd_set_arch_mach'. If it is not defined, GAS will use 0. */
45 #define TARGET_BYTES_BIG_ENDIAN 0
46 /* You should define this macro to be non-zero if the target is big
47 endian, and zero if the target is little endian. */
49 #define ONLY_STANDARD_ESCAPES
50 /* If you define this macro, GAS will warn about the use of
51 nonstandard escape sequences in a string. */
53 #define md_operand(x)
54 /* GAS will call this function for any expression that can not be
55 recognized. When the function is called, `input_line_pointer'
56 will point to the start of the expression. */
58 void avr_parse_cons_expression (expressionS *exp, int nbytes);
60 #define TC_PARSE_CONS_EXPRESSION(EXPR,N) avr_parse_cons_expression (EXPR,N)
62 You may define this macro to parse an expression used in a data
63 allocation pseudo-op such as `.word'. You can use this to
64 recognize relocation directives that may appear in such directives.*/
66 void avr_cons_fix_new(fragS *frag,int where, int nbytes, expressionS *exp);
68 #define TC_CONS_FIX_NEW(FRAG,WHERE,N,EXP) avr_cons_fix_new(FRAG,WHERE,N,EXP)
69 /* You may define this macro to generate a fixup for a data
70 allocation pseudo-op. */
72 #define md_number_to_chars number_to_chars_littleendian
73 /* This should just call either `number_to_chars_bigendian' or
74 `number_to_chars_littleendian', whichever is appropriate. On
75 targets like the MIPS which support options to change the
76 endianness, which function to call is a runtime decision. On
77 other targets, `md_number_to_chars' can be a simple macro. */
79 #define WORKING_DOT_WORD
81 `md_short_jump_size'
82 `md_long_jump_size'
83 `md_create_short_jump'
84 `md_create_long_jump'
85 If `WORKING_DOT_WORD' is defined, GAS will not do broken word
86 processing (*note Broken words::.). Otherwise, you should set
87 `md_short_jump_size' to the size of a short jump (a jump that is
88 just long enough to jump around a long jmp) and
89 `md_long_jump_size' to the size of a long jump (a jump that can go
90 anywhere in the function), You should define
91 `md_create_short_jump' to create a short jump around a long jump,
92 and define `md_create_long_jump' to create a long jump. */
94 #define MD_APPLY_FIX3
96 #define TC_HANDLES_FX_DONE
98 #undef RELOC_EXPANSION_POSSIBLE
99 /* If you define this macro, it means that `tc_gen_reloc' may return
100 multiple relocation entries for a single fixup. In this case, the
101 return value of `tc_gen_reloc' is a pointer to a null terminated
102 array. */
104 #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section(FIXP, SEC)
105 /* If you define this macro, it should return the offset between the
106 address of a PC relative fixup and the position from which the PC
107 relative adjustment should be made. On many processors, the base
108 of a PC relative instruction is the next instruction, so this
109 macro would return the length of an instruction. */
111 #define LISTING_WORD_SIZE 2
112 /* The number of bytes to put into a word in a listing. This affects
113 the way the bytes are clumped together in the listing. For
114 example, a value of 2 might print `1234 5678' where a value of 1
115 would print `12 34 56 78'. The default value is 4. */
117 #define LEX_DOLLAR 0
118 /* AVR port uses `$' as a logical line separator */