tc-bfin.h revision 1.1 1 1.1 skrll /* tc-bfin.h - header file for tc-bfin.c
2 1.1 skrll Copyright 2005, 2007, 2008
3 1.1 skrll Free Software Foundation, Inc.
4 1.1 skrll
5 1.1 skrll This file is part of GAS, the GNU Assembler.
6 1.1 skrll
7 1.1 skrll GAS is free software; you can redistribute it and/or modify
8 1.1 skrll it under the terms of the GNU General Public License as published by
9 1.1 skrll the Free Software Foundation; either version 3, or (at your option)
10 1.1 skrll any later version.
11 1.1 skrll
12 1.1 skrll GAS is distributed in the hope that it will be useful,
13 1.1 skrll but WITHOUT ANY WARRANTY; without even the implied warranty of
14 1.1 skrll MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 1.1 skrll GNU General Public License for more details.
16 1.1 skrll
17 1.1 skrll You should have received a copy of the GNU General Public License
18 1.1 skrll along with GAS; see the file COPYING. If not, write to the Free
19 1.1 skrll Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
20 1.1 skrll 02110-1301, USA. */
21 1.1 skrll
22 1.1 skrll #define TC_BFIN 1
23 1.1 skrll #define TC_ADI_BFIN 1
24 1.1 skrll
25 1.1 skrll #define TARGET_BYTES_BIG_ENDIAN 0
26 1.1 skrll
27 1.1 skrll #define TARGET_ARCH bfd_arch_bfin
28 1.1 skrll
29 1.1 skrll /*
30 1.1 skrll * Define the target format macro here. The value for this should be
31 1.1 skrll * "elf32-bfin", not "elf32-little-bfin". Since the BFD source file
32 1.1 skrll * elf32-bfin.c defines TARGET_LITTLE_NAME to be "elf32-little-bfin",
33 1.1 skrll * we must use this value, until this is corrected and BFD is rebuilt. */
34 1.1 skrll #ifdef OBJ_ELF
35 1.1 skrll #define TARGET_FORMAT "elf32-bfin"
36 1.1 skrll #endif
37 1.1 skrll
38 1.1 skrll #define LISTING_HEADER "BFIN GAS "
39 1.1 skrll
40 1.1 skrll #define WORKING_DOT_WORD
41 1.1 skrll
42 1.1 skrll extern void bfin_start_line_hook (void);
43 1.1 skrll extern bfd_boolean bfin_start_label (char *);
44 1.1 skrll
45 1.1 skrll #define md_start_line_hook() bfin_start_line_hook()
46 1.1 skrll #define md_number_to_chars number_to_chars_littleendian
47 1.1 skrll #define md_convert_frag(b,s,f) as_fatal ("bfin convert_frag\n");
48 1.1 skrll
49 1.1 skrll /* Allow for [, ], etc. */
50 1.1 skrll #define LEX_BR 6
51 1.1 skrll
52 1.1 skrll #define TC_EOL_IN_INSN(PTR) (bfin_eol_in_insn(PTR) ? 1 : 0)
53 1.1 skrll extern bfd_boolean bfin_eol_in_insn (char *);
54 1.1 skrll
55 1.1 skrll /* Almost all instructions of Blackfin contain an = character. */
56 1.1 skrll #define TC_EQUAL_IN_INSN(C, NAME) 1
57 1.1 skrll
58 1.1 skrll #define NOP_OPCODE 0x0000
59 1.1 skrll
60 1.1 skrll #define LOCAL_LABELS_FB 1
61 1.1 skrll
62 1.1 skrll #define DOUBLESLASH_LINE_COMMENTS
63 1.1 skrll
64 1.1 skrll #define TC_START_LABEL(ch ,ptr) (ch == ':' && bfin_start_label (ptr))
65 1.1 skrll #define tc_fix_adjustable(FIX) bfin_fix_adjustable (FIX)
66 1.1 skrll extern bfd_boolean bfin_fix_adjustable (struct fix *);
67 1.1 skrll
68 1.1 skrll #define TC_FORCE_RELOCATION(FIX) bfin_force_relocation (FIX)
69 1.1 skrll extern int bfin_force_relocation (struct fix *);
70 1.1 skrll
71 1.1 skrll /* Call md_pcrel_from_section(), not md_pcrel_from(). */
72 1.1 skrll #define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section (FIX, SEC)
73 1.1 skrll extern long md_pcrel_from_section (struct fix *, segT);
74 1.1 skrll
75 1.1 skrll /* Values passed to md_apply_fix3 don't include symbol values. */
76 1.1 skrll #define MD_APPLY_SYM_VALUE(FIX) 0
77 1.1 skrll
78 1.1 skrll /* This target is buggy, and sets fix size too large. */
79 1.1 skrll #define TC_FX_SIZE_SLACK(FIX) 2
80 1.1 skrll
81 1.1 skrll /* end of tc-bfin.h */
82