1 /* tc-epiphany.h -- Header file for tc-epiphany.c.
2 Copyright 2009, 2011 Free Software Foundation, Inc.
3 Contributed by Embecosm on behalf of Adapteva, Inc.
5 This file is part of GAS, the GNU Assembler.
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)
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.
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
24 #define LISTING_HEADER "EPIPHANY GAS "
26 /* The target BFD architecture. */
27 #define TARGET_ARCH bfd_arch_epiphany
29 #define TARGET_FORMAT "elf32-epiphany"
31 /* Permit temporary numeric labels. */
32 #define LOCAL_LABELS_FB 1
34 /* .-foo gets turned into PC relative relocs. */
37 /* We don't need to handle .word strangely. */
38 #define WORKING_DOT_WORD
40 #define LITERAL_PREFIXDOLLAR_HEX
41 #define LITERAL_PREFIXPERCENT_BIN
42 #define DOUBLESLASH_LINE_COMMENTS
44 #define GAS_CGEN_PCREL_R_TYPE(R_TYPE) gas_cgen_pcrel_r_type (R_TYPE)
46 /* Values passed to md_apply_fix don't include the symbol value. */
47 #define MD_APPLY_SYM_VALUE(FIX) 0
49 #define tc_fix_adjustable(FIX) epiphany_fix_adjustable (FIX)
50 extern bfd_boolean
epiphany_fix_adjustable (struct fix
*);
52 extern long md_pcrel_from_section (struct fix
*, segT
);
53 #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP,SEC)
55 #define TC_HANDLES_FX_DONE
57 #define elf_tc_final_processing epiphany_elf_final_processing
58 extern void epiphany_elf_final_processing (void);
60 #define md_elf_section_flags epiphany_elf_section_flags
61 extern int epiphany_elf_section_flags (int, int, int);
63 #define md_operand(x) epiphany_cgen_md_operand (x)
64 extern void epiphany_cgen_md_operand (expressionS
*);
66 /* Values passed to md_apply_fix don't include the symbol value. */
67 #define MD_APPLY_SYM_VALUE(FIX) 0
69 #define TC_CGEN_MAX_RELAX(insn, len) 4
71 #define O_PIC_reloc O_md1
73 #define TC_CGEN_PARSE_FIX_EXP(opinfo, exp) \
74 epiphany_cgen_parse_fix_exp (opinfo, exp)
75 extern int epiphany_cgen_parse_fix_exp (int, expressionS
*);
77 #define HANDLE_ALIGN(f) epiphany_handle_align (f)
78 extern void epiphany_handle_align (fragS
*);
80 #define TARGET_FORMAT "elf32-epiphany"
82 #define md_relax_frag epiphany_relax_frag
84 extern long epiphany_relax_frag (segT
, fragS
*, long);
86 /* If you don't define md_relax_frag, md_cgen_record_fixup_exp
87 but do have TC_GENERIC_RELAX_TABLE gas will do the relaxation for you.
89 If we have to add support for %LO and %HI relocations, we probably need
90 to define the fixup_exp function to generate fancier relocations. */
92 /* For 8 vs 24 bit branch selection. */
93 extern const struct relax_type md_relax_table
[];
94 #define TC_GENERIC_RELAX_TABLE md_relax_table
96 #define tc_gen_reloc gas_cgen_tc_gen_reloc
99 #define md_apply_fix epiphany_apply_fix
102 extern void epiphany_apply_fix (fixS
*fixP
, valueT
*valP
, segT seg
);