1 /* tc-epiphany.h -- Header file for tc-epiphany.c.
2 Copyright (C) 2009-2024 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_PREFIXPERCENT_BIN
41 #define DOUBLESLASH_LINE_COMMENTS
43 #define GAS_CGEN_PCREL_R_TYPE(R_TYPE) gas_cgen_pcrel_r_type (R_TYPE)
45 /* Values passed to md_apply_fix don't include the symbol value. */
46 #define MD_APPLY_SYM_VALUE(FIX) 0
48 #define tc_fix_adjustable(FIX) epiphany_fix_adjustable (FIX)
49 extern bool epiphany_fix_adjustable (struct fix
*);
51 #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP,SEC)
53 #define TC_HANDLES_FX_DONE
55 #define elf_tc_final_processing epiphany_elf_final_processing
56 extern void epiphany_elf_final_processing (void);
58 #define md_elf_section_flags epiphany_elf_section_flags
59 extern int epiphany_elf_section_flags (int, int, int);
61 #define md_operand(x) epiphany_cgen_md_operand (x)
62 extern void epiphany_cgen_md_operand (expressionS
*);
64 /* Values passed to md_apply_fix don't include the symbol value. */
65 #define MD_APPLY_SYM_VALUE(FIX) 0
67 #define TC_CGEN_MAX_RELAX(insn, len) 4
69 #define O_PIC_reloc O_md1
71 #define TC_CGEN_PARSE_FIX_EXP(opinfo, exp) \
72 epiphany_cgen_parse_fix_exp (opinfo, exp)
73 extern int epiphany_cgen_parse_fix_exp (int, expressionS
*);
75 #define HANDLE_ALIGN(f) epiphany_handle_align (f)
76 extern void epiphany_handle_align (fragS
*);
78 #define TARGET_FORMAT "elf32-epiphany"
80 #define md_relax_frag epiphany_relax_frag
82 extern long epiphany_relax_frag (segT
, fragS
*, long);
84 /* If you don't define md_relax_frag, md_cgen_record_fixup_exp
85 but do have TC_GENERIC_RELAX_TABLE gas will do the relaxation for you.
87 If we have to add support for %LO and %HI relocations, we probably need
88 to define the fixup_exp function to generate fancier relocations. */
90 /* For 8 vs 24 bit branch selection. */
91 extern const struct relax_type md_relax_table
[];
92 #define TC_GENERIC_RELAX_TABLE md_relax_table
94 #define tc_gen_reloc gas_cgen_tc_gen_reloc
97 #define md_apply_fix epiphany_apply_fix
100 extern void epiphany_apply_fix (fixS
*fixP
, valueT
*valP
, segT seg
);