bfd:
[deliverable/binutils-gdb.git] / gas / config / tc-tic6x.h
1 /* Definitions for TI C6X assembler.
2 Copyright 2010
3 Free Software Foundation, 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_TIC6X 1
23 #define TARGET_BYTES_BIG_ENDIAN 0
24 #define WORKING_DOT_WORD
25 #define DOUBLEBAR_PARALLEL
26 #define DWARF2_LINE_MIN_INSN_LENGTH 2
27 #define MD_APPLY_SYM_VALUE(FIX) 0
28 #define TC_PREDICATE_START_CHAR '['
29 #define TC_PREDICATE_END_CHAR ']'
30 /* For TI C6X, we keep spaces in what the preprocessor considers
31 operands as they may separate functional unit specifiers from
32 operands. */
33 #define TC_KEEP_OPERAND_SPACES 1
34
35 #define TARGET_ARCH bfd_arch_tic6x
36 #define TARGET_FORMAT (target_big_endian \
37 ? "elf32-tic6x-be" \
38 : "elf32-tic6x-le")
39
40 typedef struct
41 {
42 /* Number of instructions in the current execute packet. */
43 unsigned int num_execute_packet_insns;
44
45 /* Whether a label has been seen since the last instruction or data
46 (in which case a following instruction may not have parallel
47 bars, but must start a new execute packet). */
48 bfd_boolean seen_label;
49
50 /* Whether compact instructions are forbidden here. */
51 bfd_boolean nocmp;
52
53 /* If there is a current execute packet, a pointer to the
54 least-significant byte of the last instruction in it (for setting
55 the p-bit). */
56 char *last_insn_lsb;
57
58 /* If there has been an SPMASK instruction in the current execute
59 packet, a pointer to the first byte in it (for processing
60 ||^); otherwise NULL. */
61 char *spmask_addr;
62
63 /* If an SPLOOP-family instruction has been seen, and a following
64 SPKERNEL-family instruction has not yet been seen, the ii value
65 from the SPLOOP instruction (in the range 1 to 14); otherwise
66 0. */
67 int sploop_ii;
68 } tic6x_segment_info_type;
69 #define TC_SEGMENT_INFO_TYPE tic6x_segment_info_type
70
71 typedef struct
72 {
73 /* Whether this fix was for an ADDA instruction. If so, a constant
74 resulting from resolving the fix should be implicitly shifted
75 left (it represents a value to be encoded literally in the
76 instruction, whereas a non-constant represents a DP-relative
77 value counting in the appropriate units). */
78 bfd_boolean fix_adda;
79 } tic6x_fix_info;
80 #define TC_FIX_TYPE tic6x_fix_info
81 #define TC_INIT_FIX_DATA(fixP) tic6x_init_fix_data (fixP)
82 struct fix;
83 extern void tic6x_init_fix_data (struct fix *fixP);
84
85 #define md_after_parse_args() tic6x_after_parse_args ()
86 extern void tic6x_after_parse_args (void);
87
88 #define md_cleanup() tic6x_cleanup ()
89 extern void tic6x_cleanup (void);
90
91 #define md_cons_align(n) tic6x_cons_align (n)
92 extern void tic6x_cons_align (int n);
93
94 #define md_parse_name(name, exprP, mode, nextcharP) \
95 tic6x_parse_name (name, exprP, mode, nextcharP)
96 extern int tic6x_parse_name (const char *name, expressionS *exprP,
97 enum expr_mode mode, char *nextchar);
98
99 #define md_start_line_hook() tic6x_start_line_hook ()
100 extern void tic6x_start_line_hook (void);
101
102 #define TC_CONS_FIX_NEW(frag, where, size, exp) \
103 tic6x_cons_fix_new (frag, where, size, exp)
104 extern void tic6x_cons_fix_new (fragS *frag, int where, int size,
105 expressionS *exp);
106
107 #define tc_frob_label(sym) tic6x_frob_label (sym)
108 extern void tic6x_frob_label (symbolS *sym);
109
110 #define tc_unrecognized_line(c) tic6x_unrecognized_line (c)
111 extern int tic6x_unrecognized_line (int c);
This page took 0.034355 seconds and 4 git commands to generate.