Use getters/setters to access ARM branch type
[deliverable/binutils-gdb.git] / gas / config / tc-m68k.h
CommitLineData
252b5132 1/* This file is tc-m68k.h
6f2750fe 2 Copyright (C) 1987-2016 Free Software Foundation, Inc.
252b5132
RH
3
4 This file is part of GAS, the GNU Assembler.
5
6 GAS is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
ec2655a6 8 the Free Software Foundation; either version 3, or (at your option)
252b5132
RH
9 any later version.
10
11 GAS 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 GAS; see the file COPYING. If not, write to the Free
4b4da160
NC
18 Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
19 02110-1301, USA. */
252b5132
RH
20
21#define TC_M68K 1
22
252b5132 23struct fix;
252b5132
RH
24
25#define TARGET_BYTES_BIG_ENDIAN 1
26
27#ifdef OBJ_AOUT
28#ifdef TE_SUN3
29#define TARGET_FORMAT "a.out-sunos-big"
30#endif
31#ifdef TE_NetBSD
32#define TARGET_FORMAT "a.out-m68k-netbsd"
33#endif
34#ifdef TE_LINUX
35#define TARGET_FORMAT "a.out-m68k-linux"
36#endif
37#ifndef TARGET_FORMAT
38#define TARGET_FORMAT "a.out-zero-big"
39#endif
40#endif
41
42#ifdef OBJ_ELF
43#define TARGET_FORMAT "elf32-m68k"
44#endif
45
46#ifdef TE_APOLLO
47#define COFF_MAGIC APOLLOM68KMAGIC
48#define COFF_AOUTHDR_MAGIC APOLLO_COFF_VERSION_NUMBER
49#undef OBJ_COFF_OMIT_OPTIONAL_HEADER
50#endif
51
252b5132
RH
52#ifdef TE_AUX
53#define TARGET_FORMAT "coff-m68k-aux"
54#endif
55#ifdef TE_DELTA
56#define TARGET_FORMAT "coff-m68k-sysv"
57#endif
58
59#ifndef COFF_MAGIC
60#define COFF_MAGIC MC68MAGIC
61#endif
7be1c489 62#define TARGET_ARCH bfd_arch_m68k
252b5132
RH
63
64#define tc_comment_chars m68k_comment_chars
65extern const char *m68k_comment_chars;
66
252b5132
RH
67#define LISTING_WORD_SIZE 2 /* A word is 2 bytes */
68#define LISTING_LHS_WIDTH 2 /* One word on the first line */
69#define LISTING_LHS_WIDTH_SECOND 2 /* One word on the second line */
70#define LISTING_LHS_CONT_LINES 4/* And 4 lines max */
71#define LISTING_HEADER "68K GAS "
72
73#ifndef REGISTER_PREFIX
74#define REGISTER_PREFIX '%'
75#endif
76
77#if !defined (REGISTER_PREFIX_OPTIONAL)
78#if defined (M68KCOFF) || defined (OBJ_ELF)
252b5132
RH
79#define REGISTER_PREFIX_OPTIONAL 0
80#else /* ! (COFF || ELF) */
81#define REGISTER_PREFIX_OPTIONAL 1
82#endif /* ! (COFF || ELF) */
83#endif /* not def REGISTER_PREFIX and not def OPTIONAL_REGISTER_PREFIX */
84
85#ifdef TE_DELTA
86/* On the Delta, `%' can occur within a label name, but not as the
87 initial character. */
88#define LEX_PCT LEX_NAME
81d4177b 89/* On the Delta, `~' can start a label name, but is converted to '.'. */
252b5132
RH
90#define LEX_TILDE LEX_BEGIN_NAME
91#define tc_canonicalize_symbol_name(s) ((*(s) == '~' ? *(s) = '.' : '.'), s)
92/* On the Delta, dots are not required before pseudo-ops. */
abd63a32 93#define NO_PSEUDO_DOT 1
252b5132
RH
94#endif
95
8f738565 96extern void m68k_mri_mode_change (int);
252b5132
RH
97#define MRI_MODE_CHANGE(i) m68k_mri_mode_change (i)
98
8f738565 99extern int m68k_conditional_pseudoop (pseudo_typeS *);
252b5132
RH
100#define tc_conditional_pseudoop(pop) m68k_conditional_pseudoop (pop)
101
8f738565 102extern void m68k_frob_label (symbolS *);
252b5132
RH
103#define tc_frob_label(sym) m68k_frob_label (sym)
104
8f738565 105extern void m68k_flush_pending_output (void);
252b5132
RH
106#define md_flush_pending_output() m68k_flush_pending_output ()
107
8f738565 108extern void m68k_frob_symbol (symbolS *);
252b5132 109
252b5132
RH
110#define tc_frob_symbol(sym,punt) \
111do \
112 { \
113 if (S_GET_SEGMENT (sym) == reg_section) \
114 punt = 1; \
115 m68k_frob_symbol (sym); \
116 } \
117while (0)
118
119#define NO_RELOC BFD_RELOC_NONE
5cbdaa77
NC
120#define RELAX_RELOC_ABS8 BFD_RELOC_8
121#define RELAX_RELOC_ABS16 BFD_RELOC_16
122#define RELAX_RELOC_ABS32 BFD_RELOC_32
123#define RELAX_RELOC_PC8 BFD_RELOC_8_PCREL
124#define RELAX_RELOC_PC16 BFD_RELOC_16_PCREL
125#define RELAX_RELOC_PC32 BFD_RELOC_32_PCREL
252b5132
RH
126
127#ifdef OBJ_ELF
8f36cd18 128#define tc_fix_adjustable(X) tc_m68k_fix_adjustable(X)
8f738565 129extern int tc_m68k_fix_adjustable (struct fix *);
8f36cd18 130
6358301e
NC
131/* Target *-*-elf implies an embedded target. No shared libs.
132 *-*-uclinux also requires special casing to prevent GAS from
133 generating unsupported R_68K_PC16 relocs. */
134#define EXTERN_FORCE_RELOC \
135 ((strcmp (TARGET_OS, "elf") != 0) && (strcmp (TARGET_OS, "uclinux") != 0))
a161fe53 136
55cf6793 137/* Values passed to md_apply_fix don't include symbol values. */
a161fe53 138#define MD_APPLY_SYM_VALUE(FIX) 0
02198638 139
0d96863f 140#define elf_tc_final_processing m68k_elf_final_processing
8f738565 141extern void m68k_elf_final_processing (void);
252b5132
RH
142#endif
143
252b5132
RH
144#define DIFF_EXPR_OK
145
8f738565 146extern int m68k_parse_long_option (char *);
252b5132
RH
147#define md_parse_long_option m68k_parse_long_option
148
149#define md_operand(x)
150
252b5132
RH
151#define TARGET_ARCH bfd_arch_m68k
152
153extern struct relax_type md_relax_table[];
154#define TC_GENERIC_RELAX_TABLE md_relax_table
155
d7861ad2
AM
156/* We can't do a byte jump to the next instruction, so in that case
157 force word mode by faking AIM. */
252b5132 158#define md_prepare_relax_scan(fragP, address, aim, this_state, this_type) \
d7861ad2
AM
159 do \
160 { \
161 if (aim == 0 && this_type->rlx_forward == 127) \
162 aim = 128; \
163 } \
164 while (0)
f27a3839
AS
165
166#define DWARF2_LINE_MIN_INSN_LENGTH 2
c04898f8
AS
167
168/* We want .cfi_* pseudo-ops for generating unwind info. */
169#define TARGET_USE_CFIPOP 1
170
171#define DWARF2_DEFAULT_RETURN_COLUMN 24
172#define DWARF2_CIE_DATA_ALIGNMENT (-4)
173
174#define tc_regname_to_dw2regnum tc_m68k_regname_to_dw2regnum
e0471c16 175extern int tc_m68k_regname_to_dw2regnum (const char *regname);
c04898f8
AS
176
177#define tc_cfi_frame_initial_instructions tc_m68k_frame_initial_instructions
178extern void tc_m68k_frame_initial_instructions (void);
2c678708
MK
179
180#ifdef TE_UCLINUX
181/* elf2flt does not honor PT_LOAD's from the executable.
182 .text and .eh_frame sections will not end up in the same segment and so
183 we cannot use PC-relative encoding for CFI. */
184# define CFI_DIFF_EXPR_OK 0
185
186/* However, follow compiler's guidance when it specifies encoding for LSDA. */
187# define CFI_DIFF_LSDA_OK 1
188#endif
909c7f9c
NC
189
190struct broken_word;
191#define TC_CHECK_ADJUSTED_BROKEN_DOT_WORD(new_offset, brokw) \
192 tc_m68k_check_adjusted_broken_word ((offsetT) (new_offset), (brokw))
193extern void tc_m68k_check_adjusted_broken_word (offsetT,
194 struct broken_word *);
This page took 0.921678 seconds and 4 git commands to generate.