]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gas/config/tc-m32c.h
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / gas / config / tc-m32c.h
CommitLineData
49f58d10 1/* tc-m32c.h -- Header file for tc-m32c.c.
250d07de 2 Copyright (C) 2004-2021 Free Software Foundation, Inc.
49f58d10
JB
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)
49f58d10
JB
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
863f7a5f
NC
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. */
49f58d10
JB
20
21#define TC_M32C
22
49f58d10
JB
23#define LISTING_HEADER "M16C/M32C GAS "
24
25/* The target BFD architecture. */
26#define TARGET_ARCH bfd_arch_m32c
27
28#define TARGET_FORMAT "elf32-m32c"
29
b96282be 30#define TARGET_BYTES_BIG_ENDIAN 0
49f58d10 31
49f58d10
JB
32#define md_start_line_hook m32c_start_line_hook
33extern void m32c_start_line_hook (void);
34
49f58d10
JB
35/* Permit temporary numeric labels. */
36#define LOCAL_LABELS_FB 1
37
38#define DIFF_EXPR_OK /* .-foo gets turned into PC relative relocs */
39
40/* We don't need to handle .word strangely. */
41#define WORKING_DOT_WORD
42
6772dd07 43#define md_apply_fix m32c_apply_fix
5a49b8ac 44extern void m32c_apply_fix (struct fix *, valueT *, segT);
49f58d10
JB
45
46#define tc_fix_adjustable(fixP) m32c_fix_adjustable (fixP)
5a49b8ac 47extern bfd_boolean m32c_fix_adjustable (struct fix *);
49f58d10
JB
48
49/* When relaxing, we need to emit various relocs we otherwise wouldn't. */
50#define TC_FORCE_RELOCATION(fix) m32c_force_relocation (fix)
5a49b8ac 51extern int m32c_force_relocation (struct fix *);
49f58d10 52
62ebcb5c
AM
53#define TC_CONS_FIX_NEW(FRAG, WHERE, NBYTES, EXP, RELOC) \
54 m32c_cons_fix_new (FRAG, WHERE, NBYTES, EXP, RELOC)
55extern void m32c_cons_fix_new (fragS *, int, int, expressionS *,
56 bfd_reloc_code_real_type);
e110eeb7 57
49f58d10
JB
58extern const struct relax_type md_relax_table[];
59#define TC_GENERIC_RELAX_TABLE md_relax_table
60
5a49b8ac 61extern void m32c_prepare_relax_scan (fragS *, offsetT *, relax_substateT);
49f58d10
JB
62#define md_prepare_relax_scan(FRAGP, ADDR, AIM, STATE, TYPE) \
63 m32c_prepare_relax_scan(FRAGP, &AIM, STATE)
64
65/* Values passed to md_apply_fix don't include the symbol value. */
66#define MD_APPLY_SYM_VALUE(FIX) 0
67
49f58d10
JB
68/* Call md_pcrel_from_section(), not md_pcrel_from(). */
69#define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP, SEC)
49f58d10
JB
70
71/* We need a special version of the TC_START_LABEL macro so that we
72 allow the :Z, :S, :Q and :G suffixes to be
2e57ce7b
AM
73 parsed as such. We need to be able to change the contents of the
74 var storing what was at the NUL delimiter. */
75#define TC_START_LABEL(STR, NUL_CHAR, NEXT_CHAR) \
76 (NEXT_CHAR == ':' && !m32c_is_colon_insn (STR, &NUL_CHAR))
77extern int m32c_is_colon_insn (char *, char *);
c54b5932
DD
78
79#define H_TICK_HEX 1
27cdfa03
AM
80
81#define NOP_OPCODE (bfd_get_mach (stdoutput) == bfd_mach_m32c ? 0xde : 0x04)
82#define HANDLE_ALIGN(fragP)
83#define MAX_MEM_FOR_RS_ALIGN_CODE 1