Commit | Line | Data |
---|---|---|
cfb8c092 | 1 | /* tc-epiphany.h -- Header file for tc-epiphany.c. |
82704155 | 2 | Copyright (C) 2009-2019 Free Software Foundation, Inc. |
cfb8c092 NC |
3 | Contributed by Embecosm on behalf of Adapteva, Inc. |
4 | ||
5 | This file is part of GAS, the GNU Assembler. | |
6 | ||
7 | GAS is free software; you can redistribute it and/or modify | |
8 | it under the terms of the GNU General Public License as published by | |
9 | the Free Software Foundation; either version 3, or (at your option) | |
10 | any later version. | |
11 | ||
12 | GAS is distributed in the hope that it will be useful, | |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
18 | along with GAS; see the file COPYING. If not, write to the Free | |
19 | Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA | |
20 | 02110-1301, USA. */ | |
21 | ||
22 | #define TC_EPIPHANY | |
23 | ||
24 | #define LISTING_HEADER "EPIPHANY GAS " | |
25 | ||
26 | /* The target BFD architecture. */ | |
27 | #define TARGET_ARCH bfd_arch_epiphany | |
28 | ||
29 | #define TARGET_FORMAT "elf32-epiphany" | |
30 | ||
31 | /* Permit temporary numeric labels. */ | |
32 | #define LOCAL_LABELS_FB 1 | |
33 | ||
34 | /* .-foo gets turned into PC relative relocs. */ | |
35 | #define DIFF_EXPR_OK | |
36 | ||
37 | /* We don't need to handle .word strangely. */ | |
38 | #define WORKING_DOT_WORD | |
39 | ||
cfb8c092 NC |
40 | #define LITERAL_PREFIXPERCENT_BIN |
41 | #define DOUBLESLASH_LINE_COMMENTS | |
42 | ||
43 | #define GAS_CGEN_PCREL_R_TYPE(R_TYPE) gas_cgen_pcrel_r_type (R_TYPE) | |
44 | ||
45 | /* Values passed to md_apply_fix don't include the symbol value. */ | |
46 | #define MD_APPLY_SYM_VALUE(FIX) 0 | |
47 | ||
48 | #define tc_fix_adjustable(FIX) epiphany_fix_adjustable (FIX) | |
49 | extern bfd_boolean epiphany_fix_adjustable (struct fix *); | |
50 | ||
51 | extern long md_pcrel_from_section (struct fix *, segT); | |
52 | #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP,SEC) | |
53 | ||
54 | #define TC_HANDLES_FX_DONE | |
55 | ||
56 | #define elf_tc_final_processing epiphany_elf_final_processing | |
57 | extern void epiphany_elf_final_processing (void); | |
58 | ||
59 | #define md_elf_section_flags epiphany_elf_section_flags | |
60 | extern int epiphany_elf_section_flags (int, int, int); | |
61 | ||
62 | #define md_operand(x) epiphany_cgen_md_operand (x) | |
63 | extern void epiphany_cgen_md_operand (expressionS *); | |
64 | ||
65 | /* Values passed to md_apply_fix don't include the symbol value. */ | |
66 | #define MD_APPLY_SYM_VALUE(FIX) 0 | |
67 | ||
68 | #define TC_CGEN_MAX_RELAX(insn, len) 4 | |
69 | ||
70 | #define O_PIC_reloc O_md1 | |
71 | ||
72 | #define TC_CGEN_PARSE_FIX_EXP(opinfo, exp) \ | |
73 | epiphany_cgen_parse_fix_exp (opinfo, exp) | |
74 | extern int epiphany_cgen_parse_fix_exp (int, expressionS *); | |
75 | ||
76 | #define HANDLE_ALIGN(f) epiphany_handle_align (f) | |
77 | extern void epiphany_handle_align (fragS *); | |
78 | ||
79 | #define TARGET_FORMAT "elf32-epiphany" | |
80 | ||
81 | #define md_relax_frag epiphany_relax_frag | |
82 | ||
83 | extern long epiphany_relax_frag (segT, fragS *, long); | |
84 | ||
85 | /* If you don't define md_relax_frag, md_cgen_record_fixup_exp | |
86 | but do have TC_GENERIC_RELAX_TABLE gas will do the relaxation for you. | |
87 | ||
88 | If we have to add support for %LO and %HI relocations, we probably need | |
89 | to define the fixup_exp function to generate fancier relocations. */ | |
90 | ||
91 | /* For 8 vs 24 bit branch selection. */ | |
92 | extern const struct relax_type md_relax_table[]; | |
93 | #define TC_GENERIC_RELAX_TABLE md_relax_table | |
94 | ||
95 | #define tc_gen_reloc gas_cgen_tc_gen_reloc | |
96 | ||
97 | ||
98 | #define md_apply_fix epiphany_apply_fix | |
99 | #include "write.h" | |
100 | ||
101 | extern void epiphany_apply_fix (fixS *fixP, valueT *valP, segT seg); |