5d9b44318ef3313a2cd042935253bd350d24bf6e
[external/binutils.git] / gas / config / tc-metag.h
1 /* tc-metag.h -- Header file for tc-metag.c.
2    Copyright (C) 2013-2016 Free Software Foundation, Inc.
3    Contributed by Imagination Technologies Ltd.
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_METAG
23
24 #define LISTING_HEADER "META GAS "
25
26 /* The target BFD architecture.  */
27 #define TARGET_ARCH bfd_arch_metag
28
29 #define TARGET_FORMAT "elf32-metag"
30
31 #define TARGET_BYTES_BIG_ENDIAN 0
32
33 /* Permit temporary numeric labels.  */
34 #define LOCAL_LABELS_FB 1
35
36 #define DIFF_EXPR_OK            /* foo-. gets turned into PC relative relocs */
37
38 /* We don't need to handle .word strangely.  */
39 #define WORKING_DOT_WORD
40
41 /* Values passed to md_apply_fix don't include the symbol value.  */
42 #define MD_APPLY_SYM_VALUE(FIX) 0
43
44 #define tc_fix_adjustable(FIX) metag_fix_adjustable (FIX)
45 extern bfd_boolean metag_fix_adjustable (struct fix *);
46
47 #define TC_FORCE_RELOCATION(fix) metag_force_relocation (fix)
48 extern int metag_force_relocation (struct fix *);
49
50 #define TC_HANDLES_FX_DONE
51
52 /* Call md_pcrel_from_section(), not md_pcrel_from().  */
53 #define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section (FIX, SEC)
54 extern long md_pcrel_from_section (struct fix *, segT);
55
56 #define HANDLE_ALIGN(fragp) metag_handle_align (fragp)
57 extern void metag_handle_align (struct frag *);
58
59 #define DWARF2_LINE_MIN_INSN_LENGTH 1
60
61 #define md_parse_name(name, exprP, mode, nextcharP) \
62   metag_parse_name ((name), (exprP), (mode), (nextcharP))
63 extern int metag_parse_name (char const *, expressionS *, enum expr_mode, char *);
64
65 /* This is used to construct expressions out of @GOTOFF, @PLT and @GOT
66    symbols.  The relocation type is stored in X_md.  */
67 #define O_PIC_reloc O_md1
68
69 #define TC_CASE_SENSITIVE
70
71 extern const char       metag_symbol_chars[];
72 #define tc_symbol_chars metag_symbol_chars