1 /* tc-tilegx.h - Macros and type defines for a TILE-Gx chip.
2    Copyright (C) 2011-2021 Free Software Foundation, Inc.
3 
4    This file is part of GAS, the GNU Assembler.
5 
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 3 of the License, or
9    (at your option) any later version.
10 
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15 
16    You should have received a copy of the GNU General Public License
17    along with this program; if not, write to the Free Software
18    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19    MA 02110-1301, USA.  */
20 
21 #ifndef TC_TILEGX
22 
23 #include "opcode/tilegx.h"
24 
25 #define TC_TILEGX
26 
27 #ifndef TARGET_BYTES_BIG_ENDIAN
28 #define TARGET_BYTES_BIG_ENDIAN 0
29 #endif
30 
31 #define WORKING_DOT_WORD
32 
33 #define TARGET_ARCH			bfd_arch_tilegx
34 
35 extern const char * tilegx_target_format (void);
36 #define TARGET_FORMAT tilegx_target_format ()
37 
38 #define DWARF2_LINE_MIN_INSN_LENGTH	8
39 
40 #define DIFF_EXPR_OK   /* foo-. gets turned into PC relative relocs */
41 
42 #define HANDLE_ALIGN(fragp) tilegx_handle_align (fragp)
43 extern void tilegx_handle_align (struct frag *);
44 
45 #define MAX_MEM_FOR_RS_ALIGN_CODE (7 + 8)
46 
47 struct tilegx_operand;
48 #define TC_FIX_TYPE const struct tilegx_operand *
49 
50 /* Initialize the TC_FIX_TYPE field.  */
51 #define TC_INIT_FIX_DATA(FIX) \
52   FIX->tc_fix_data = 0
53 
54 extern void tilegx_cons_fix_new (struct frag *, int,
55 				 int, struct expressionS *);
56 #define TC_CONS_FIX_NEW(FRAG, WHERE, NBYTES, EXP, RELOC)	\
57   tilegx_cons_fix_new (FRAG, WHERE, NBYTES, EXP)
58 
59 extern int tilegx_parse_name (char *, expressionS *, char *);
60 #define md_parse_name(name, e, m, nextP) tilegx_parse_name (name, e, nextP)
61 
62 extern int tilegx_fix_adjustable (struct fix *);
63 #define tc_fix_adjustable(FIX)   tilegx_fix_adjustable (FIX)
64 
65 extern int tilegx_unrecognized_line (int);
66 #define tc_unrecognized_line(ch) tilegx_unrecognized_line (ch)
67 
68 /* Values passed to md_apply_fix3 don't include the symbol value.  */
69 #define MD_APPLY_SYM_VALUE(FIX) 0
70 
71 #define md_convert_frag(b,s,f) \
72   as_fatal ("tilegx convert_frag called")
73 #define md_estimate_size_before_relax(f,s) \
74   (as_fatal ("tilegx estimate_size_before_relax called"),1)
75 #define md_operand(x)
76 
77 #define md_section_align(seg,size)	(size)
78 
79 /* We want .cfi_* pseudo-ops for generating unwind info.  */
80 #define TARGET_USE_CFIPOP 1
81 
82 #define tc_cfi_frame_initial_instructions tilegx_cfi_frame_initial_instructions
83 extern void tilegx_cfi_frame_initial_instructions (void);
84 
85 #define tc_regname_to_dw2regnum tc_tilegx_regname_to_dw2regnum
86 extern int tc_tilegx_regname_to_dw2regnum (char *);
87 
88 extern int tilegx_cie_data_alignment;
89 
90 #define DWARF2_DEFAULT_RETURN_COLUMN 55
91 #define DWARF2_CIE_DATA_ALIGNMENT tilegx_cie_data_alignment
92 
93 #endif /* TC_TILEGX */
94